Skip to content

Commit

Permalink
Merge pull request #5 from olenagerasimova/correct-deps-actions
Browse files Browse the repository at this point in the history
fix: deps and actions
  • Loading branch information
dgarus authored Nov 7, 2022
2 parents b74b7ad + dc32463 commit 062063a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,3 @@ jobs:
${{ runner.os }}-jdk-${{ matrix.java }}-maven-
- name: Build adapter with Maven
run: mvn -B install -Pqulice
- name: Build benchmarks with Maven
run: mvn -B install -f ./benchmarks
12 changes: 12 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ SOFTWARE.
<groupId>com.artipie</groupId>
<artifactId>asto-core</artifactId>
<version>v1.14.1</version>
<!-- Do not remove this exclusion! No tests will run if dependency is not excluded! -->
<exclusions>
<exclusion>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>javax.json</groupId>
Expand Down
10 changes: 7 additions & 3 deletions src/main/java/com/artipie/cocoa/metadata/Podspec.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
import java.io.InputStream;
import java.io.StringReader;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import javax.json.JsonException;
import javax.json.JsonObject;
import javax.json.JsonValue;
import org.testng.reporters.Files;
import org.apache.commons.io.IOUtils;

/**
* Cocoa PODSPEC metadata.
Expand Down Expand Up @@ -79,7 +80,7 @@ public interface Podspec {
*/
@SuppressWarnings("PMD.ProhibitPublicStaticMethods")
static Podspec initiate(final InputStream input) throws IOException {
final String data = Files.readFile(input);
final String data = IOUtils.toString(input, StandardCharsets.UTF_8);
Podspec res;
try {
res = new Json(javax.json.Json.createReader(new StringReader(data)).readObject());
Expand Down Expand Up @@ -113,7 +114,10 @@ public Ruby(final String data) {
* @param input Input stream with ruby podspec
*/
public Ruby(final InputStream input) {
this(new UncheckedIOScalar<>(() -> Files.readFile(input)).value());
this(
new UncheckedIOScalar<>(() -> IOUtils.toString(input, StandardCharsets.UTF_8))
.value()
);
}

@Override
Expand Down

0 comments on commit 062063a

Please sign in to comment.