diff options
author | Elliott Hughes <enh@google.com> | 2011-02-24 17:58:33 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2011-02-24 17:58:33 -0800 |
commit | 9c324215f5f9d32bba9fbaa0974dc61d848a8e81 (patch) | |
tree | dbd691c9376a178f83e3970edcbe30522d76e5f8 /xml/src | |
parent | b16edf548fa6bb9cd93b238e7820bc92195e5e2f (diff) | |
download | libcore-9c324215f5f9d32bba9fbaa0974dc61d848a8e81.zip libcore-9c324215f5f9d32bba9fbaa0974dc61d848a8e81.tar.gz libcore-9c324215f5f9d32bba9fbaa0974dc61d848a8e81.tar.bz2 |
Fix more FindBugs warnings: DM_BOOLEAN_CTOR.
"Creating new instances of java.lang.Boolean wastes memory."
Change-Id: I954ea1497e924ae9008fe4e47762008f1d1c8561
Diffstat (limited to 'xml/src')
-rw-r--r-- | xml/src/main/java/org/xmlpull/v1/XmlPullParserFactory.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/xml/src/main/java/org/xmlpull/v1/XmlPullParserFactory.java b/xml/src/main/java/org/xmlpull/v1/XmlPullParserFactory.java index 644d01d..4375a41 100644 --- a/xml/src/main/java/org/xmlpull/v1/XmlPullParserFactory.java +++ b/xml/src/main/java/org/xmlpull/v1/XmlPullParserFactory.java @@ -85,10 +85,8 @@ public class XmlPullParserFactory { * @param state if true feature will be set; if false will be ignored */ - public void setFeature(String name, - boolean state) throws XmlPullParserException { - - features.put(name, new Boolean(state)); + public void setFeature(String name, boolean state) throws XmlPullParserException { + features.put(name, state); } @@ -116,7 +114,7 @@ public class XmlPullParserFactory { */ public void setNamespaceAware(boolean awareness) { - features.put (XmlPullParser.FEATURE_PROCESS_NAMESPACES, new Boolean (awareness)); + features.put (XmlPullParser.FEATURE_PROCESS_NAMESPACES, awareness); } /** @@ -143,7 +141,7 @@ public class XmlPullParserFactory { */ public void setValidating(boolean validating) { - features.put (XmlPullParser.FEATURE_VALIDATION, new Boolean (validating)); + features.put (XmlPullParser.FEATURE_VALIDATION, validating); } /** |