mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 02:36:01 +02:00
Fix for [Bug 199222] An internal error occurred during: "CDT Startup"
This commit is contained in:
parent
573b065d33
commit
30da93f082
1 changed files with 34 additions and 28 deletions
|
@ -187,21 +187,23 @@ public class PropertyManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Properties getPropsFromData(Map data, IBuildObject bo){
|
protected Properties getPropsFromData(Map data, IBuildObject bo){
|
||||||
Object oVal = data.get(bo.getId());
|
synchronized (data) {
|
||||||
Properties props = null;
|
Object oVal = data.get(bo.getId());
|
||||||
if(oVal instanceof String){
|
Properties props = null;
|
||||||
props = stringToProps((String)oVal);
|
if(oVal instanceof String){
|
||||||
data.put(bo.getId(), props);
|
props = stringToProps((String)oVal);
|
||||||
} else if (oVal instanceof Properties){
|
data.put(bo.getId(), props);
|
||||||
props = (Properties)oVal;
|
} else if (oVal instanceof Properties){
|
||||||
}
|
props = (Properties)oVal;
|
||||||
|
}
|
||||||
|
|
||||||
if(props == null){
|
if(props == null){
|
||||||
props = new Properties();
|
props = new Properties();
|
||||||
data.put(bo.getId(), props);
|
data.put(bo.getId(), props);
|
||||||
}
|
}
|
||||||
|
|
||||||
return props;
|
return props;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -214,21 +216,25 @@ public class PropertyManager {
|
||||||
|
|
||||||
protected Properties mapToProps(Map map){
|
protected Properties mapToProps(Map map){
|
||||||
Properties props = null;
|
Properties props = null;
|
||||||
if(map != null && map.size() > 0){
|
if(map != null){
|
||||||
props = new Properties();
|
synchronized(map){
|
||||||
for(Iterator iter = map.entrySet().iterator(); iter.hasNext();){
|
if(map.size() > 0){
|
||||||
Map.Entry entry = (Map.Entry)iter.next();
|
props = new Properties();
|
||||||
String key = (String)entry.getKey();
|
for(Iterator iter = map.entrySet().iterator(); iter.hasNext();){
|
||||||
String value = null;
|
Map.Entry entry = (Map.Entry)iter.next();
|
||||||
Object oVal = entry.getValue();
|
String key = (String)entry.getKey();
|
||||||
if(oVal instanceof Properties){
|
String value = null;
|
||||||
value = propsToString((Properties)oVal);
|
Object oVal = entry.getValue();
|
||||||
} else if (oVal instanceof String){
|
if(oVal instanceof Properties){
|
||||||
value = (String)oVal;
|
value = propsToString((Properties)oVal);
|
||||||
}
|
} else if (oVal instanceof String){
|
||||||
|
value = (String)oVal;
|
||||||
|
}
|
||||||
|
|
||||||
if(key != null && value != null)
|
if(key != null && value != null)
|
||||||
props.setProperty(key, value);
|
props.setProperty(key, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue