This is an automated email from the ASF dual-hosted git repository. mklaehn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git
commit 6ac6d66fdc75b21b587f575f0d4c074954af6264 Author: Martin Klähn <[email protected]> AuthorDate: Sat Nov 30 21:16:44 2019 +0100 [NETBEANS-3501] converted the call into a lambda --- groovy/groovy.editor/nbproject/project.properties | 2 +- .../modules/groovy/editor/compiler/ClassNodeCache.java | 18 +++--------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/groovy/groovy.editor/nbproject/project.properties b/groovy/groovy.editor/nbproject/project.properties index a9b3566..003191f 100644 --- a/groovy/groovy.editor/nbproject/project.properties +++ b/groovy/groovy.editor/nbproject/project.properties @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. javac.compilerargs=-Xlint -Xlint:-serial -javac.source=1.7 +javac.source=1.8 nbm.homepage=http://wiki.netbeans.org/groovy nbm.module.author=Martin Adamek, Petr Hejl, Matthias Schmidt, Martin Janicek diff --git a/groovy/groovy.editor/src/org/netbeans/modules/groovy/editor/compiler/ClassNodeCache.java b/groovy/groovy.editor/src/org/netbeans/modules/groovy/editor/compiler/ClassNodeCache.java index 6b364dc..79599a3 100644 --- a/groovy/groovy.editor/src/org/netbeans/modules/groovy/editor/compiler/ClassNodeCache.java +++ b/groovy/groovy.editor/src/org/netbeans/modules/groovy/editor/compiler/ClassNodeCache.java @@ -22,7 +22,6 @@ import groovy.lang.GroovyClassLoader; import groovy.lang.GroovyResourceLoader; import java.lang.ref.Reference; import java.lang.ref.SoftReference; -import java.net.MalformedURLException; import java.net.URL; import java.security.AccessController; import java.security.PrivilegedAction; @@ -303,20 +302,9 @@ public final class ClassNodeCache { private final ClassNodeCache cache; - private final GroovyResourceLoader resourceLoader = new GroovyResourceLoader() { - - @Override - public URL loadGroovySource(final String filename) throws MalformedURLException { - URL file = AccessController.doPrivileged(new PrivilegedAction<URL>() { - - @Override - public URL run() { - return getSourceFile(filename); - } - }); - return file; - } - }; + private final GroovyResourceLoader resourceLoader + = (String filename) -> AccessController.doPrivileged( + (PrivilegedAction<URL>) () -> getSourceFile(filename)); public ParsingClassLoader( @NonNull ClassPath path, --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
