You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/09/03 10:12:08 UTC

[GitHub] arusinha closed pull request #600: [NETBEANS-862] Added auto-complete support for var keyword in JDK-11 Lambda Parameters

arusinha closed pull request #600: [NETBEANS-862] Added auto-complete support for var keyword in JDK-11 Lambda Parameters
URL: https://github.com/apache/incubator-netbeans/pull/600
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/java.completion/src/org/netbeans/modules/java/completion/JavaCompletionTask.java b/java.completion/src/org/netbeans/modules/java/completion/JavaCompletionTask.java
index ccd90c80ec..5c6fdf72f1 100644
--- a/java.completion/src/org/netbeans/modules/java/completion/JavaCompletionTask.java
+++ b/java.completion/src/org/netbeans/modules/java/completion/JavaCompletionTask.java
@@ -232,17 +232,23 @@
     };
 
     private static final SourceVersion SOURCE_VERSION_RELEASE_10;
-
+    private static final SourceVersion SOURCE_VERSION_RELEASE_11;
     static {
-        SourceVersion r10;
+        SourceVersion r10, r11;
 
         try {
             r10 = SourceVersion.valueOf("RELEASE_10");
         } catch (IllegalArgumentException ex) {
             r10 = null;
         }
+        try {
+            r11 = SourceVersion.valueOf("RELEASE_11");
+        } catch (IllegalArgumentException ex) {
+            r11 = null;
+        }
 
         SOURCE_VERSION_RELEASE_10 = r10;
+        SOURCE_VERSION_RELEASE_11 = r11;
     }
 
     private final ItemFactory<T> itemFactory;
@@ -1903,6 +1909,10 @@ private void insideLambdaExpression(Env env) throws IOException {
                         addPrimitiveTypeKeywords(env);
                         addKeyword(env, FINAL_KEYWORD, SPACE, false);
                     }
+                    //Assuming first parameter to be var type if position for the parameter type is not found.
+                    else if (!let.getParameters().isEmpty()) {
+                        addVarTypeForLambdaParam(env);
+                    }
                     break;
             }
         }
@@ -2370,6 +2380,7 @@ private void insideParens(Env env) throws IOException {
             addLocalMembersAndVars(env);
             addTypes(env, EnumSet.of(CLASS, INTERFACE, ENUM, ANNOTATION_TYPE, TYPE_PARAMETER), null);
             addPrimitiveTypeKeywords(env);
+            addVarTypeForLambdaParam(env);
             addValueKeywords(env);
         } else {
             insideExpression(env, new TreePath(path, exp));
@@ -5868,4 +5879,29 @@ private boolean withinBounds(Env env, TypeMirror type, List<? extends TypeMirror
         }
         return true;
     }
+    
+    private void addVarTypeForLambdaParam(final Env env) throws IOException {
+        if (SOURCE_VERSION_RELEASE_11 == null || env.getController().getSourceVersion().compareTo(SOURCE_VERSION_RELEASE_11) < 0) {
+            return;
+        }
+
+        //Creating auto-complete 'var' item only for JDK-11 or above and if element is a functional interface.
+        final CompilationController controller = env.getController();
+        final Types types = controller.getTypes();
+        final Elements elements = controller.getElements();
+        Set<? extends TypeMirror> smartTypes = getSmartTypes(env);
+        if (smartTypes != null) {
+            for (TypeMirror st : smartTypes) {
+                if (st.getKind() == TypeKind.DECLARED) {
+                    final DeclaredType type = (DeclaredType) st;
+                    final TypeElement element = (TypeElement) type.asElement();
+
+                    if (elements.isFunctionalInterface(element)) {
+                        results.add(itemFactory.createKeywordItem(VAR_KEYWORD, SPACE, anchorOffset, false));
+                        break;
+                    }
+                }
+            }
+        }
+    }
 }
diff --git a/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/1.8/lambdaParameterTypesExcludingVar.pass b/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/1.8/lambdaParameterTypesExcludingVar.pass
new file mode 100644
index 0000000000..aaf5f477b8
--- /dev/null
+++ b/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/1.8/lambdaParameterTypesExcludingVar.pass
@@ -0,0 +1,109 @@
+boolean
+byte
+char
+double
+final
+float
+int
+long
+short
+AbstractMethodError
+Appendable
+ArithmeticException
+ArrayIndexOutOfBoundsException
+ArrayStoreException
+AssertionError
+AutoCloseable
+Boolean
+BootstrapMethodError
+Byte
+CharSequence
+Character
+Class
+ClassCastException
+ClassCircularityError
+ClassFormatError
+ClassLoader
+ClassNotFoundException
+ClassValue
+CloneNotSupportedException
+Cloneable
+Comparable
+Compiler
+Deprecated
+Double
+Enum
+EnumConstantNotPresentException
+Error
+Exception
+ExceptionInInitializerError
+Float
+Foo
+FunctionalInterface
+IllegalAccessError
+IllegalAccessException
+IllegalArgumentException
+IllegalMonitorStateException
+IllegalStateException
+IllegalThreadStateException
+IncompatibleClassChangeError
+IndexOutOfBoundsException
+InheritableThreadLocal
+InstantiationError
+InstantiationException
+Integer
+InternalError
+InterruptedException
+Iterable
+LinkageError
+Long
+Math
+NegativeArraySizeException
+NoClassDefFoundError
+NoSuchFieldError
+NoSuchFieldException
+NoSuchMethodError
+NoSuchMethodException
+NullPointerException
+Number
+NumberFormatException
+Object
+OutOfMemoryError
+Override
+Package
+Process
+ProcessBuilder
+Readable
+ReflectiveOperationException
+Runnable
+Runtime
+RuntimeException
+RuntimePermission
+SafeVarargs
+SecurityException
+SecurityManager
+Short
+StackOverflowError
+StackTraceElement
+StrictMath
+String
+StringBuffer
+StringBuilder
+StringIndexOutOfBoundsException
+SuppressWarnings
+System
+Test
+Thread
+ThreadDeath
+ThreadGroup
+ThreadLocal
+Throwable
+TypeNotPresentException
+UnknownError
+UnsatisfiedLinkError
+UnsupportedClassVersionError
+UnsupportedOperationException
+VerifyError
+VirtualMachineError
+Void
+java
diff --git a/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/1.8/lambdaParameterTypesIncludingVar.pass b/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/1.8/lambdaParameterTypesIncludingVar.pass
new file mode 100644
index 0000000000..dbc43c2a18
--- /dev/null
+++ b/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/1.8/lambdaParameterTypesIncludingVar.pass
@@ -0,0 +1,115 @@
+Foo
+String[] args
+public static void main(String[] args)
+boolean
+byte
+char
+double
+false
+float
+int
+long
+new
+null
+short
+true
+var
+AbstractMethodError
+Appendable
+ArithmeticException
+ArrayIndexOutOfBoundsException
+ArrayStoreException
+AssertionError
+AutoCloseable
+Boolean
+BootstrapMethodError
+Byte
+CharSequence
+Character
+Class
+ClassCastException
+ClassCircularityError
+ClassFormatError
+ClassLoader
+ClassNotFoundException
+ClassValue
+CloneNotSupportedException
+Cloneable
+Comparable
+Compiler
+Deprecated
+Double
+Enum
+EnumConstantNotPresentException
+Error
+Exception
+ExceptionInInitializerError
+Float
+FunctionalInterface
+IllegalAccessError
+IllegalAccessException
+IllegalArgumentException
+IllegalMonitorStateException
+IllegalStateException
+IllegalThreadStateException
+IncompatibleClassChangeError
+IndexOutOfBoundsException
+InheritableThreadLocal
+InstantiationError
+InstantiationException
+Integer
+InternalError
+InterruptedException
+Iterable
+LinkageError
+Long
+Math
+NegativeArraySizeException
+NoClassDefFoundError
+NoSuchFieldError
+NoSuchFieldException
+NoSuchMethodError
+NoSuchMethodException
+NullPointerException
+Number
+NumberFormatException
+Object
+OutOfMemoryError
+Override
+Package
+Process
+ProcessBuilder
+Readable
+ReflectiveOperationException
+Runnable
+Runtime
+RuntimeException
+RuntimePermission
+SafeVarargs
+SecurityException
+SecurityManager
+Short
+StackOverflowError
+StackTraceElement
+StrictMath
+String
+StringBuffer
+StringBuilder
+StringIndexOutOfBoundsException
+SuppressWarnings
+System
+Test
+Thread
+ThreadDeath
+ThreadGroup
+ThreadLocal
+Throwable
+TypeNotPresentException
+UnknownError
+UnsatisfiedLinkError
+UnsupportedClassVersionError
+UnsupportedOperationException
+VerifyError
+VirtualMachineError
+Void
+java
diff --git a/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/1.8/var.pass b/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/1.8/var.pass
new file mode 100644
index 0000000000..186857b9e8
--- /dev/null
+++ b/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/1.8/var.pass
@@ -0,0 +1 @@
+var
diff --git a/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/11/emptyVar.pass b/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/11/emptyVar.pass
new file mode 100644
index 0000000000..99c0d25b21
--- /dev/null
+++ b/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/11/emptyVar.pass
@@ -0,0 +1,137 @@
+int a
+boolean b
+protected native Object clone()
+public boolean equals(Object obj)
+protected void finalize()
+public final native Class<?> getClass()
+public native int hashCode()
+public final native void notify()
+public final native void notifyAll()
+public void op(int a, boolean b)
+public String toString()
+public final void wait()
+public final native void wait(long arg0)
+public final void wait(long timeout, int nanos)
+boolean
+byte
+char
+double
+false
+float
+int
+long
+new
+short
+super
+this
+true
+AbstractMethodError
+Appendable
+ArithmeticException
+ArrayIndexOutOfBoundsException
+ArrayStoreException
+AssertionError
+AutoCloseable
+Boolean
+BootstrapMethodError
+Byte
+CharSequence
+Character
+Class
+ClassCastException
+ClassCircularityError
+ClassFormatError
+ClassLoader
+ClassNotFoundException
+ClassValue
+CloneNotSupportedException
+Cloneable
+Comparable
+Compiler
+Deprecated
+Double
+Enum
+EnumConstantNotPresentException
+Error
+Exception
+ExceptionInInitializerError
+Float
+FunctionalInterface
+IllegalAccessError
+IllegalAccessException
+IllegalArgumentException
+IllegalCallerException
+IllegalMonitorStateException
+IllegalStateException
+IllegalThreadStateException
+IncompatibleClassChangeError
+IndexOutOfBoundsException
+InheritableThreadLocal
+InstantiationError
+InstantiationException
+Integer
+InternalError
+InterruptedException
+Iterable
+LayerInstantiationException
+LinkageError
+Long
+Math
+Module
+ModuleLayer
+NegativeArraySizeException
+NoClassDefFoundError
+NoSuchFieldError
+NoSuchFieldException
+NoSuchMethodError
+NoSuchMethodException
+NullPointerException
+Number
+NumberFormatException
+Object
+OutOfMemoryError
+Override
+Package
+Process
+ProcessBuilder
+ProcessHandle
+Readable
+ReflectiveOperationException
+Runnable
+Runtime
+RuntimeException
+RuntimePermission
+SafeVarargs
+SecurityException
+SecurityManager
+Short
+StackOverflowError
+StackTraceElement
+StackWalker
+StrictMath
+String
+StringBuffer
+StringBuilder
+StringIndexOutOfBoundsException
+SuppressWarnings
+System
+Test
+Thread
+ThreadDeath
+ThreadGroup
+ThreadLocal
+Throwable
+TypeNotPresentException
+UnknownError
+UnsatisfiedLinkError
+UnsupportedClassVersionError
+UnsupportedOperationException
+VerifyError
+VirtualMachineError
+Void
+com
+java
+javax
+netscape
+org
+sun
diff --git a/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/11/lambdaParameterTypesExcludingVar.pass b/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/11/lambdaParameterTypesExcludingVar.pass
new file mode 100644
index 0000000000..aaf5f477b8
--- /dev/null
+++ b/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/11/lambdaParameterTypesExcludingVar.pass
@@ -0,0 +1,109 @@
+boolean
+byte
+char
+double
+final
+float
+int
+long
+short
+AbstractMethodError
+Appendable
+ArithmeticException
+ArrayIndexOutOfBoundsException
+ArrayStoreException
+AssertionError
+AutoCloseable
+Boolean
+BootstrapMethodError
+Byte
+CharSequence
+Character
+Class
+ClassCastException
+ClassCircularityError
+ClassFormatError
+ClassLoader
+ClassNotFoundException
+ClassValue
+CloneNotSupportedException
+Cloneable
+Comparable
+Compiler
+Deprecated
+Double
+Enum
+EnumConstantNotPresentException
+Error
+Exception
+ExceptionInInitializerError
+Float
+Foo
+FunctionalInterface
+IllegalAccessError
+IllegalAccessException
+IllegalArgumentException
+IllegalMonitorStateException
+IllegalStateException
+IllegalThreadStateException
+IncompatibleClassChangeError
+IndexOutOfBoundsException
+InheritableThreadLocal
+InstantiationError
+InstantiationException
+Integer
+InternalError
+InterruptedException
+Iterable
+LinkageError
+Long
+Math
+NegativeArraySizeException
+NoClassDefFoundError
+NoSuchFieldError
+NoSuchFieldException
+NoSuchMethodError
+NoSuchMethodException
+NullPointerException
+Number
+NumberFormatException
+Object
+OutOfMemoryError
+Override
+Package
+Process
+ProcessBuilder
+Readable
+ReflectiveOperationException
+Runnable
+Runtime
+RuntimeException
+RuntimePermission
+SafeVarargs
+SecurityException
+SecurityManager
+Short
+StackOverflowError
+StackTraceElement
+StrictMath
+String
+StringBuffer
+StringBuilder
+StringIndexOutOfBoundsException
+SuppressWarnings
+System
+Test
+Thread
+ThreadDeath
+ThreadGroup
+ThreadLocal
+Throwable
+TypeNotPresentException
+UnknownError
+UnsatisfiedLinkError
+UnsupportedClassVersionError
+UnsupportedOperationException
+VerifyError
+VirtualMachineError
+Void
+java
diff --git a/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/11/lambdaParameterTypesIncludingVar.pass b/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/11/lambdaParameterTypesIncludingVar.pass
new file mode 100644
index 0000000000..dbc43c2a18
--- /dev/null
+++ b/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/11/lambdaParameterTypesIncludingVar.pass
@@ -0,0 +1,115 @@
+Foo
+String[] args
+public static void main(String[] args)
+boolean
+byte
+char
+double
+false
+float
+int
+long
+new
+null
+short
+true
+var
+AbstractMethodError
+Appendable
+ArithmeticException
+ArrayIndexOutOfBoundsException
+ArrayStoreException
+AssertionError
+AutoCloseable
+Boolean
+BootstrapMethodError
+Byte
+CharSequence
+Character
+Class
+ClassCastException
+ClassCircularityError
+ClassFormatError
+ClassLoader
+ClassNotFoundException
+ClassValue
+CloneNotSupportedException
+Cloneable
+Comparable
+Compiler
+Deprecated
+Double
+Enum
+EnumConstantNotPresentException
+Error
+Exception
+ExceptionInInitializerError
+Float
+FunctionalInterface
+IllegalAccessError
+IllegalAccessException
+IllegalArgumentException
+IllegalMonitorStateException
+IllegalStateException
+IllegalThreadStateException
+IncompatibleClassChangeError
+IndexOutOfBoundsException
+InheritableThreadLocal
+InstantiationError
+InstantiationException
+Integer
+InternalError
+InterruptedException
+Iterable
+LinkageError
+Long
+Math
+NegativeArraySizeException
+NoClassDefFoundError
+NoSuchFieldError
+NoSuchFieldException
+NoSuchMethodError
+NoSuchMethodException
+NullPointerException
+Number
+NumberFormatException
+Object
+OutOfMemoryError
+Override
+Package
+Process
+ProcessBuilder
+Readable
+ReflectiveOperationException
+Runnable
+Runtime
+RuntimeException
+RuntimePermission
+SafeVarargs
+SecurityException
+SecurityManager
+Short
+StackOverflowError
+StackTraceElement
+StrictMath
+String
+StringBuffer
+StringBuilder
+StringIndexOutOfBoundsException
+SuppressWarnings
+System
+Test
+Thread
+ThreadDeath
+ThreadGroup
+ThreadLocal
+Throwable
+TypeNotPresentException
+UnknownError
+UnsatisfiedLinkError
+UnsupportedClassVersionError
+UnsupportedOperationException
+VerifyError
+VirtualMachineError
+Void
+java
diff --git a/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/11/var.pass b/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/11/var.pass
new file mode 100644
index 0000000000..186857b9e8
--- /dev/null
+++ b/java.completion/test/unit/data/goldenfiles/org/netbeans/modules/java/completion/JavaCompletionTaskTest/11/var.pass
@@ -0,0 +1 @@
+var
diff --git a/java.completion/test/unit/data/org/netbeans/modules/java/completion/data/SimpleLambdaExpression2Start.java b/java.completion/test/unit/data/org/netbeans/modules/java/completion/data/SimpleLambdaExpression2Start.java
new file mode 100644
index 0000000000..30b4ee3b68
--- /dev/null
+++ b/java.completion/test/unit/data/org/netbeans/modules/java/completion/data/SimpleLambdaExpression2Start.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package test;
+
+public class Test {
+
+    interface Foo {
+        int op (String s, int i);
+    }
+
+    private void test(Foo f) {
+    }
+    
+    private void test2(String str, int num, Foo f) {
+    }
+    
+    public static void main(String[] args) {
+	Test t = new Test();
diff --git a/java.completion/test/unit/src/org/netbeans/modules/java/completion/JavaCompletionTask111FeaturesTest.java b/java.completion/test/unit/src/org/netbeans/modules/java/completion/JavaCompletionTask111FeaturesTest.java
new file mode 100644
index 0000000000..7caabedd9b
--- /dev/null
+++ b/java.completion/test/unit/src/org/netbeans/modules/java/completion/JavaCompletionTask111FeaturesTest.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.netbeans.modules.java.completion;
+
+import javax.lang.model.SourceVersion;
+import org.netbeans.junit.NbTestSuite;
+import org.netbeans.modules.java.source.parsing.JavacParser;
+
+/**
+ *
+ * @author arusinha
+ */
+public class JavaCompletionTask111FeaturesTest extends CompletionTestBase {
+
+    //Todo: Verification is pending on nb-javac of JDK11
+    public JavaCompletionTask111FeaturesTest(String testName) {
+        super(testName);
+    }
+
+    public static NbTestSuite suite() {
+        NbTestSuite suite = new NbTestSuite();
+        try {
+            SourceVersion.valueOf("RELEASE_11");
+            suite.addTestSuite(JavaCompletionTask111FeaturesTest.class);
+        } catch (IllegalArgumentException ex) {
+            //OK, no RELEASE_11, skip tests
+            suite.addTest(new JavaCompletionTask111FeaturesTest("noop"));
+        }
+        return suite;
+    }
+
+    // JDK-1.11 lambda expressions var param type support tests ---------------------------------------
+    public void testEmptyFileAfterTypingLambdaParam() throws Exception {
+        performTest("SimpleLambdaExpression2Start", 1060, "t.test((s ", "empty.pass", "1.11");
+    }
+
+    public void testEmptyFileAfterTypingTypeOfLambdaParam() throws Exception {
+        performTest("SimpleLambdaExpression2Start", 1060, "t.test((String ", "stringVarName.pass", "1.11");
+    }
+
+    public void testFirstLambdaParam() throws Exception {
+        performTest("SimpleLambdaExpression2Start", 1066, "t.test((", "lambdaParameterTypesIncludingVar.pass", "1.11");
+    }
+
+    public void testSecondLambdaParam1() throws Exception {
+        performTest("SimpleLambdaExpression2Start", 1060, "t.test((s,", "empty.pass", "1.11");
+    }
+
+    public void testSecondLambdaParam2() throws Exception {
+        performTest("SimpleLambdaExpression2Start", 1060, "t.test((String s,", "lambdaParameterTypesExcludingVar.pass", "1.11");
+    }
+
+    public void testSecondLambdaParam3() throws Exception {
+        performTest("SimpleLambdaExpression2Start", 1060, "t.test((var s,", "var.pass", "1.11");
+    }
+
+    public void testSecondLambdaParam4() throws Exception {
+        performTest("SimpleLambdaExpression2Start", 1068, "t.test2( \"hello\",2,( var s,", "var.pass", "1.11");
+    }
+
+    public void testSecondLambdaParam5() throws Exception {
+        performTest("SimpleLambdaExpression2Start", 1068, "t.test2( \"hello\",2,( String s,", "lambdaParameterTypesExcludingVar.pass", "1.11");
+    }
+
+    public void noop() {
+    }
+
+    static {
+        JavacParser.DISABLE_SOURCE_LEVEL_DOWNGRADE = true;
+    }
+}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists