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/12/11 21:00:58 UTC
[GitHub] jlahoda closed pull request #1014: [NETBEANS-1352][NETBEANS-586] Filter out non-Java files before passin…
jlahoda closed pull request #1014: [NETBEANS-1352][NETBEANS-586] Filter out non-Java files before passin…
URL: https://github.com/apache/incubator-netbeans/pull/1014
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/java.source.base/src/org/netbeans/modules/java/source/parsing/JavacParser.java b/java/java.source.base/src/org/netbeans/modules/java/source/parsing/JavacParser.java
index 0efb0f5c4a..61b430608b 100644
--- a/java/java.source.base/src/org/netbeans/modules/java/source/parsing/JavacParser.java
+++ b/java/java.source.base/src/org/netbeans/modules/java/source/parsing/JavacParser.java
@@ -59,6 +59,7 @@
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Collectors;
+import java.util.stream.StreamSupport;
import javax.annotation.processing.Processor;
import javax.swing.event.ChangeEvent;
@@ -872,6 +873,11 @@ private static JavacTaskImpl createJavacTask(
options.add(additionalModules.stream().collect(Collectors.joining(","))); //NOI18N
}
+ //filter out classfiles:
+ files = StreamSupport.stream(files.spliterator(), false)
+ .filter(file -> file.getKind() == Kind.SOURCE)
+ .collect(Collectors.toList());
+
Context context = new Context();
//need to preregister the Messages here, because the getTask below requires Log instance:
NBMessager.preRegister(context, null, DEV_NULL, DEV_NULL, DEV_NULL);
----------------------------------------------------------------
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