* Update link in the README to the main JSON-Java repo

* Cleans up some warnings
* Adds new test for bug https://github.com/stleary/JSON-java/issues/332
* Adds some resource handling for string writers using pre-java1.7
support. I know StringWriters don't need a close method called, but the
tests should still handle their resources properly.
This commit is contained in:
John J. Aylward
2017-04-27 12:39:42 -04:00
parent f6ab6d7b27
commit 9df5d34bbe
10 changed files with 2878 additions and 2703 deletions

View File

@@ -3,6 +3,7 @@ package org.json.junit;
/**
* An enum that contains getters and some internal fields
*/
@SuppressWarnings("boxing")
public enum MyEnumField {
VAL1(1, "val 1"),
VAL2(2, "val 2"),
@@ -15,12 +16,13 @@ public enum MyEnumField {
this.intVal = intVal;
}
public String getValue() {
return value;
return this.value;
}
public Integer getIntVal() {
return intVal;
return this.intVal;
}
@Override
public String toString(){
return value;
return this.value;
}
}