aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Horuzhiy <123456>2016-01-18 16:34:39 +0100
committerAlexander Horuzhiy <123456>2016-01-18 16:34:39 +0100
commit51adfb7c744d4f2722f786123de219cc8311b059 (patch)
treecfcd4b493b57310b6a609b61a2f5df3d3ec75d12
parenta6b782623da7e65a3f8caf094d3e6b0b0ed34458 (diff)
downloadpf4j-51adfb7c744d4f2722f786123de219cc8311b059.tar.gz
pf4j-51adfb7c744d4f2722f786123de219cc8311b059.zip
Change Java 8 newBufferedReader method to be compiled on Java 7
-rw-r--r--pf4j/src/main/java/ro/fortsoft/pf4j/ServiceProviderExtensionFinder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/ServiceProviderExtensionFinder.java b/pf4j/src/main/java/ro/fortsoft/pf4j/ServiceProviderExtensionFinder.java
index da82fe9..95bf879 100644
--- a/pf4j/src/main/java/ro/fortsoft/pf4j/ServiceProviderExtensionFinder.java
+++ b/pf4j/src/main/java/ro/fortsoft/pf4j/ServiceProviderExtensionFinder.java
@@ -25,6 +25,7 @@ import java.io.IOException;
import java.io.Reader;
import java.net.URISyntaxException;
import java.net.URL;
+import java.nio.charset.StandardCharsets;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.*;
@@ -63,7 +64,7 @@ public class ServiceProviderExtensionFinder extends AbstractExtensionFinder {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
log.debug("Read '{}'", file);
- Reader reader = Files.newBufferedReader(file);
+ Reader reader = Files.newBufferedReader(file, StandardCharsets.UTF_8);
ServiceProviderExtensionStorage.read(reader, bucket);
return FileVisitResult.CONTINUE;
}