Switched to Java 7.

Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/f8d40574
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/f8d40574
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/f8d40574

Branch: refs/heads/3
Commit: f8d40574432b5541ab5049c2c1dadf4d8fb2f15a
Parents: eab162f
Author: ddekany <[email protected]>
Authored: Wed Feb 8 18:36:46 2017 +0100
Committer: ddekany <[email protected]>
Committed: Wed Feb 8 18:36:46 2017 +0100

----------------------------------------------------------------------
 README                              | 12 +++----
 build.properties.sample             |  5 ++-
 build.xml                           | 60 +++++++++-----------------------
 src/manual/en_US/FM3-CHANGE-LOG.txt |  3 +-
 4 files changed, 26 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/f8d40574/README
----------------------------------------------------------------------
diff --git a/README b/README
index 92719f9..f69033a 100644
--- a/README
+++ b/README
@@ -157,7 +157,7 @@ apply it to your development environment:
     This profile uses space-only indentation policy and 120 character line
     width, and formatting rules that are pretty much standard in modern Java.
   - Java -> Installed JRE-s:
-    Ensure that you have JDK 6 installed, and that it was added to Eclipse.
+    Ensure that you have JDK 7 installed, and that it was added to Eclipse.
     Note that it's not JRE, but JDK.
   - Java -> Compiler -> Javadoc:
     "Malformed Javadoc comments": Error
@@ -180,16 +180,14 @@ apply it to your development environment:
         src/test/resources
     - On the "Libraries" tab:
       - Delete everyhing from there, except the "JRE System Library [...]"
-      - Edit "JRE System Library [...]" to "Execution Environment" "JavaSE 1.6"
+      - Edit "JRE System Library [...]" to "Execution Environment" "JavaSE 1.7"
       - Add all jar-s that are directly under the "ide-dependencies" directory
         (use the "Add JARs..." and select all those files).
    - Press "Finish"
 - Eclipse will indicate many errors at this point; it's expected, read on.
-- Project -> Properties -> Java Compiler
-  - Set "Compiler Compliance Level" to "1.6" (you will have to uncheck
-    "Use compliance from execution environment" for that)
-  - In Errors/Warnings, check in "Enable project specific settings", then set
-    "Forbidden reference (access rules)" from "Error" to "Warning".
+- Project -> Properties -> Java Compiler -> Errors/Warnings:
+  Check in "Enable project specific settings", then set "Forbidden reference
+  (access rules)" from "Error" to "Warning".
 - At Project -> Properties -> Java Code Style -> Formatter, check in "Enable
   project specific settings", and then select "FreeMarker" as active profile.
 - At Project -> Properties -> Java Editor -> Save Actions, check "Enable 
project

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/f8d40574/build.properties.sample
----------------------------------------------------------------------
diff --git a/build.properties.sample b/build.properties.sample
index c5dc8ff..fd366cf 100644
--- a/build.properties.sample
+++ b/build.properties.sample
@@ -17,7 +17,6 @@
 
 # Copy this file to "build.properties" before editing!
 # These propeties should point to the rt.jar-s of the respective J2SE versions:
-boot.classpath.j2se1.5=C:/Program Files (x86)/Java/jdk1.5.0_16/jre/lib/rt.jar
-boot.classpath.j2se1.6=C:/Program Files/Java/jdk1.6.0_24/jre/lib/rt.jar
-mvnCommand=C:/Program Files (x86)/maven3/bin/mvn.bat
+boot.classpath.j2se1.7=C:/Program Files/Java/jdk1.7.0_25/jre/lib/rt.jar
+mvnCommand=C:/Program Files (x86)/maven3/bin/mvn.cmd
 gpgCommand=C:/Program Files (x86)/GNU/GnuPG/pub/gpg.exe
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/f8d40574/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index e6e3b13..5bf9dee 100644
--- a/build.xml
+++ b/build.xml
@@ -43,33 +43,24 @@
   <property name="server.ivy.repo.root" 
value="${basedir}/build/dummy-server-ivy-repo" />
   
   <property file="build.properties"/>
-  <condition property="has.explicit.boot.classpath.j2se1.5">
-    <isset property="boot.classpath.j2se1.5"/>
-  </condition>
-  <condition property="has.explicit.boot.classpath.j2se1.6">
-    <isset property="boot.classpath.j2se1.6"/>
+  <condition property="has.explicit.boot.classpath.j2se1.7">
+    <isset property="boot.classpath.j2se1.7"/>
   </condition>
   <condition property="has.all.explicit.boot.classpaths">
     <and>
-      <isset property="has.explicit.boot.classpath.j2se1.5"/>
-      <isset property="has.explicit.boot.classpath.j2se1.6"/>
+      <isset property="has.explicit.boot.classpath.j2se1.7"/>
     </and>
   </condition>
   <available property="atLeastJDK8" classname="java.util.function.Predicate"/>
 
   <!-- When boot.classpath.j2se* is missing, these will be the defaults: -->
   <!-- Note: Target "dist" doesn't allow using these. -->
-  <property name="boot.classpath.j2se1.5" value="${sun.boot.class.path}" />
-  <property name="boot.classpath.j2se1.6" value="${sun.boot.class.path}" />
+  <property name="boot.classpath.j2se1.7" value="${sun.boot.class.path}" />
   
   <!-- For checking the correctness of the boot.classpath.j2se* -->
-  <available classpath="${boot.classpath.j2se1.5}"
-    classname="java.util.concurrent.ConcurrentHashMap" 
ignoresystemclasses="true" 
-    property="boot.classpath.j2se1.5.correct"
-  />
-  <available classpath="${boot.classpath.j2se1.6}"
-    classname="java.util.ServiceLoader" ignoresystemclasses="true" 
-    property="boot.classpath.j2se1.6.correct"
+  <available classpath="${boot.classpath.j2se1.7}"
+    classname="java.util.Objects" ignoresystemclasses="true" 
+    property="boot.classpath.j2se1.7.correct"
   />
   
   <!-- Set up version/timestamp filters and the version property: -->
@@ -195,22 +186,15 @@
   </target>
    
   <target name="compile" depends="javacc">
-    <fail unless="boot.classpath.j2se1.5.correct"><!--
-      -->The "boot.classpath.j2se1.5" property value 
(${boot.classpath.j2se1.5}) <!--
-      -->seems to be an incorrect boot classpath. Please fix it in <!--
-      -->the &lt;projectDir>/build.properties file, or wherever you <!--
-      -->set it.<!--
-    --></fail>
-    <fail unless="boot.classpath.j2se1.6.correct"><!--
-      -->The "boot.classpath.j2se1.6" property value 
(${boot.classpath.j2se1.6}) <!--
+    <fail unless="boot.classpath.j2se1.7.correct"><!--
+      -->The "boot.classpath.j2se1.7" property value 
(${boot.classpath.j2se1.7}) <!--
       -->seems to be an incorrect boot classpath. Please fix it in <!--
       -->the &lt;projectDir>/build.properties file, or wherever you <!--
       -->set it.<!--
     --></fail>
     <echo level="info"><!--
       -->Using boot classpaths:<!--
-      -->Java 5: ${boot.classpath.j2se1.5}; <!--
-      -->Java 6: ${boot.classpath.j2se1.6}<!--
+      -->Java 7: ${boot.classpath.j2se1.7}; <!--
     --></echo>
 
     <!-- Comment out @SuppressFBWarnings, as it causes compilation warnings in 
dependent Gradle projects -->    
@@ -237,30 +221,20 @@
     <!-- Note: the "build.base" conf doesn't include optional FreeMarker 
dependencies. -->
     <ivy:cachepath conf="build.base" pathid="ivy.dep" />
     <javac destdir="build/classes" deprecation="off" 
-      debug="on" optimize="off" target="1.5" source="1.5" encoding="utf-8"
+      debug="on" optimize="off" target="1.7" source="1.7" encoding="utf-8"
       includeantruntime="false"
       classpathref="ivy.dep"
-      bootclasspath="${boot.classpath.j2se1.5}"
+      bootclasspath="${boot.classpath.j2se1.7}"
       excludes="
-        freemarker/core/_Java6Impl.java,
         freemarker/ext/jsp/**,
         freemarker/ext/servlet/**,
-        freemarker/cache/WebappTemplateLoader.java"
+        freemarker/cache/Web?ppTemplateLoader*.java"
     >
       <src>
         <pathelement location="build/src-main-java-filtered" />
         <pathelement location="build/generated-sources" />
       </src>
     </javac>
-
-    <ivy:cachepath conf="build.base" pathid="ivy.dep" />
-    <javac srcdir="build/src-main-java-filtered" destdir="build/classes" 
deprecation="off" 
-      debug="on" optimize="off" target="1.5" source="1.5" encoding="utf-8"
-      includeantruntime="false"
-      classpathref="ivy.dep"
-      bootclasspath="${boot.classpath.j2se1.6}"
-      includes="freemarker/core/_Java6Impl.java"
-    />
     
     <rmic
       base="build/classes" includes="freemarker/debug/impl/Rmi*Impl.class"
@@ -270,10 +244,10 @@
 
     <ivy:cachepath conf="build.jsp2.1" pathid="ivy.dep.jsp2.1" />
     <javac srcdir="build/src-main-java-filtered" destdir="build/classes" 
deprecation="off" 
-      debug="on" optimize="off" target="1.5" source="1.5" encoding="utf-8"
+      debug="on" optimize="off" target="1.7" source="1.7" encoding="utf-8"
       includeantruntime="false"
       classpathref="ivy.dep.jsp2.1"
-      bootclasspath="${boot.classpath.j2se1.5}"
+      bootclasspath="${boot.classpath.j2se1.7}"
       includes="
         freemarker/ext/jsp/**,
         freemarker/ext/servlet/**,
@@ -319,11 +293,11 @@
   
     <ivy:cachepath conf="build.test" pathid="ivy.dep.build.test" />
     <javac srcdir="src/test/java" destdir="build/test-classes" 
deprecation="off" 
-      debug="on" optimize="off" target="1.5" source="1.5" encoding="utf-8"
+      debug="on" optimize="off" target="1.7" source="1.7" encoding="utf-8"
       includeantruntime="false"
       classpath="build/classes"
       classpathref="ivy.dep.build.test"
-      bootclasspath="${boot.classpath.j2se1.6}"
+      bootclasspath="${boot.classpath.j2se1.7}"
     />
     <copy toDir="build/test-classes">
       <fileset dir="src/test/resources"

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/f8d40574/src/manual/en_US/FM3-CHANGE-LOG.txt
----------------------------------------------------------------------
diff --git a/src/manual/en_US/FM3-CHANGE-LOG.txt 
b/src/manual/en_US/FM3-CHANGE-LOG.txt
index d5d6868..4ba48fb 100644
--- a/src/manual/en_US/FM3-CHANGE-LOG.txt
+++ b/src/manual/en_US/FM3-CHANGE-LOG.txt
@@ -16,4 +16,5 @@ the FreeMarer 3 changelog here:
   the same as UNRESTRICTED_RESOLVER
 - Removed the strict_syntax setting, and so also the support for FTL tags 
without #. This was a FreeMarker 1.x
   compatibility option.
-- Removed deprecated FMParser contstructors.
\ No newline at end of file
+- Removed deprecated FMParser contstructors.
+- Minimum Java version increased to 7, but without try-with-resource as that's 
unavailable before Android 4.4 KitKat.
\ No newline at end of file

Reply via email to