File tree Expand file tree Collapse file tree
src/main/java/com/artipie/cocoa/metadata Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 ${{ runner.os }}-jdk-${{ matrix.java }}-maven-
2929 - name : Build adapter with Maven
3030 run : mvn -B install -Pqulice
31- - name : Build benchmarks with Maven
32- run : mvn -B install -f ./benchmarks
Original file line number Diff line number Diff line change @@ -64,6 +64,18 @@ SOFTWARE.
6464 <groupId >com.artipie</groupId >
6565 <artifactId >asto-core</artifactId >
6666 <version >v1.14.1</version >
67+ <!-- Do not remove this exclusion! No tests will run if dependency is not excluded! -->
68+ <exclusions >
69+ <exclusion >
70+ <groupId >org.testng</groupId >
71+ <artifactId >testng</artifactId >
72+ </exclusion >
73+ </exclusions >
74+ </dependency >
75+ <dependency >
76+ <groupId >commons-io</groupId >
77+ <artifactId >commons-io</artifactId >
78+ <version >2.11.0</version >
6779 </dependency >
6880 <dependency >
6981 <groupId >javax.json</groupId >
Original file line number Diff line number Diff line change 99import java .io .InputStream ;
1010import java .io .StringReader ;
1111import java .net .URI ;
12+ import java .nio .charset .StandardCharsets ;
1213import java .util .Arrays ;
1314import java .util .HashMap ;
1415import java .util .Map ;
1516import java .util .Optional ;
1617import javax .json .JsonException ;
1718import javax .json .JsonObject ;
1819import javax .json .JsonValue ;
19- import org .testng . reporters . Files ;
20+ import org .apache . commons . io . IOUtils ;
2021
2122/**
2223 * Cocoa PODSPEC metadata.
@@ -79,7 +80,7 @@ public interface Podspec {
7980 */
8081 @ SuppressWarnings ("PMD.ProhibitPublicStaticMethods" )
8182 static Podspec initiate (final InputStream input ) throws IOException {
82- final String data = Files . readFile (input );
83+ final String data = IOUtils . toString (input , StandardCharsets . UTF_8 );
8384 Podspec res ;
8485 try {
8586 res = new Json (javax .json .Json .createReader (new StringReader (data )).readObject ());
@@ -113,7 +114,10 @@ public Ruby(final String data) {
113114 * @param input Input stream with ruby podspec
114115 */
115116 public Ruby (final InputStream input ) {
116- this (new UncheckedIOScalar <>(() -> Files .readFile (input )).value ());
117+ this (
118+ new UncheckedIOScalar <>(() -> IOUtils .toString (input , StandardCharsets .UTF_8 ))
119+ .value ()
120+ );
117121 }
118122
119123 @ Override
You can’t perform that action at this time.
0 commit comments