neilcsmith-net commented on code in PR #4414:
URL: https://github.com/apache/netbeans/pull/4414#discussion_r926400619
##########
java/java.source.base/src/org/netbeans/modules/java/source/parsing/PatchModuleFileManager.java:
##########
@@ -296,7 +296,8 @@ public FileObject getFileForOutput(Location location,
String packageName, String
private Location fixLocation(Location input) throws IOException {
if (input == StandardLocation.CLASS_OUTPUT && overrideModuleName !=
null) {
- return this.moduleLocations.stream().filter(pl ->
overrideModuleName.equals(pl.getModuleName())).map(pl -> (Location)
pl).findAny().orElse(input);
+ return moduleLocations(StandardLocation.PATCH_MODULE_PATH)
+ .stream().filter(pl ->
overrideModuleName.equals(pl.getModuleName())).map(pl -> (Location)
pl).findAny().orElse(input);
Review Comment:
Got to be faster than you sometime! :smile: I kept the fix minimal but had
similar thoughts wondering why that method takes the location. Mind you
`moduleLocations()` would be fine - no need for `get` on everything!
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
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