This is an automated email from the ASF dual-hosted git repository.

sdedic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new c43c903  NETBEANS-1049: prevent NPE on unpersistable components (#638)
c43c903 is described below

commit c43c9033f11952f73971ae4b1534b94883edef00
Author: Svatopluk Dedic <svatopluk.de...@oracle.com>
AuthorDate: Thu Jul 19 21:09:06 2018 +0200

    NETBEANS-1049: prevent NPE on unpersistable components (#638)
---
 .../src/org/netbeans/core/windows/documentgroup/GroupsManager.java  | 6 ++++++
 1 file changed, 6 insertions(+)

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 2e026c8..180db3c 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 @@ public class GroupsManager {
             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 ) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to