[jbosstools-commits] JBoss Tools SVN: r43280 - in trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common: xml and 1 other directory.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Tue Aug 28 21:44:53 EDT 2012
Author: dgolovin
Date: 2012-08-28 21:44:52 -0400 (Tue, 28 Aug 2012)
New Revision: 43280
Modified:
trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/util/TypeResolutionCache.java
trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/xml/XMLMemento.java
Log:
code cleanup
Modified: trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/util/TypeResolutionCache.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/util/TypeResolutionCache.java 2012-08-29 01:16:29 UTC (rev 43279)
+++ trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/util/TypeResolutionCache.java 2012-08-29 01:44:52 UTC (rev 43280)
@@ -166,7 +166,7 @@
primitive.add("java.lang.RuntimeException"); //$NON-NLS-1$
primitive.add("java.lang.Override"); //$NON-NLS-1$
}
- static String NULL = ";;;"; //$NON-NLS-1$
+ static final String NULL = ";;;"; //$NON-NLS-1$
Map<String,Resolved> resolved = new Hashtable<String, Resolved>();
private TypeResolutionCache() {}
Modified: trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/xml/XMLMemento.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/xml/XMLMemento.java 2012-08-29 01:16:29 UTC (rev 43279)
+++ trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/xml/XMLMemento.java 2012-08-29 01:44:52 UTC (rev 43280)
@@ -235,7 +235,7 @@
return null;
String strValue = attr.getValue();
try {
- return new Integer(strValue);
+ return Integer.valueOf(strValue);
} catch (NumberFormatException e) {
return null;
}
@@ -371,16 +371,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); //$NON-NLS-1$
}
/*
* @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).toString());
}
/**
More information about the jbosstools-commits
mailing list