@@ -2116,6 +2116,7 @@ public static String jsonToXml(String json) {
21162116 return jsonToXml (json , Xml .XmlStringBuilder .Step .TWO_SPACES );
21172117 }
21182118
2119+ @ SuppressWarnings ("unchecked" )
21192120 public static String xmlToJson (String xml , Json .JsonStringBuilder .Step identStep , Mode mode ) {
21202121 Object result = Xml .fromXml (xml );
21212122 if (result instanceof Map ) {
@@ -2149,7 +2150,6 @@ public static String formatXml(String xml) {
21492150 return Xml .formatXml (xml );
21502151 }
21512152
2152- @ SuppressWarnings ("unchecked" )
21532153 public static Map <String , Object > removeMinusesAndConvertNumbers (Map <String , Object > map ) {
21542154 Map <String , Object > outMap = newLinkedHashMap ();
21552155 for (Map .Entry <String , Object > entry : map .entrySet ()) {
@@ -2176,7 +2176,7 @@ private static Object makeObject(Object value) {
21762176 }
21772177 result = values ;
21782178 } else if (value instanceof Map ) {
2179- result = removeMinusesAndConvertNumbers ((Map < String , Object > ) value );
2179+ result = removeMinusesAndConvertNumbers ((Map ) value );
21802180 } else {
21812181 String stringValue = String .valueOf (value );
21822182 result = isJsonNumber (stringValue ) ? Xml .stringToNumber (stringValue ) : value ;
@@ -2215,11 +2215,9 @@ public static boolean isJsonNumber(final String string) {
22152215 return numberEncountered ;
22162216 }
22172217
2218- @ SuppressWarnings ("unchecked" )
2219- public static Map <String , Object > replaceSelfClosingWithNull (Map map ) {
2218+ public static Map <String , Object > replaceSelfClosingWithNull (Map <String , Object > map ) {
22202219 Map <String , Object > outMap = newLinkedHashMap ();
2221- for (Iterator it = map .entrySet ().iterator (); it .hasNext (); ) {
2222- Map .Entry entry = (Map .Entry ) it .next ();
2220+ for (Map .Entry <String , Object > entry : map .entrySet ()) {
22232221 if ("-self-closing" .equals (entry .getKey ()) && "true" .equals (entry .getValue ())) {
22242222 if (map .size () == 1 ) {
22252223 outMap = null ;
0 commit comments