Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.

Commit 4214e19

Browse files
nick-someonegunsch
authored andcommitted
Inline Files.write() in GenApiConfigAction (#175)
Files.write is deprecated and scheduled for removal. Changing this to use Files.asCharSink().write() is the same implementation, but is not deprecated.
1 parent 82710a4 commit 4214e19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

endpoints-framework-tools/src/main/java/com/google/api/server/spi/tools/GenApiConfigAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public Iterable<String> genApiConfig(
104104
String apiConfigFileName = entry.getKey();
105105
String apiConfigFileContent = entry.getValue();
106106
String apiConfigFilePath = outputDir + "/" + apiConfigFileName;
107-
Files.write(apiConfigFileContent, new File(apiConfigFilePath), UTF_8);
107+
Files.asCharSink(new File(apiConfigFilePath), UTF_8).write(apiConfigFileContent);
108108
System.out.println("API configuration written to " + apiConfigFilePath);
109109
}
110110
}

0 commit comments

Comments
 (0)