Community
Participate
Working Groups
I am using ecj (tried both 4.2.1 and 4.2.2) to compile an Eclipse project. To get the same errors and warnings as configured in the Eclipse workspace I pass the org.eclipse.jdt.core.prefs file to the batch compiler using the -properties parameter. The properties file contains, amongst others: eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=javax.annotation.Nonnull org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault org.eclipse.jdt.core.compiler.annotation.nullable=javax.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning Compiling however does not report any problem due to nullity checking with those annotations. If I pass the required annotations on the command line, as: -warn:nullAnnot(javax.annotation.Nullable|javax.annotation.Nonnull|NonnNullByDefault) then nullity annotations are checked.
Should be fixed as of 4.3 M3. Can you check with a milestone build like this one: http://download.eclipse.org/eclipse/downloads/drops4/S-4.3M6-201303141330/#JDTCORE ? *** This bug has been marked as a duplicate of bug 375366 ***
If I do, I get the for me totally incomprehensible: 1. ERROR in /home/jal/puzzler-bzr/master/vp/4.3/vp-domui-components/test/nl/itris/vp/pages/dms/MergeResultFragmentTest.java (at line 0) package nl.itris.vp.pages.dms; ^ Internal compiler error: java.lang.SecurityException: class "org.eclipse.jdt.internal.compiler.lookup.AptSourceLocalVariableBinding"'s signer information does not match signer information of other classes in the same package at java.lang.ClassLoader.checkCerts(ClassLoader.java:943) ---------- class "org.eclipse.jdt.internal.compiler.lookup.AptSourceLocalVariableBinding"'s signer information does not match signer information of other classes in the same package
(In reply to comment #2) > If I do, I get the for me totally incomprehensible: > > 1. ERROR in > /home/jal/puzzler-bzr/master/vp/4.3/vp-domui-components/test/nl/itris/vp/ > pages/dms/MergeResultFragmentTest.java (at line 0) > package nl.itris.vp.pages.dms; > ^ > Internal compiler error: java.lang.SecurityException: class > "org.eclipse.jdt.internal.compiler.lookup.AptSourceLocalVariableBinding"'s > signer information does not match signer information of other classes in the > same package at java.lang.ClassLoader.checkCerts(ClassLoader.java:943) > ---------- > class > "org.eclipse.jdt.internal.compiler.lookup.AptSourceLocalVariableBinding"'s > signer information does not match signer information of other classes in the > same package Wow :) So you're invoking ecj from some application with a security manager? When I call that jar from the command line it seems to work, BUT, looking inside I see that most classes have been signed, but not AptSourceLocalVariableBinding! I've filed bug 404729 to track this packaging problem. It seems, M6 is the first milestone where ecj has this bogus shape, do you want to give another chance to M5a?
Well, I just tested on the command line with a simple script; the command line to start ecj just starts like: java -jar /home/jal/ecj.jar followed by options and a huge amount of classpath. The only "special" thing is that a -bootclasspath is used to ensure that the proper JDK libraries are used. But that should not cause it to run inside a security manager.... Anyway, I tested with 4.3m5a and that does indeed report the nullity problems too, so the problem seems fixed there. Thanks ;-) I will add a workaround inside my tool to get the annotation settings from the .prefs file and pass them on the command line.
(In reply to comment #4) > Anyway, I tested with 4.3m5a and that does indeed report the nullity > problems too, so the problem seems fixed there. Thanks ;-) Thanks for confirming!
Verified by the bug reporter already.