You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:21:31 UTC

[sling-org-apache-sling-commons-compiler] 11/17: Use available constants.

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.commons.compiler-2.2.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-compiler.git

commit 6eba2614ebb711029d496e10e1d18fad39756801
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri May 2 15:39:56 2014 +0000

    Use available constants.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/commons/compiler@1591952 13f79535-47bb-0310-9956-ffa450edef68
---
 .../sling/commons/compiler/impl/EclipseJavaCompiler.java   | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/main/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java b/src/main/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java
index 5574e48..b969f26 100644
--- a/src/main/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java
+++ b/src/main/java/org/apache/sling/commons/compiler/impl/EclipseJavaCompiler.java
@@ -194,18 +194,18 @@ public class EclipseJavaCompiler implements JavaCompiler {
         // create properties for the settings object
         final Map<String, String> props = new HashMap<String, String>();
         if (options.isGenerateDebugInfo()) {
-            props.put("org.eclipse.jdt.core.compiler.debug.localVariable", "generate");
-            props.put("org.eclipse.jdt.core.compiler.debug.lineNumber", "generate");
-            props.put("org.eclipse.jdt.core.compiler.debug.sourceFile", "generate");
+            props.put(CompilerOptions.OPTION_LocalVariableAttribute, "generate");
+            props.put(CompilerOptions.OPTION_LineNumberAttribute, "generate");
+            props.put(CompilerOptions.OPTION_SourceFileAttribute, "generate");
         }
         if (options.getSourceVersion() != null) {
-            props.put("org.eclipse.jdt.core.compiler.source", options.getSourceVersion());
-            props.put("org.eclipse.jdt.core.compiler.compliance", options.getSourceVersion());
+            props.put(CompilerOptions.OPTION_Source, options.getSourceVersion());
+            props.put(CompilerOptions.OPTION_Compliance, options.getSourceVersion());
         }
         if (options.getTargetVersion() != null) {
-            props.put("org.eclipse.jdt.core.compiler.codegen.targetPlatform", options.getTargetVersion());
+            props.put(CompilerOptions.OPTION_TargetPlatform, options.getTargetVersion());
         }
-        props.put("org.eclipse.jdt.core.encoding", "UTF8");
+        props.put(CompilerOptions.OPTION_Encoding, "UTF8");
 
         // create the settings
         final CompilerOptions settings = new CompilerOptions(props);

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.