Skip to content

Commit 6113222

Browse files
committed
Quick refactoring
1 parent 9094207 commit 6113222

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/com/noticeditorteam/noticeditor/io/JsonFormat.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ public NoticeTree importDocument() throws IOException, JSONException {
3030

3131
if (json.has(KEY_STATUSINFO)) {
3232
JSONArray statusList = json.getJSONArray(KEY_STATUSINFO);
33-
if (statusList.length() > 0) {
33+
final int length = statusList.length();
34+
if (length > 0) {
3435
NoticeStatusList.clear();
3536
}
36-
// TODO refactor length const
37-
for (int i = 0; i < statusList.length(); i++) {
37+
for (int i = 0; i < length; i++) {
3838
JSONObject obj = (JSONObject) statusList.get(i);
3939
String name = obj.getString("name");
4040
int code = obj.getInt("code");

0 commit comments

Comments
 (0)