logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattsic...@apache.org
Subject svn commit: r1607509 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/processor/PluginProcessor.java
Date Thu, 03 Jul 2014 01:31:50 GMT
Author: mattsicker
Date: Thu Jul  3 01:31:49 2014
New Revision: 1607509

URL: http://svn.apache.org/r1607509
Log:
Use latest Java release for supported version in annotation processor.

  - Fixes LOG4J2-683.
  - Since we're extending the version 6 visitor classes, we should be fine in newer Java versions
(tested in Java 1.8, no problems).

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/processor/PluginProcessor.java

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/processor/PluginProcessor.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/processor/PluginProcessor.java?rev=1607509&r1=1607508&r2=1607509&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/processor/PluginProcessor.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/processor/PluginProcessor.java
Thu Jul  3 01:31:49 2014
@@ -28,7 +28,6 @@ import java.util.concurrent.ConcurrentMa
 import javax.annotation.processing.AbstractProcessor;
 import javax.annotation.processing.RoundEnvironment;
 import javax.annotation.processing.SupportedAnnotationTypes;
-import javax.annotation.processing.SupportedSourceVersion;
 import javax.lang.model.SourceVersion;
 import javax.lang.model.element.Element;
 import javax.lang.model.element.ElementVisitor;
@@ -47,7 +46,6 @@ import org.apache.logging.log4j.util.Str
  * Annotation processor for pre-scanning Log4j 2 plugins.
  */
 @SupportedAnnotationTypes("org.apache.logging.log4j.core.config.plugins.*")
-@SupportedSourceVersion(SourceVersion.RELEASE_6)
 public class PluginProcessor extends AbstractProcessor {
 
     // TODO: this could be made more abstract to allow for compile-time and run-time plugin
processing
@@ -61,6 +59,11 @@ public class PluginProcessor extends Abs
     private final PluginCache pluginCache = new PluginCache();
 
     @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+
+    @Override
     public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment
roundEnv) {
         try {
             final Set<? extends Element> elements = roundEnv.getElementsAnnotatedWith(Plugin.class);



Mime
View raw message