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 2020/10/18 10:24:32 UTC

[GitHub] [netbeans] jlahoda commented on a change in pull request #2468: Annotation processors may generate class files:

jlahoda commented on a change in pull request #2468:
URL: https://github.com/apache/netbeans/pull/2468#discussion_r507081186



##########
File path: java/java.source.base/src/org/netbeans/modules/java/source/parsing/OutputFileManager.java
##########
@@ -116,22 +114,28 @@ public OutputFileManager(
             File activeRoot = getClassFolderForSource(l, sibling, baseName);
             if (activeRoot == null) {
                 activeRoot = getClassFolderForApt(l, sibling, baseName);
+            }
+            if (activeRoot == null && siblings.hasSibling()) {

Review comment:
       This is the meat of the fix - the above attempts to compute the target class folder might have failed, because, if sibling is null, it will try to find the original source root based on "baseName" - but if the newly generated classfile's name does not correspond to any source file (which is valid, of course), this search fails. So adding a new layer, using the "siblings" utility.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
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