Author: remy.maucherat(a)jboss.com
Date: 2015-02-20 04:07:58 -0500 (Fri, 20 Feb 2015)
New Revision: 2594
Modified:
branches/7.5.x/pom.xml
branches/7.5.x/src/main/java/org/apache/jasper/compiler/JDTCompiler.java
branches/7.5.x/src/main/java/org/apache/jasper/compiler/SmapUtil.java
Log:
BZ1193553: Add support for putting nice Java 8 code in JSPs.
Modified: branches/7.5.x/pom.xml
===================================================================
--- branches/7.5.x/pom.xml 2015-02-13 15:57:42 UTC (rev 2593)
+++ branches/7.5.x/pom.xml 2015-02-20 09:07:58 UTC (rev 2594)
@@ -45,7 +45,7 @@
<version.org.jboss.spec.javax.el>1.0.1.Final</version.org.jboss.spec.javax.el>
<version.org.jboss.spec.javax.servlet>1.0.1.Final</version.org.jboss.spec.javax.servlet>
<version.org.jboss.spec.javax.servlet.jsp>1.0.1.Final</version.org.jboss.spec.javax.servlet.jsp>
-
<version.org.eclipse.jdt.core.compiler.ecj>4.3.1</version.org.eclipse.jdt.core.compiler.ecj>
+
<version.org.eclipse.jdt.core.compiler.ecj>4.4.1</version.org.eclipse.jdt.core.compiler.ecj>
<!-- Build configuration -->
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
Modified: branches/7.5.x/src/main/java/org/apache/jasper/compiler/JDTCompiler.java
===================================================================
--- branches/7.5.x/src/main/java/org/apache/jasper/compiler/JDTCompiler.java 2015-02-13
15:57:42 UTC (rev 2593)
+++ branches/7.5.x/src/main/java/org/apache/jasper/compiler/JDTCompiler.java 2015-02-20
09:07:58 UTC (rev 2594)
@@ -328,6 +328,9 @@
} 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 {
JasperLogger.COMPILER_LOGGER.unknownSourceJvm(opt);
settings.put(CompilerOptions.OPTION_Source,
@@ -369,6 +372,11 @@
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 {
JasperLogger.COMPILER_LOGGER.unknownTargetJvm(opt);
settings.put(CompilerOptions.OPTION_TargetPlatform,
Modified: branches/7.5.x/src/main/java/org/apache/jasper/compiler/SmapUtil.java
===================================================================
--- branches/7.5.x/src/main/java/org/apache/jasper/compiler/SmapUtil.java 2015-02-13
15:57:42 UTC (rev 2593)
+++ branches/7.5.x/src/main/java/org/apache/jasper/compiler/SmapUtil.java 2015-02-20
09:07:58 UTC (rev 2594)
@@ -439,16 +439,23 @@
switch (tag) {
case 7 : // Class
case 8 : // String
+ case 16 : // MethodType
if (log.isDebugEnabled())
log.debug(i + " copying 2 bytes");
copy(2);
break;
+ case 15 : // MethodHandle
+ if (log.isDebugEnabled())
+ log.debug(i + " copying 3 bytes");
+ copy(3);
+ break;
case 9 : // Field
case 10 : // Method
case 11 : // InterfaceMethod
case 3 : // Integer
case 4 : // Float
case 12 : // NameAndType
+ case 18 : // InvokeDynamic
if (log.isDebugEnabled())
log.debug(i + " copying 4 bytes");
copy(4);
Show replies by date