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/07/19 19:09:07 UTC

[GitHub] sdedic closed pull request #638: NETBEANS-1049: prevent NPE on unpersistable components

sdedic closed pull request #638: NETBEANS-1049: prevent NPE on unpersistable components
URL: https://github.com/apache/incubator-netbeans/pull/638
 
 
   

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/core.windows/src/org/netbeans/core/windows/documentgroup/GroupsManager.java b/core.windows/src/org/netbeans/core/windows/documentgroup/GroupsManager.java
index 2e026c8ec..180db3ced 100644
--- a/core.windows/src/org/netbeans/core/windows/documentgroup/GroupsManager.java
+++ b/core.windows/src/org/netbeans/core/windows/documentgroup/GroupsManager.java
@@ -348,7 +348,13 @@ boolean closeGroup(DocumentGroupImpl group) {
             String id = wmi.findTopComponentID(tc);
             if( tc.equals(welcomeTc) && !welcomeWasOpened )
                 continue;
+            if (tc.getPersistenceType() == TopComponent.PERSISTENCE_NEVER) {
+                continue;
+            }
             FileObject tcFO = FileUtil.toFileObject(new File(componentRoot, id + "." + SETTINGS)); //NOI18N //NOI18N
+            if (tcFO == null) {
+                continue;
+            }
             try {
                 tcFO.copy(groupFO, id, SETTINGS);
             } catch( IOException ex ) {


 

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