File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 7171 <dependency >
7272 <groupId >org.openjdk.jmh</groupId >
7373 <artifactId >jmh-core</artifactId >
74- <version >1.17.3 </version >
74+ <version >1.20 </version >
7575 <scope >test</scope >
7676 </dependency >
7777 <dependency >
7878 <groupId >org.openjdk.jmh</groupId >
7979 <artifactId >jmh-generator-annprocess</artifactId >
80- <version >1.17.3 </version >
80+ <version >1.20 </version >
8181 <scope >test</scope >
8282 </dependency >
8383 </dependencies >
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ public static final String readString(JsonIterator iter) throws IOException {
5959 IterImpl .skipFixedBytes (iter , 3 );
6060 return null ;
6161 }
62- iter .reportError ("readString" , "expect string or null, but " + (char ) c );
62+ throw iter .reportError ("readString" , "expect string or null, but " + (char ) c );
6363 }
6464 int j = parse (iter );
6565 return new String (iter .reusableChars , 0 , j );
Original file line number Diff line number Diff line change 88import com .jsoniter .extra .GsonCompatibilityMode ;
99import com .jsoniter .spi .DecodingMode ;
1010import com .jsoniter .spi .JsoniterSpi ;
11- import org .junit .Test ;
1211import org .openjdk .jmh .Main ;
1312import org .openjdk .jmh .annotations .*;
1413import org .openjdk .jmh .infra .BenchmarkParams ;
@@ -42,7 +41,7 @@ public void benchSetup(BenchmarkParams params) {
4241
4342 @ Benchmark
4443 public void gsonDecoder (Blackhole bh ) throws IOException {
45- FileInputStream stream = new FileInputStream ("/tmp /tweets.json" );
44+ FileInputStream stream = new FileInputStream ("./src/test /tweets.json" );
4645 InputStreamReader reader = new InputStreamReader (stream );
4746 try {
4847 bh .consume (gson .fromJson (reader , new TypeReference <List <Tweet >>() {
@@ -55,7 +54,7 @@ public void gsonDecoder(Blackhole bh) throws IOException {
5554
5655 @ Benchmark
5756 public void jsoniterReflectionDecoder (Blackhole bh ) throws IOException {
58- FileInputStream stream = new FileInputStream ("/tmp /tweets.json" );
57+ FileInputStream stream = new FileInputStream ("./src/test /tweets.json" );
5958 JsonIterator iter = JsonIteratorPool .borrowJsonIterator ();
6059 try {
6160 iter .reset (stream );
You can’t perform that action at this time.
0 commit comments