Skip to content

Commit 8d4df70

Browse files
committed
update Java version
1 parent d5c0b12 commit 8d4df70

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ static void WriteJSONStringUnquoted(
2525
sb.WriteString(str, 0, i);
2626
return;
2727
}
28+
// int bufferlen = Math.min(Math.max(4, str.length()), 64);
29+
// byte[] buffer = new byte[bufferlen];
30+
// int bufferpos = 0;
2831
for (; i < str.length(); ++i) {
2932
char c = str.charAt(i);
3033
if (c == '\\' || c == '"') {

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ public void WriteAscii(byte[] bytes, int index, int length) throws java.io.IOExc
9393
if (this.outputStream == null) {
9494
DataUtilities.ReadUtf8FromBytes(
9595
bytes,
96-
index,
97-
length,
98-
this.builder,
99-
false);
96+
index,
97+
length,
98+
this.builder,
99+
false);
100100
} else {
101101
for (int i = 0; i < length; ++i) {
102102
byte b = bytes[i + index];

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2342,7 +2342,7 @@ public void TestRandomNonsense() {
23422342
RandomGenerator rand = new RandomGenerator();
23432343
for (int i = 0; i < 1000; ++i) {
23442344
System.out.println(i + ": " + java.util.Date.UtcNow);
2345-
byte[] array = new byte[rand.UniformInt(1000000) + 1];
2345+
byte[] array = new byte[rand.UniformInt(100000) + 1];
23462346
rand.GetBytes(array, 0, array.length);
23472347
TestRandomOne(array);
23482348
}

0 commit comments

Comments
 (0)