Java Method-Local Inner Classes are Unsound (Video, UNSOUND 2024)
Marco Servetto, Nick Webster, and Colin Gordon
(VUW; Victoria University of Wellington ; Drexel University)
Abstract: Method local inner classes are intended to be accessible only within the scope of that method. While generics allow to express generic algorithms and precise types for collections, they also introduce new kinds of type safety issues that were not present in earlier versions of Java. In this paper we discuss one of such issues, this issue is caused by the interaction between generics, method local inner classes and the Java’s class-based access control. Java’s access control is class-based rather than instance-based. Visibility of members is determined by their location within the code. In this paper we show that if an instance of a method local inner class flows back inside of a version of the originating method instantiated with different generic type parameters, something interesting happens.
Presentation at the UNSOUND 2024 conference, October 20, 2024, https://2024.splashcon.org/home/unsou...
Sponsored by ACM SIGPLAN,
In questa pagina del sito puoi guardare il video online [UNSOUND24] Java Method-Local Inner Classes are Unsound della durata di ore minuti seconda in buona qualità , che l'utente ha caricato ACM SIGPLAN 26 marzo 2025, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 29 volte e gli è piaciuto 0 spettatori. Buona visione!