File tree 3 files changed +5
-6
lines changed
3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 71
71
<dependency >
72
72
<groupId >org.openjdk.jmh</groupId >
73
73
<artifactId >jmh-core</artifactId >
74
- <version >1.17.3 </version >
74
+ <version >1.20 </version >
75
75
<scope >test</scope >
76
76
</dependency >
77
77
<dependency >
78
78
<groupId >org.openjdk.jmh</groupId >
79
79
<artifactId >jmh-generator-annprocess</artifactId >
80
- <version >1.17.3 </version >
80
+ <version >1.20 </version >
81
81
<scope >test</scope >
82
82
</dependency >
83
83
</dependencies >
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ public static final String readString(JsonIterator iter) throws IOException {
59
59
IterImpl .skipFixedBytes (iter , 3 );
60
60
return null ;
61
61
}
62
- iter .reportError ("readString" , "expect string or null, but " + (char ) c );
62
+ throw iter .reportError ("readString" , "expect string or null, but " + (char ) c );
63
63
}
64
64
int j = parse (iter );
65
65
return new String (iter .reusableChars , 0 , j );
Original file line number Diff line number Diff line change 8
8
import com .jsoniter .extra .GsonCompatibilityMode ;
9
9
import com .jsoniter .spi .DecodingMode ;
10
10
import com .jsoniter .spi .JsoniterSpi ;
11
- import org .junit .Test ;
12
11
import org .openjdk .jmh .Main ;
13
12
import org .openjdk .jmh .annotations .*;
14
13
import org .openjdk .jmh .infra .BenchmarkParams ;
@@ -42,7 +41,7 @@ public void benchSetup(BenchmarkParams params) {
42
41
43
42
@ Benchmark
44
43
public void gsonDecoder (Blackhole bh ) throws IOException {
45
- FileInputStream stream = new FileInputStream ("/tmp /tweets.json" );
44
+ FileInputStream stream = new FileInputStream ("./src/test /tweets.json" );
46
45
InputStreamReader reader = new InputStreamReader (stream );
47
46
try {
48
47
bh .consume (gson .fromJson (reader , new TypeReference <List <Tweet >>() {
@@ -55,7 +54,7 @@ public void gsonDecoder(Blackhole bh) throws IOException {
55
54
56
55
@ Benchmark
57
56
public void jsoniterReflectionDecoder (Blackhole bh ) throws IOException {
58
- FileInputStream stream = new FileInputStream ("/tmp /tweets.json" );
57
+ FileInputStream stream = new FileInputStream ("./src/test /tweets.json" );
59
58
JsonIterator iter = JsonIteratorPool .borrowJsonIterator ();
60
59
try {
61
60
iter .reset (stream );
You can’t perform that action at this time.
0 commit comments