From 51adfb7c744d4f2722f786123de219cc8311b059 Mon Sep 17 00:00:00 2001 From: Alexander Horuzhiy <123456> Date: Mon, 18 Jan 2016 16:34:39 +0100 Subject: [PATCH] Change Java 8 newBufferedReader method to be compiled on Java 7 --- .../java/ro/fortsoft/pf4j/ServiceProviderExtensionFinder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.39.5