Skip to content

Commit d5c0b12

Browse files
committed
update Java version
1 parent 2aac276 commit d5c0b12

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

src/test/java/com/upokecenter/test/CBORTest.java

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2377,18 +2377,19 @@ public static void TestRandomOne(byte[] array) {
23772377
while ((startingAvailable - inputStream.available()) != startingAvailable) {
23782378
try {
23792379
CBORObject o;
2380-
long oldPos=(startingAvailable - inputStream.available());
2380+
long oldPos = (startingAvailable - inputStream.available());
23812381
o = CBORObject.Read(inputStream);
2382-
long cborlen=(startingAvailable - inputStream.available())-oldPos;
2383-
if (cborlen>3000) {
2384-
System.out.println("pos={0} of {1}",(startingAvailable - inputStream.available()),startingAvailable);
2385-
}
2382+
long cborlen = (startingAvailable - inputStream.available()) - oldPos;
2383+
if (cborlen > 3000) {
2384+
System.out.println("pos=" + (startingAvailable - inputStream.available()) + " of " +
2385+
startingAvailable + ", cborlen=" + cborlen);
2386+
}
23862387
byte[] encodedBytes = (o == null) ? null : o.EncodeToBytes();
23872388
try {
23882389
CBORObject.DecodeFromBytes(encodedBytes);
2389-
if (cborlen>3000) {
2390-
System.out.println("end DecodeFromBytes");
2391-
}
2390+
if (cborlen > 3000) {
2391+
System.out.println("end DecodeFromBytes");
2392+
}
23922393
} catch (Exception ex) {
23932394
throw new IllegalStateException(ex.getMessage(), ex);
23942395
}
@@ -2399,29 +2400,29 @@ public static void TestRandomOne(byte[] array) {
23992400
}
24002401
if (o != null) {
24012402
try {
2402-
if (cborlen>3000) {
2403-
System.out.println("toJSONString " + java.util.Date.UtcNow);
2404-
}
2403+
if (cborlen > 3000) {
2404+
System.out.println("toJSONString " + java.util.Date.UtcNow);
2405+
}
24052406
jsonString = o.ToJSONString();
2406-
if (cborlen>3000) {
2407-
System.out.println("jsonStringLen = " + jsonString.length());
2408-
}
2407+
if (cborlen > 3000) {
2408+
System.out.println("jsonStringLen = " + jsonString.length());
2409+
}
24092410
} catch (CBORException ex) {
24102411
System.out.println(ex.getMessage());
24112412
jsonString = "";
24122413
}
24132414
if (jsonString.length() > 0) {
2414-
if (cborlen>3000) {
2415-
System.out.println("fromJSONString " + java.util.Date.UtcNow);
2416-
}
2415+
if (cborlen > 3000) {
2416+
System.out.println("fromJSONString " + java.util.Date.UtcNow);
2417+
}
24172418
CBORObject.FromJSONString(jsonString);
2418-
if (cborlen>3000) {
2419-
System.out.println("writeToJSON " + java.util.Date.UtcNow);
2420-
}
2419+
if (cborlen > 3000) {
2420+
System.out.println("writeToJSON " + java.util.Date.UtcNow);
2421+
}
24212422
TestWriteToJSON(o);
2422-
if (cborlen>3000) {
2423-
System.out.println("endJSON " + java.util.Date.UtcNow);
2424-
}
2423+
if (cborlen > 3000) {
2424+
System.out.println("endJSON " + java.util.Date.UtcNow);
2425+
}
24252426
}
24262427
}
24272428
} catch (Exception ex) {

0 commit comments

Comments
 (0)