File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
vertx-core/src/main/java/io/vertx/core/impl Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ private static Pattern resolvOption(String regex) {
6161 File f = new File ("/etc/resolv.conf" );
6262 try {
6363 if (f .exists () && f .isFile ()) {
64- String conf = new String ( Files .readAllBytes (f .toPath () ));
64+ String conf = Files .readString (f .toPath ());
6565 int ndotsOption = parseNdotsOptionFromResolvConf (conf );
6666 if (ndotsOption != -1 ) {
6767 ndots = ndotsOption ;
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ public String getClassName() {
6767 */
6868 private static String parsePackage (File file ) {
6969 try {
70- String source = new String ( Files .readAllBytes (file .toPath ()), StandardCharsets . UTF_8 );
70+ String source = Files .readString (file .toPath ());
7171 // http://stackoverflow.com/questions/1657066/java-regular-expression-finding-comments-in-code
7272 source = source .replaceAll ( "//.*|(\" (?:\\ \\ [^\" ]|\\ \\ \" |.)*?\" )|(?s)/\\ *.*?\\ */" , "$1 " );
7373 for (String line : source .split ("\\ r?\\ n" )) {
You can’t perform that action at this time.
0 commit comments