Skip to content
This repository was archived by the owner on Aug 17, 2018. It is now read-only.

Commit 13e8109

Browse files
author
Kin Man Chung
committed
Issue JSP-21: Add options to disable jsr199, even with JDK6
svn path=/trunk/; revision=1386
1 parent 98ec251 commit 13e8109

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

impl/src/main/java/org/apache/jasper/compiler/Compiler.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,9 +737,12 @@ public void removeGeneratedClassFiles() {
737737
* The default is to use javac from ant.
738738
*/
739739
private void initJavaCompiler() throws JasperException {
740+
boolean disablejsr199 = Boolean.TRUE.toString().equals(
741+
System.getProperty("org.apache.jasper.compiler.disablejsr199"));
740742
Double version =
741743
Double.valueOf(System.getProperty("java.specification.version"));
742-
if (version >= 1.6 || getClassFor("javax.tools.Tool") != null) {
744+
if (!disablejsr199 &&
745+
(version >= 1.6 || getClassFor("javax.tools.Tool") != null)) {
743746
// JDK 6 or bundled with jsr199 compiler
744747
javaCompiler = new Jsr199JavaCompiler();
745748
} else {

0 commit comments

Comments
 (0)