diff --git a/docs/ant_task_guidelines.html b/docs/ant_task_guidelines.html index 96ac76830..b863d40ad 100644 --- a/docs/ant_task_guidelines.html +++ b/docs/ant_task_guidelines.html @@ -26,7 +26,7 @@ double "$$" got mapped to "$" for backwards compatibility.
+There is an ant build file check.xml in the main ant directory with runs + checkstyle over + ant's source code.
-What is problematic is code which is dependent on Java1.2 features --Collections, Reader and Writer classes, extra methods in older classes. +What is problematic is code which is dependent on Java1.3 features +-java.lang.reflect.Proxy, or Java1.4 features - java.io.nio for example. +Be also aware of extra +methods in older classes - like StringBuffer#append(StringBuffer). These can not be used directly by any code and still be able to compile -and run on a Java 1.1 system. So please stick to the older collection -classes, and the older IO classes. If a new method in an existing class +and run on a Java 1.2 system. +If a new method in an existing class is to be used, it must be used via reflection and the NoSuchMethodException handled somehow.
-What if code simply does not work on Java1.1? It can happen. It will +What if code simply does not work on Java1.2? It can happen. It will probably be OK to have the task as an optional task, with compilation -restricted to Java1.2 or later through build.xml modifications. +restricted to Java1.3 or later through build.xml modifications. Better still, use reflection to link to the classes at run time.
Java 1.4 adds a new optional change to the language itself, the assert keyword, which is only enabled if the compiler is told -to compile 1.4 version source. Clearly with the 1.1 compatibility requirement, +to compile 1.4 version source. Clearly with the 1.2 compatibility requirement, Ant tasks can not use this keyword. They also need to move away from using the JUnit assert() method and call assertTrue() instead. - +
+Java 1.5 will (perhaps) add a new keyword - enum, one should avoid +this for future compatibility.
-Remember also that Ant 1.x is designed to compile and run on Java1.1, so -you should test on Java 1.1 as well as any later version which you use. +Remember also that Ant 1.x is designed to compile and run on Java1.2, so +you should test on Java 1.2 as well as any later version which you use. You can download an old SDK from Sun for this purpose.
Finally, run a full build test
before and after you start
@@ -427,7 +436,7 @@ cases, while documentation helps sell the reason for a task.