Skip to content

Commit 34c7718

Browse files
committed
update Java version
1 parent e951b1d commit 34c7718

File tree

8 files changed

+12
-17
lines changed

8 files changed

+12
-17
lines changed

src/main/java/com/upokecenter/cbor/CBORCanonical.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ private static int MajorType(CBORObject a) {
7777
return 4;
7878
case Map:
7979
return 5;
80-
default:
81-
throw new IllegalStateException();
80+
default: throw new IllegalStateException();
8281
}
8382
}
8483

src/main/java/com/upokecenter/cbor/CBORReader.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,7 @@ public CBORObject ReadForFirstByte(int firstbyte) throws java.io.IOException {
492492
}
493493
return cbor;
494494
}
495-
default:
496-
throw new CBORException("Unexpected data encountered");
495+
default: throw new CBORException("Unexpected data encountered");
497496
}
498497
}
499498

src/main/java/com/upokecenter/cbor/CBORUriConverter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ private static CBORObject ValidateObject(CBORObject obj) {
3838

3939
public java.net.URI FromCBORObject(CBORObject obj) {
4040
if (obj.HasMostOuterTag(32) ||
41-
obj.HasMostOuterTag(266) ||
42-
obj.HasMostOuterTag(267)) {
41+
obj.HasMostOuterTag(266) ||
42+
obj.HasMostOuterTag(267)) {
4343
ValidateObject(obj);
4444
try {
4545
return new java.net.URI(obj.AsString());

src/main/java/com/upokecenter/cbor/CBORUtilities.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -1022,8 +1022,7 @@ private static int[] ParseAtomDateTimeString(String str) {
10221022
} else if (i == 10) {
10231023
bad |= str.charAt(i) != 'T';
10241024
/*lowercase t not used to separate date/time,
1025-
following RFC 4287 sec. 3.3*/
1026-
} else {
1025+
following RFC 4287 sec. 3.3*/ } else {
10271026
bad |= str.charAt(i) < '0' || str.charAt(i) > '9';
10281027
}
10291028
}
@@ -1146,8 +1145,8 @@ public static EFloat DateTimeToIntegerOrDouble(
11461145
.Add(EDecimal.FromEInteger(seconds));
11471146
double dbl = d.ToDouble();
11481147
if (((dbl) == Double.POSITIVE_INFINITY) ||
1149-
((dbl) == Double.NEGATIVE_INFINITY) ||
1150-
Double.isNaN(dbl)) {
1148+
((dbl) == Double.NEGATIVE_INFINITY) ||
1149+
Double.isNaN(dbl)) {
11511150
status[0] = 2;
11521151
return null;
11531152
}

src/main/java/com/upokecenter/cbor/JSONPatch.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ private static CBORObject CloneCbor(CBORObject o) {
5050
case Map:
5151
case Array:
5252
return CBORObject.DecodeFromBytes(o.EncodeToBytes());
53-
default:
54-
return o;
53+
default: return o;
5554
}
5655
}
5756

src/test/java/com/upokecenter/test/CBORDataUtilitiesTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public void TestPreserveNegativeZero() {
8686
public void TestParseJSONNumberSubstring() {
8787
String tstr =
8888

89-
"-3.00931381333368754713014659613049757554804012787921371662913692598770508705049030832574634419795955864174175076186656951904296875000E-49";
89+
"-3.00931381333368754713014659613049757554804012787921371662913692598770508705049030832574634419795955864174175076186656951904296875000E-49";
9090
try {
9191
CBORDataUtilities.ParseJSONNumber(
9292
"xyzxyz" + tstr,
@@ -110,7 +110,7 @@ public void TestParseJSONNumberNegativeZero() {
110110
EDecimal jsonDecimal = (EDecimal)CBORDataUtilities
111111
.ParseJSONNumber(strings[i], new
112112

113-
JSONOptions("numberconversion=full;preservenegativezero=false")).ToObject(
113+
JSONOptions("numberconversion=full;preservenegativezero=false")).ToObject(
114114
EDecimal.class);
115115
Assert.assertEquals(
116116
strings[i + 1],

src/test/java/com/upokecenter/test/CBORSupplementTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ public void TestStringRefs() {
10081008
},
10091009
encodeOptions);
10101010
expected =
1011-
"[\"abcd\",\"aa\",\"abcd\",\"abcd\",\"bbcd\",\"bbcd\",\"abcd\",\"bbcd\"]";
1011+
"[\"abcd\",\"aa\",\"abcd\",\"abcd\",\"bbcd\",\"bbcd\",\"abcd\",\"bbcd\"]";
10121012
Assert.assertEquals(expected, cbor.ToJSONString());
10131013
}
10141014

src/test/java/com/upokecenter/test/JSONWithComments.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,7 @@ private CBORObject NextJSONValue(
184184
// Parse a nonnegative number
185185
return this.NextJSONNumber(nextChar);
186186
}
187-
default:
188-
this.RaiseError("Value can't be parsed.");
187+
default: this.RaiseError("Value can't be parsed.");
189188
break;
190189
}
191190
return null;

0 commit comments

Comments
 (0)