[jboss-svn-commits] JBL Code SVN: r38159 - labs/jbossrules/soa_tags/BRMS-5.1-GA-JBPAPP-8915/drools-compiler/src/main/java/org/drools/rule/builder/dialect/java.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Aug 2 00:18:55 EDT 2012


Author: alessandrolt
Date: 2012-08-02 00:18:46 -0400 (Thu, 02 Aug 2012)
New Revision: 38159

Modified:
   labs/jbossrules/soa_tags/BRMS-5.1-GA-JBPAPP-8915/drools-compiler/src/main/java/org/drools/rule/builder/dialect/java/JavaDialectConfiguration.java
Log:
JBPAPP-8915 adding support to java7

Modified: labs/jbossrules/soa_tags/BRMS-5.1-GA-JBPAPP-8915/drools-compiler/src/main/java/org/drools/rule/builder/dialect/java/JavaDialectConfiguration.java
===================================================================
--- labs/jbossrules/soa_tags/BRMS-5.1-GA-JBPAPP-8915/drools-compiler/src/main/java/org/drools/rule/builder/dialect/java/JavaDialectConfiguration.java	2012-08-02 03:18:49 UTC (rev 38158)
+++ labs/jbossrules/soa_tags/BRMS-5.1-GA-JBPAPP-8915/drools-compiler/src/main/java/org/drools/rule/builder/dialect/java/JavaDialectConfiguration.java	2012-08-02 04:18:46 UTC (rev 38159)
@@ -30,7 +30,6 @@
  * just Janino sa the compiler you must either overload the compiler property before 
  * instantiating this class or the PackageBuilder, or make sure Eclipse is in the 
  * classpath, as Eclipse is the default.
- *
  */
 public class JavaDialectConfiguration
     implements
@@ -38,7 +37,7 @@
     public static final int             ECLIPSE         = 0;
     public static final int             JANINO          = 1;
 
-    public static final String[]        LANGUAGE_LEVELS = new String[]{"1.5", "1.6"};
+    public static final String[]        LANGUAGE_LEVELS = new String[]{"1.5", "1.6", "1.7"};
 
     private String                      languageLevel;
 
@@ -52,7 +51,7 @@
     public void init(final PackageBuilderConfiguration conf) {
         this.conf = conf;
 
-        setCompiler( getDefaultCompiler() );        
+        setCompiler( getDefaultCompiler() );
         
         setJavaLanguageLevel( getDefaultLanguageLevel() );
     }
@@ -89,13 +88,13 @@
         // check that the jar for the specified compiler are present
         if ( compiler == ECLIPSE ) {
             try {
-            	Class.forName( "org.eclipse.jdt.internal.compiler.Compiler", true, this.conf.getClassLoader() );
+                Class.forName( "org.eclipse.jdt.internal.compiler.Compiler", true, this.conf.getClassLoader() );
             } catch ( ClassNotFoundException e ) {
                 throw new RuntimeException( "The Eclipse JDT Core jar is not in the classpath" );
             }
         } else if ( compiler == JANINO ){
             try {
-            	Class.forName( "org.codehaus.janino.Parser", true, this.conf.getClassLoader() );
+                Class.forName( "org.codehaus.janino.Parser", true, this.conf.getClassLoader() );
             } catch ( ClassNotFoundException e ) {
                 throw new RuntimeException( "The Janino jar is not in the classpath" );
             }



More information about the jboss-svn-commits mailing list