ConfigI#load now return given clazz in parameter, dump to 5.0.0 because of breaking changes
All checks were successful
Test and Deploy / build (17, ubuntu-latest) (push) Successful in 3m55s
Test and Deploy / build (17, ubuntu-latest) (pull_request) Successful in 3m48s
Test and Deploy / deploy (17, ubuntu-latest) (push) Has been skipped
Test and Deploy / deploy (17, ubuntu-latest) (pull_request) Has been skipped
All checks were successful
Test and Deploy / build (17, ubuntu-latest) (push) Successful in 3m55s
Test and Deploy / build (17, ubuntu-latest) (pull_request) Successful in 3m48s
Test and Deploy / deploy (17, ubuntu-latest) (push) Has been skipped
Test and Deploy / deploy (17, ubuntu-latest) (pull_request) Has been skipped
This commit is contained in:
@@ -24,10 +24,10 @@ public class ConfigI {
|
||||
return configPath.resolve(name);
|
||||
}
|
||||
|
||||
public static ConfigI load(Path configPath, String name, Class<? extends ConfigI> clazz) throws IOException, JsonSyntaxException, JsonIOException {
|
||||
public static <T extends ConfigI> T load(Path configPath, String name, Class<T> clazz) throws IOException, JsonSyntaxException, JsonIOException {
|
||||
Path path = getConfigPath(configPath, name);
|
||||
|
||||
ConfigI file;
|
||||
T file;
|
||||
|
||||
if(Files.exists(path)) {
|
||||
FileReader reader = new FileReader(path.toFile());
|
||||
|
||||
Reference in New Issue
Block a user