--On Sunday, September 03, 2006 8:44 PM -1000 "Aaron A. Kagawa (JIRA)" wrote:

    [ 
http://hackydev.ics.hawaii.edu:8080/browse/HACK-747?page=comments#action_11786 ]

Aaron A. Kagawa commented on HACK-747:
--------------------------------------

i'm not sure you committed the change. I still see the source="1.4" in the javac
presetdef.

Change default Java to 1.5
--------------------------

         Key: HACK-747
         URL: http://hackydev.ics.hawaii.edu:8080/browse/HACK-747
     Project: Hackystat
        Type: Improvement

    Reporter: Philip Johnson
    Assignee: Philip Johnson
     Fix For: 7.5


As of this release cycle, we can go ahead and make Java5 the default.  This 
means:
* Change the build system to check for jdk 1.5 and fail if not present.
* Update hackydev as needed.
* Change the documentation to indicate jdk 1.5 is required.

Hi Aaron,

Good question. The current definition is indeed the way I intend it, because it accomplishes the following:

(a) if a Hackystat module requires jdk 1.5 libraries or constructs (as does hackyCore_Kernel and a couple of others) , then it supplies the source attribute explicitly in the compile target. For example, the hackyCore_Kernel local.build.xml compile target contains:

  <hackyCore_Build.javac srcdir="${hackyCore_Kernel.src.dir}" source="1.5">
      <classpath refid="hackyCore_Kernel.classpath"/>
   </hackyCore_Build.javac>

Thus, since all Hackystat configurations require hackyCore_Kernel, and since hackyCore_Kernel requires jdk 1.5, Hackystat requires jdk 1.5.

The problem is that using source="1.5" also generates compiler warnings because I have not yet updated the hackyCore_Kernel collections classes with parameters. Here are the compiler warnings:

   [javac] Note: Some input files use unchecked or unsafe operations.
   [javac] Note: Recompile with -Xlint:unchecked for details.

If we changed the default to source="1.5", then we'd typically get many dozens of lines like this every time we do a compile, and they don't really add any value. To avoid this, the default source attribute remains 1.4.

The net of it is the following:

(a) JDK 1.5 is, in fact, required.

(b) If you start using jdk 1.5 libraries or constructs in a module, then simply supply the source="1.5" attribute in your local.build.xml file to support compilation.

(c) This will have the side effect of generating compiler warnings unless you also update your data structures. Updating is a good thing to do, but at this point, since I haven't gotten it together to update hackyCore_Kernel, I don't feel any moral authority to demand it.

Cheers,
Philip

Reply via email to