Skip to content

Commit defd3b2

Browse files
fix test
1 parent 02eb080 commit defd3b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

authz/src/main/java/io/grpc/authz/FileWatcherAuthorizationServerInterceptor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package io.grpc.authz;
1818

1919
import static com.google.common.base.Preconditions.checkNotNull;
20+
import static java.nio.charset.StandardCharsets.UTF_8;
2021

2122
import com.google.common.annotations.VisibleForTesting;
2223
import com.google.common.base.Strings;
@@ -77,7 +78,7 @@ void updateInternalInterceptor() throws IOException {
7778
if (currentTime.equals(lastModifiedTime)) {
7879
return;
7980
}
80-
String policyContents = new String(Files.readAllBytes(policyFile.toPath()));
81+
String policyContents = new String(Files.readAllBytes(policyFile.toPath()), UTF_8);
8182
lastModifiedTime = currentTime;
8283
internalAuthzServerInterceptor = AuthorizationServerInterceptor.create(policyContents);
8384
if (testCallback != null) {

0 commit comments

Comments
 (0)