Skip to content

Commit

Permalink
Trivial refactoring: use Files.readString
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellansun committed Dec 16, 2023
1 parent 957e88b commit 4817d79
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public RawJavaFileObject(URI uri) {

@Override
public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException {
return null != src ? src : (src = new String(Files.readAllBytes(javaFilePath), DEFAULT_CHARSET));
return null != src ? src : (src = Files.readString(javaFilePath, DEFAULT_CHARSET));
}

/**
Expand Down

0 comments on commit 4817d79

Please sign in to comment.