eirikbakke commented on code in PR #8171:
URL: https://github.com/apache/netbeans/pull/8171#discussion_r1921890618
##########
ide/projectui/src/org/netbeans/modules/project/ui/ProjectUtilities.java:
##########
@@ -135,28 +130,25 @@ private void doClose(Project[] projects, boolean
notifyUI, Wrapper wr) {
if (dobj != null) {
FileObject fobj = dobj.getPrimaryFile();
Project owner =
ProjectConvertors.getNonConvertorOwner(fobj);
- ERR.log(Level.FINER, "Found {0} owned by {1} in {2} of
{3}", new Object[] {fobj, owner, tc.getName(), tc.getClass()});
+ LOG.log(Level.FINER, "Found {0} owned by {1} in {2} of
{3}", new Object[] {fobj, owner, tc.getName(), tc.getClass()});
- if (listOfProjects.contains(owner)) {
+ if (owner != null && listOfProjects.contains(owner)) {
if (notifyUI) {
openFiles.add(dobj);
tc2close.add(tc);
} else if (!dobj.isModified()) {
// when not called from UI, only include TCs that
arenot modified
tc2close.add(tc);
}
- //#235897 split a single line to detect NPE better
Review Comment:
I guess you may have found the NPE they were search for 12 years ago in
https://bz.apache.org/netbeans/show_bug.cgi?id=235897 ...
--
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