incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1591934 - /sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/jasper/compiler/JDTCompiler.java
Date Fri, 02 May 2014 14:44:37 GMT
Author: cziegeler
Date: Fri May  2 14:44:36 2014
New Revision: 1591934

URL: http://svn.apache.org/r1591934
Log:
SLING-3405 : SLING2094Test and ServerSideScriptsTest fail with java 8: JSP compiler does not
find java.util.Arrays or java.lang.CharSequence

Modified:
    sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/jasper/compiler/JDTCompiler.java

Modified: sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/jasper/compiler/JDTCompiler.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/jasper/compiler/JDTCompiler.java?rev=1591934&r1=1591933&r2=1591934&view=diff
==============================================================================
--- sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/jasper/compiler/JDTCompiler.java
(original)
+++ sling/trunk/bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/jasper/compiler/JDTCompiler.java
Fri May  2 14:44:36 2014
@@ -305,15 +305,24 @@ public class JDTCompiler extends org.apa
             } else if(opt.equals("1.5")) {
                 settings.put(CompilerOptions.OPTION_Source,
                              CompilerOptions.VERSION_1_5);
+            } else if(opt.equals("1.6")) {
+                settings.put(CompilerOptions.OPTION_Source,
+                             CompilerOptions.VERSION_1_6);
+            } else if(opt.equals("1.7")) {
+                settings.put(CompilerOptions.OPTION_Source,
+                             CompilerOptions.VERSION_1_7);
+            } else if(opt.equals("1.8")) {
+                settings.put(CompilerOptions.OPTION_Source,
+                             CompilerOptions.VERSION_1_8);
             } else {
                 log.warn("Unknown source VM " + opt + " ignored.");
                 settings.put(CompilerOptions.OPTION_Source,
-                        CompilerOptions.VERSION_1_5);
+                        CompilerOptions.VERSION_1_6);
             }
         } else {
-            // Default to 1.5
+            // Default to 1.6
             settings.put(CompilerOptions.OPTION_Source,
-                    CompilerOptions.VERSION_1_5);
+                    CompilerOptions.VERSION_1_6);
         }
 
         // Target JVM
@@ -336,17 +345,32 @@ public class JDTCompiler extends org.apa
                              CompilerOptions.VERSION_1_5);
                 settings.put(CompilerOptions.OPTION_Compliance,
                         CompilerOptions.VERSION_1_5);
+            } else if(opt.equals("1.6")) {
+                settings.put(CompilerOptions.OPTION_TargetPlatform,
+                             CompilerOptions.VERSION_1_6);
+                settings.put(CompilerOptions.OPTION_Compliance,
+                        CompilerOptions.VERSION_1_6);
+            } else if(opt.equals("1.7")) {
+                settings.put(CompilerOptions.OPTION_TargetPlatform,
+                             CompilerOptions.VERSION_1_7);
+                settings.put(CompilerOptions.OPTION_Compliance,
+                        CompilerOptions.VERSION_1_7);
+            } else if(opt.equals("1.8")) {
+                settings.put(CompilerOptions.OPTION_TargetPlatform,
+                             CompilerOptions.VERSION_1_8);
+                settings.put(CompilerOptions.OPTION_Compliance,
+                        CompilerOptions.VERSION_1_8);
             } else {
                 log.warn("Unknown target VM " + opt + " ignored.");
                 settings.put(CompilerOptions.OPTION_TargetPlatform,
-                        CompilerOptions.VERSION_1_5);
+                        CompilerOptions.VERSION_1_6);
             }
         } else {
-            // Default to 1.5
+            // Default to 1.6
             settings.put(CompilerOptions.OPTION_TargetPlatform,
-                    CompilerOptions.VERSION_1_5);
+                    CompilerOptions.VERSION_1_6);
             settings.put(CompilerOptions.OPTION_Compliance,
-                    CompilerOptions.VERSION_1_5);
+                    CompilerOptions.VERSION_1_6);
         }
 
         final IProblemFactory problemFactory =



Mime
View raw message