1
1
/*
2
- * Licensed to the Apache Software Foundation (ASF) under one or more
3
- * contributor license agreements. See the NOTICE file distributed with
4
- * this work for additional information regarding copyright ownership.
5
- * The ASF licenses this file to You under the Apache License, Version 2.0
6
- * (the "License"); you may not use this file except in compliance with
7
- * the License. You may obtain a copy of the License at
2
+ * Licensed to the Apache Software Foundation (ASF) under one
3
+ * or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information
5
+ * regarding copyright ownership. The ASF licenses this file
6
+ * to you under the Apache License, Version 2.0 (the
7
+ * "License"); you may not use this file except in compliance
8
+ * with the License. You may obtain a copy of the License at
8
9
*
9
- * http ://www.apache.org/licenses/LICENSE-2.0
10
+ * https ://www.apache.org/licenses/LICENSE-2.0
10
11
*
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
12
+ * Unless required by applicable law or agreed to in writing,
13
+ * software distributed under the License is distributed on an
14
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ * KIND, either express or implied. See the License for the
16
+ * specific language governing permissions and limitations
17
+ * under the License.
16
18
*/
17
19
package org .apache .commons .csv ;
18
20
import static org .junit .jupiter .api .Assertions .assertEquals ;
@@ -33,13 +35,13 @@ public void parseThreeBytes() throws IOException {
33
35
.setDelimiter (',' )
34
36
.setQuote ('\'' )
35
37
.get ();
36
- CSVParser parser = new CSVParser .Builder ()
38
+ final CSVParser parser = new CSVParser .Builder ()
37
39
.setFormat (format )
38
40
.setReader (getTestInput ("org/apache/commons/csv/CSV-196/japanese.csv" ))
39
41
.setCharset (StandardCharsets .UTF_8 )
40
42
.setEnableByteTracking (true )
41
43
.get ();
42
- long [] charByteKey = {0 , 89 , 242 , 395 };
44
+ final long [] charByteKey = {0 , 89 , 242 , 395 };
43
45
int idx = 0 ;
44
46
for (CSVRecord record : parser ) {
45
47
assertEquals (charByteKey [idx ++], record .getBytePosition ());
@@ -54,13 +56,13 @@ public void parseFourBytes() throws IOException {
54
56
.setDelimiter (',' )
55
57
.setQuote ('\'' )
56
58
.get ();
57
- CSVParser parser = new CSVParser .Builder ()
59
+ final CSVParser parser = new CSVParser .Builder ()
58
60
.setFormat (format )
59
61
.setReader (getTestInput ("org/apache/commons/csv/CSV-196/emoji.csv" ))
60
62
.setCharset (StandardCharsets .UTF_8 )
61
63
.setEnableByteTracking (true )
62
64
.get ();
63
- long [] charByteKey = {0 , 84 , 701 , 1318 , 1935 };
65
+ final long [] charByteKey = {0 , 84 , 701 , 1318 , 1935 };
64
66
int idx = 0 ;
65
67
for (CSVRecord record : parser ) {
66
68
assertEquals (charByteKey [idx ++], record .getBytePosition ());
0 commit comments