mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-09 12:04:28 +08:00
* 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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user