From c129e89e7905c9e909ff1835a06b6d522f972375 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Wed, 9 Aug 2006 09:42:46 +0000 Subject: [PATCH] Workaround bug 153253 - NPE when importing connection-private filters The bug used to stop the entire process of restoring connections. With the workaround, only the filter is missed, but the rest is imported correctly. It might be a good idea to put similar try..catch constructs around all critical parts of the importer, in order to shield problems in some connections from others connections. --- .../rse/internal/persistence/dom/RSEDOMImporter.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java index 3ddcdd4fa78..22f707da523 100644 --- a/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java +++ b/rse/plugins/org.eclipse.rse.ui/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java @@ -483,7 +483,13 @@ public class RSEDOMImporter implements IRSEDOMImporter if (filterPool != null) { filterPoolReference = referenceManager.addReferenceToSystemFilterPool(filterPool); } else { - filterPoolReference = referenceManager.addReferenceToSystemFilterPool(filterPoolManager, filterPoolName); + try { + filterPoolReference = referenceManager.addReferenceToSystemFilterPool(filterPoolManager, filterPoolName); + } catch(NullPointerException e) { + //TODO Workaround for bug 153253 -- should be fixed properly + System.err.println("TODO: Fix bug 153253 - NPE reading connection-private filter pools"); + e.printStackTrace(); + } } } return filterPoolReference;