mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
@@ -51,15 +51,13 @@ public class JDOMExternalizer {
|
||||
}
|
||||
|
||||
public static int readInteger(Element root, String name, int defaultValue) {
|
||||
String v = readString(root, name);
|
||||
return v == null ? defaultValue : StringUtilRt.parseInt(v, defaultValue);
|
||||
return StringUtilRt.parseInt(readString(root, name), defaultValue);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static String readString(@NonNls Element root, @NonNls String name) {
|
||||
for (Element element : root.getChildren("setting")) {
|
||||
String childName = element.getAttributeValue("name");
|
||||
if (Comparing.strEqual(childName, name)) {
|
||||
if (Comparing.strEqual(element.getAttributeValue("name"), name)) {
|
||||
return element.getAttributeValue("value");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user