User Tools

Site Tools


inner_classfiles_naming

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
inner_classfiles_naming [2013/11/13 07:37]
yann created
inner_classfiles_naming [2019/10/06 20:37] (current)
Line 1: Line 1:
-From the beginning of the inception ​of [[http://​jcp.org/​aboutJava/​communityprocess/​maintenance/​JLS/​innerclasses.pdf|inner classes]] in Java, developers knew that it would be a mess... and it had been proven again and again. Here is a most recent example. Take the following (academic) piece of code:+From the beginning of the introduction ​of [[http://​jcp.org/​aboutJava/​communityprocess/​maintenance/​JLS/​innerclasses.pdf|inner classes]] in Java, developers knew that it would be a mess... and it has been proven again and again. Here is a recent example. Take the following (academic) piece of code:
  
 <​code>​ <​code>​
Line 10: Line 10:
 </​code>​ </​code>​
  
-On both MacOS Windows, there are two files generated... BUT, these two files have different names, thus throwing on the ground some of the dedicated PADL tests (in particular in PADL Creator ClassFile Tests)+Compile it with your standard Java compiler ''​javac''​. ​On both MacOS and Windows, there are two files generated... ​**BUT**, these two files have different names (!), thus throwing on the ground some of the dedicated ​[[PADL]] tests (in particular in project [[PADL Creator ClassFile|PADL Creator ClassFile Tests]])
  
   * On MacOS   * On MacOS
-    * Anonymous.class +    * ''​Anonymous.class''​ 
-    * Anonymous$1B.class+    * ''​Anonymous$1B.class''​
   * On Windows   * On Windows
-    * Anonymous.class +    * ''​Anonymous.class''​ 
-    * Anonymous$1$B.class+    * ''​Anonymous$1$B.class''​
  
 +Did you notice the difference? on MacOS, the file describing the inner class is named ''​Anonymous$1B.class''​ with only one $ sign; on Windows, its name is ''​Anonymous$1$B.class''​ with two $ signs. **Sigh...**
inner_classfiles_naming.1384328260.txt.gz · Last modified: 2019/10/06 20:37 (external edit)