[jbosstools-commits] JBoss Tools SVN: r44053 - trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/core/util.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Wed Sep 26 14:31:05 EDT 2012
Author: dgolovin
Date: 2012-09-26 14:31:04 -0400 (Wed, 26 Sep 2012)
New Revision: 44053
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/core/util/XMLMemento.java
Log:
Fixed usage of Integer and Boolean classes.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/core/util/XMLMemento.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/core/util/XMLMemento.java 2012-09-26 17:35:20 UTC (rev 44052)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/core/util/XMLMemento.java 2012-09-26 18:31:04 UTC (rev 44053)
@@ -239,7 +239,7 @@
return null;
String strValue = attr.getValue();
try {
- return new Integer(strValue);
+ return Integer.valueOf(strValue);
} catch (NumberFormatException e) {
return null;
}
@@ -364,16 +364,14 @@
if (attr == null)
return null;
String strValue = attr.getValue();
- if ("true".equalsIgnoreCase(strValue)) //$NON-NLS-1$
- return new Boolean(true);
- return new Boolean(false);
+ return Boolean.valueOf(strValue);
}
/*
* @see IMemento#putBoolean(String, boolean)
*/
public void putBoolean(String key, boolean value) {
- element.setAttribute(key, new Boolean(value).toString());
+ element.setAttribute(key, Boolean.toString(value));
}
/**
More information about the jbosstools-commits
mailing list