Added ability to customize translations (#692)

* Added ability to customize translations

* Removed remaining usage of `Paths#get`

As of java 11 its replacement `Path#of` was created, which is called when using `Paths#get`, besides, according to documentation, it mentions that it can be deprecated at any time

And fix a minor typo in LegacyChannelIdentifier
This commit is contained in:
4drian3d
2022-04-15 23:38:44 -05:00
committed by GitHub
parent 3cb10f6ad4
commit acc407a6d5
6 changed files with 37 additions and 23 deletions

View File

@@ -29,7 +29,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
public class Natives {
@@ -70,7 +69,7 @@ public class Natives {
private static Path createTemporaryNativeFilename(String ext) throws IOException {
String temporaryFolderPath = System.getProperty("velocity.natives-tmpdir");
if (temporaryFolderPath != null) {
return Files.createTempFile(Paths.get(temporaryFolderPath), "native-", ext);
return Files.createTempFile(Path.of(temporaryFolderPath), "native-", ext);
} else {
return Files.createTempFile("native-", ext);
}