Skip to content

Commit

Permalink
squid:S1854 - Dead stores should be removed
Browse files Browse the repository at this point in the history
  • Loading branch information
georgekankava authored and George Kankava committed Feb 11, 2016
1 parent 604b3bd commit e2f20ac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ public static ObjectInspector getJsonObjectInspectorFromTypeInfo(
break;
}
case UNION:{
UnionTypeInfo unionTypeInfo = (UnionTypeInfo) typeInfo;

List<ObjectInspector> ois = new LinkedList<ObjectInspector>();
for( TypeInfo ti : ((UnionTypeInfo) typeInfo).getAllUnionObjectTypeInfos()) {
ois.add(getJsonObjectInspectorFromTypeInfo(ti, options));
Expand Down
9 changes: 4 additions & 5 deletions json/src/main/java/org/openx/data/jsonserde/json/JSONML.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ private static Object parse(XMLTokener x, boolean arrayForm,
JSONArray ja) throws JSONException {
String attribute;
char c;
String closeTag = null;
String closeTag;
int i;
JSONArray newja = null;
JSONObject newjo = null;
JSONArray newja;
JSONObject newjo;
Object token;
String tagName = null;
String tagName;

// Test for and skip past these forms:
// <!-- ... -->
Expand Down Expand Up @@ -202,7 +202,6 @@ private static Object parse(XMLTokener x, boolean arrayForm,
throw x.syntaxError("Mismatched '" + tagName +
"' and '" + closeTag + "'");
}
tagName = null;
if (!arrayForm && newja.length() > 0) {
newjo.put("childNodes", newja);
}
Expand Down
7 changes: 1 addition & 6 deletions json/src/main/java/org/openx/data/jsonserde/json/XML.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ private static boolean parse(XMLTokener x, JSONObject context,
String name) throws JSONException {
char c;
int i;
JSONObject jsonobject = null;
JSONObject jsonobject;
String string;
String tagName;
Object token;
Expand Down Expand Up @@ -421,11 +421,6 @@ public static String toString(Object object, String tagName)
if (value == null) {
value = "";
}
if (value instanceof String) {
string = (String)value;
} else {
string = null;
}

// Emit content in body

Expand Down

0 comments on commit e2f20ac

Please sign in to comment.