Can anyone explain how to setup IDEA to allow asserts when building via Ant.
I have an assert statement in a java source file. Using Ant's javac task to compile gives the following errors:
xxx.java (1064:9)not a statement
xxx.java:1064: not a statement
xxx.java (1064:16)';' expected
xxx.java:1064: ';' expected
The line in question is:
assert !objects.isEmpty() : "no object defined";
In my IDEA settings JDKs I have JDK1.4.2_02 set.
Further in my Ant build.xml file I have the following property set:
My understanding is that Ant uses the default JDK or a sdpecific JDK version if the global "build.compiler" property is set. Both of these are true in my case yet the build errors are those that I would expect to see if a
pre 1.4 javac was used for the compilation.