mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-05 16:15:25 +02:00
[391132] filterpools don't persist when profile names end in _
This commit is contained in:
parent
c4b97e28ba
commit
5cb12a9750
2 changed files with 32 additions and 17 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2011 IBM Corporation and others.
|
||||
* Copyright (c) 2002, 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
|
||||
|
@ -19,6 +19,7 @@
|
|||
* David Dykstal (IBM) - [192122] extended search to look for filter pools in
|
||||
* profile during getReferencedFilterPool() rather than returning broken reference
|
||||
* David McKnight (IBM) - [358999] Deleting multiple connections takes long time
|
||||
* David McKnight (IBM) -[391132] filterpools don't persist when profile names end in _
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.core.filters;
|
||||
|
@ -116,10 +117,17 @@ public class SystemFilterPoolReference extends SystemPersistableReferencingObjec
|
|||
* The filter pool manager name is the same as its owning profile.
|
||||
*/
|
||||
String savedName = getReferencedObjectName();
|
||||
String[] parts = savedName.split(DELIMITER, 2);
|
||||
String result = parts[0];
|
||||
if (parts.length == 2) {
|
||||
result = parts[1];
|
||||
String result = null;
|
||||
int lastDelim = savedName.lastIndexOf(DELIMITER);
|
||||
if (lastDelim > 0){
|
||||
result = savedName.substring(lastDelim + DELIMITER_LENGTH);
|
||||
}
|
||||
else {
|
||||
String[] parts = savedName.split(DELIMITER, 2);
|
||||
result = parts[0];
|
||||
if (parts.length == 2) {
|
||||
result = parts[1];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -135,16 +143,22 @@ public class SystemFilterPoolReference extends SystemPersistableReferencingObjec
|
|||
* The filter pool manager name is the same as its owning profile.
|
||||
*/
|
||||
String result = null;
|
||||
String savedName = getReferencedObjectName();
|
||||
String[] parts = savedName.split(DELIMITER, 2);
|
||||
if (parts.length == 2) {
|
||||
result = parts[0];
|
||||
} else {
|
||||
ISystemFilterPoolReferenceManagerProvider provider = getProvider();
|
||||
if (provider instanceof ISubSystem) {
|
||||
ISubSystem subsystem = (ISubSystem) provider;
|
||||
ISystemProfile profile = subsystem.getSystemProfile();
|
||||
result = profile.getName();
|
||||
String savedName = getReferencedObjectName();
|
||||
int lastDelim = savedName.lastIndexOf(DELIMITER);
|
||||
if (lastDelim > 0){
|
||||
result = savedName.substring(0, lastDelim);
|
||||
}
|
||||
else {
|
||||
String[] parts = savedName.split(DELIMITER, 2);
|
||||
if (parts.length == 2) {
|
||||
result = parts[0];
|
||||
} else {
|
||||
ISystemFilterPoolReferenceManagerProvider provider = getProvider();
|
||||
if (provider instanceof ISubSystem) {
|
||||
ISubSystem subsystem = (ISubSystem) provider;
|
||||
ISystemProfile profile = subsystem.getSystemProfile();
|
||||
result = profile.getName();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (result == null) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006, 2009 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
|
||||
|
@ -27,6 +27,7 @@
|
|||
* David McKnight (IBM) - [267052] need to be able to create subsystems-after-the-fact
|
||||
* David McKnight (IBM) - [271243] [files] Switching service type brings up TWO file subsystems after restart
|
||||
* Uwe Stieber (Wind River) - [283844] NPE on restoring property set if persistent data is corrupted
|
||||
* David McKnight (IBM) -[391132] filterpools don't persist when profile names end in _
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.persistence.dom;
|
||||
|
@ -516,9 +517,9 @@ public class RSEDOMImporter {
|
|||
ISystemProfile profile = subsystem.getSystemProfile();
|
||||
String profileName = profile.getName();
|
||||
String baseFilterPoolName = filterPoolName;
|
||||
filterPoolName = filterPoolName.substring(profileName.length()); // in case there's an underscore in the profile name
|
||||
String[] part = filterPoolName.split("___", 2); //$NON-NLS-1$
|
||||
if (part.length == 2) { // name is qualified and refers to a filter pool in a specific profile
|
||||
profileName = part[0];
|
||||
baseFilterPoolName = part[1];
|
||||
}
|
||||
// special processing for host owned pool references
|
||||
|
|
Loading…
Add table
Reference in a new issue