Skip to content
This repository was archived by the owner on Apr 1, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/main/java/us/monoid/json/JSONML.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ public class JSONML {
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, JSONArray ja) throw
if (!closeTag.equals(tagName)) {
throw x.syntaxError("Mismatched '" + tagName + "' and '" + closeTag + "'");
}
tagName = null;
if (!arrayForm && newja.length() > 0) {
newjo.put("childNodes", newja);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/monoid/json/XML.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private static boolean parse(XMLTokener x, JSONObject context,
char c;
int i;
String n;
JSONObject o = null;
JSONObject o;
String s;
Object t;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/monoid/web/AbstractResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void fill(URLConnection anUrlConnection) throws IOException {
try {
// read the response body
byte[] buf = new byte[1024];
int read = -1;
int read;
while ((read = es.read(buf)) > 0) {
baos.write(buf, 0, read);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/monoid/web/BinaryResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public String getAcceptedTypes() {
public File save(File aFileName) throws IOException {
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(aFileName), 1024);
byte[] buffer = new byte[1024];
int len = -1;
int len;
while ((len = inputStream.read(buffer)) != -1) {
bos.write(buffer, 0, len);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/us/monoid/web/XPathQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public XPathQuery(String anXPath) throws XPathException {
}

private <T> QName getConstant(Class<T> aReturnType) {
QName returnType = null;
QName returnType;
if (aReturnType == String.class) {
returnType = XPathConstants.STRING;
} else if (aReturnType == Boolean.class) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ protected Token jjFillToken()
public Token getNextToken()
{
Token matchedToken;
int curPos = 0;
int curPos;

EOFLoop :
for (;;)
Expand Down