Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Java 8 #6

Open
rgrigoryev opened this issue Nov 14, 2015 · 5 comments
Open

Support Java 8 #6

rgrigoryev opened this issue Nov 14, 2015 · 5 comments

Comments

@rgrigoryev
Copy link

I try to use @Multiline on Java 8 building with gradle and 'net.sf.gapt' plugin, but see in logs following:

warning: No SupportedSourceVersion annotation found on org.adrianwalker.multilinestring.MultilineProcessor, returning RELEASE_6.
warning: Supported source version 'RELEASE_6' from annotation processor 'org.adrianwalker.multilinestring.MultilineProcessor' less than -source '1.8'

Do you have plans about supporting Java 8?

@peterkittreilly
Copy link

Those warning messages are benign, i.e. multiline works with Java 8 (Mightly!) , but should be be removed.

@peterkittreilly
Copy link

I have figured out how to suppress the Warnings. Apply this patch:

preilly@localhost:~/git/external/multiline/multiline-string (master)$ cat diff.patch
diff --git a/multiline-string/src/main/java/org/adrianwalker/multilinestring/JavacMultilineProcessor.java b/multiline-string/src/main/java/org/adrianwalker/multilinestring/JavacMultilineProcessor.java
index b821e65..5418da2 100644
--- a/multiline-string/src/main/java/org/adrianwalker/multilinestring/JavacMultilineProcessor.java
+++ b/multiline-string/src/main/java/org/adrianwalker/multilinestring/JavacMultilineProcessor.java
@@ -6,7 +6,6 @@ import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.ProcessingEnvironment;
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.TypeElement;
@@ -21,7 +20,11 @@ public final class JavacMultilineProcessor extends AbstractProcessor {

    private JavacElements elementUtils;
    private TreeMaker maker;
  •   @Override public SourceVersion getSupportedSourceVersion() {
    
  •           return SourceVersion.latest();
    
  •   }
    
    • @OverRide
      public void init(final ProcessingEnvironment procEnv) {
      super.init(procEnv);

@peterkittreilly
Copy link

preilly@localhost:~/git/external/multiline/multiline-string (master)$ cat diff.patch 
diff --git a/multiline-string/src/main/java/org/adrianwalker/multilinestring/JavacMultilineProcessor.java b/multiline-string/src/main/java/org/adrianwalker/multilinestring/JavacMultilineProcessor.java
index b821e65..5418da2 100644
--- a/multiline-string/src/main/java/org/adrianwalker/multilinestring/JavacMultilineProcessor.java
+++ b/multiline-string/src/main/java/org/adrianwalker/multilinestring/JavacMultilineProcessor.java
@@ -6,7 +6,6 @@ import javax.annotation.processing.AbstractProcessor;
 import javax.annotation.processing.ProcessingEnvironment;
 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.TypeElement;
@@ -21,7 +20,11 @@ public final class JavacMultilineProcessor extends AbstractProcessor {

        private JavacElements elementUtils;
        private TreeMaker maker;
-  
+
+       @Override public SourceVersion getSupportedSourceVersion() {
+               return SourceVersion.latest();
+       }
+
        @Override
        public void init(final ProcessingEnvironment procEnv) {
                super.init(procEnv);

@rgrigoryev
Copy link
Author

@peterkittreilly It will be better if you provide a pull request.
@benelog Do you accept pull requests?

@benelog
Copy link
Owner

benelog commented Mar 31, 2016

@rgrigoryev @rgrigoryev
If you send a pull request, I will accept it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants