From 947ad18c5024c83327840916d61ceb623e655d78 Mon Sep 17 00:00:00 2001 From: David McKnight Date: Tue, 15 May 2012 15:03:05 +0000 Subject: [PATCH] [376738] PropertyFileProvider should catch exceptions in care a written profile was corrupted --- .../internal/persistence/PropertyFileProvider.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PropertyFileProvider.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PropertyFileProvider.java index 238011efc5b..e2e55c0d434 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PropertyFileProvider.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/PropertyFileProvider.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2006, 2008 IBM Corporation and others. All rights reserved. + * Copyright (c) 2006, 2012 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -16,6 +16,7 @@ * David Dykstal (IBM) - [189274] provide import and export operations for profiles * David Dykstal (IBM) - [225988] need API to mark persisted profiles as migrated * David Dykstal (IBM) - [252357] made nested property sets and properties embedded nodes in the persistent form + * David McKnight (IBM)- [376738] PropertyFileProvider should catch exceptions in care a written profile was corrupted ********************************************************************************/ package org.eclipse.rse.internal.persistence; @@ -795,7 +796,13 @@ public class PropertyFileProvider implements IRSEPersistenceProvider, IRSEImport for (Iterator z = childNames.iterator(); z.hasNext();) { String childName = (String) z.next(); Properties p = getProperties(childPropertiesMap, childName); - makeNode(node, location, p, monitor); + try { + makeNode(node, location, p, monitor); + } + catch (Exception e){ + // minimize impact of unexpected exception + logException(e); + } } for (Iterator z = referenceKeys.iterator(); z.hasNext();) { String key = (String) z.next();