This is the mail archive of the mauve-patches@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: added explicit constructor to avoid interpretation of its visibility


Hi,
  as explained on the classpath ml, there is an interpretation of the
JLS which makes different compilers produce different visibility for the
constructor of a private inner classe without explicit constructor
(namely private with jikes, and non private with ecj). To avoid this
ambiguity, I added this constructor explicitely.

2006-02-14  Olivier Jolly  <olivier.jolly@pcedev.com>

    * gnu/testlet/java/io/ObjectInputOutput/HierarchyTest.java
    (HierarchyTest.Base): Added explicit constructor to avoid interpretation
    of its visibility.

  I wonder whether this kind of test should be added in jacks.
  Cheers,
Olivier
Index: ChangeLog
===================================================================
RCS file: /cvs/mauve/mauve/ChangeLog,v
retrieving revision 1.1469
diff -u -r1.1469 ChangeLog
--- ChangeLog	14 Feb 2006 21:09:12 -0000	1.1469
+++ ChangeLog	14 Feb 2006 21:41:47 -0000
@@ -1,5 +1,11 @@
 2006-02-14  Olivier Jolly  <olivier.jolly@pcedev.com>
 
+	* gnu/testlet/java/io/ObjectInputOutput/HierarchyTest.java
+	(HierarchyTest.Base): Added explicit constructor to avoid interpretation
+	of its visibility.
+
+2006-02-14  Olivier Jolly  <olivier.jolly@pcedev.com>
+
 	* batch_run
 	  (COMPILER): Added "none" as possible value to skip compilation.
 
Index: gnu/testlet/java/io/ObjectInputOutput/HierarchyTest.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/ObjectInputOutput/HierarchyTest.java,v
retrieving revision 1.1
diff -u -r1.1 HierarchyTest.java
--- gnu/testlet/java/io/ObjectInputOutput/HierarchyTest.java	10 Feb 2006 21:53:54 -0000	1.1
+++ gnu/testlet/java/io/ObjectInputOutput/HierarchyTest.java	14 Feb 2006 21:41:47 -0000
@@ -87,6 +87,12 @@
   {
     private Integer a = new Integer(-1);
 
+    Base()
+    {
+      // Empty explicit constructor to prevent private implicit constructor to
+      // be generated by some compilers
+    }
+    
     Integer getA()
     {
       return a;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]