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,
Auf dieser Seite können Sie das Online-Video [UNSOUND24] Java Method-Local Inner Classes are Unsound mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer ACM SIGPLAN 26 März 2025 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 29 Mal angesehen und es wurde von 0 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!