Compare commits
No commits in common. "5e6eff241ecffe3b0a5910f934c2fd92d5dd8198" and "6b9d4fa968304dddd08f58bce6900d4ea93265f3" have entirely different histories.
5e6eff241e
...
6b9d4fa968
@ -24,10 +24,10 @@ public class ConfigI {
|
||||
return configPath.resolve(name);
|
||||
}
|
||||
|
||||
public static <T extends ConfigI> T load(Path configPath, String name, Class<T> clazz) throws IOException, JsonSyntaxException, JsonIOException {
|
||||
public static ConfigI load(Path configPath, String name, Class<? extends ConfigI> clazz) throws IOException, JsonSyntaxException, JsonIOException {
|
||||
Path path = getConfigPath(configPath, name);
|
||||
|
||||
T file;
|
||||
ConfigI file;
|
||||
|
||||
if(Files.exists(path)) {
|
||||
FileReader reader = new FileReader(path.toFile());
|
||||
@ -58,7 +58,6 @@ public class ConfigI {
|
||||
Files.writeString(this.configPath, GSON.toJson(this));
|
||||
// Files.copy(tempPath, this.configPath, StandardCopyOption.REPLACE_EXISTING);
|
||||
// Files.delete(tempPath);
|
||||
// commented because throws an error on windows each time if the file already exist
|
||||
}
|
||||
|
||||
}
|
||||
|
Before Width: | Height: | Size: 323 KiB After Width: | Height: | Size: 3.7 KiB |
@ -8,7 +8,7 @@
|
||||
"Altarik"
|
||||
],
|
||||
"contributors": [
|
||||
|
||||
"Legot Quentin<legotquentin@gmail.com>"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://altarik.fr"
|
||||
@ -25,13 +25,5 @@
|
||||
"fabric-api": "*",
|
||||
"minecraft": "${minecraftVersion}",
|
||||
"java": ">=17"
|
||||
},
|
||||
"custom": {
|
||||
"modmenu": {
|
||||
"badges": [ "library" ],
|
||||
"parent": {
|
||||
"parent": "toolbox"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ public class BuilderImpl implements IBuilder<BuilderResult> {
|
||||
|
||||
|
||||
@Override
|
||||
public BuilderResult build() {
|
||||
public BuilderResult build() throws Exception {
|
||||
return new BuilderResult(collection.get(), numberOfSentences.get());
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ public class ConfigITest {
|
||||
public double para3 = 3.14;
|
||||
|
||||
public static ConfigClazz load() throws IOException {
|
||||
return load(Path.of("."), "test.json", ConfigClazz.class);
|
||||
return (ConfigClazz) load(Path.of("."), "test.json", ConfigClazz.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -25,6 +25,13 @@ public abstract class AbstractSqlConnection implements SqlConnection {
|
||||
return connection;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeConnection() {
|
||||
try {
|
||||
close();
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws Exception {
|
||||
if(!connection.isClosed()) {
|
||||
|
@ -23,4 +23,10 @@ public interface SqlConnection extends AutoCloseable {
|
||||
*/
|
||||
void checkConnection() throws SQLException;
|
||||
|
||||
/**
|
||||
* @deprecated replaced with {@link AutoCloseable#close()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
void closeConnection();
|
||||
|
||||
}
|
||||
|
Before Width: | Height: | Size: 323 KiB After Width: | Height: | Size: 3.7 KiB |
@ -8,7 +8,7 @@
|
||||
"Altarik"
|
||||
],
|
||||
"contributors": [
|
||||
|
||||
"Legot Quentin<legotquentin@gmail.com>"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://altarik.fr"
|
||||
@ -26,13 +26,5 @@
|
||||
"minecraft": "${minecraftVersion}",
|
||||
"java": ">=17",
|
||||
"toolbox-core": "${version}"
|
||||
},
|
||||
"custom": {
|
||||
"modmenu": {
|
||||
"badges": [ "library" ],
|
||||
"parent": {
|
||||
"parent": "toolbox"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 323 KiB After Width: | Height: | Size: 3.7 KiB |
@ -8,7 +8,7 @@
|
||||
"Altarik"
|
||||
],
|
||||
"contributors": [
|
||||
|
||||
"Legot Quentin<legotquentin@gmail.com>"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://altarik.fr"
|
||||
@ -29,13 +29,5 @@
|
||||
"fabric-api": "*",
|
||||
"minecraft": "${minecraftVersion}",
|
||||
"java": ">=17"
|
||||
},
|
||||
"custom": {
|
||||
"modmenu": {
|
||||
"badges": [ "library" ],
|
||||
"parent": {
|
||||
"parent": "toolbox"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 323 KiB After Width: | Height: | Size: 3.7 KiB |
@ -8,7 +8,7 @@
|
||||
"Altarik"
|
||||
],
|
||||
"contributors": [
|
||||
|
||||
"Legot Quentin<legotquentin@gmail.com>"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://altarik.fr"
|
||||
|
@ -1 +1 @@
|
||||
okhttp_version=4.12.0
|
||||
okhttp_version=4.10.0
|
@ -8,7 +8,7 @@ loader_version=0.15.6
|
||||
fabric_version=0.95.4+1.20.4
|
||||
|
||||
maven_group=fr.altarik.toolbox
|
||||
maven_version=5.0.0
|
||||
maven_version=4.5.1
|
||||
|
||||
git_owner=quentinlegot
|
||||
git_repo=Toolbox
|
Before Width: | Height: | Size: 323 KiB After Width: | Height: | Size: 3.7 KiB |
@ -8,7 +8,7 @@
|
||||
"Altarik"
|
||||
],
|
||||
"contributors": [
|
||||
|
||||
"Legot Quentin<legotquentin@gmail.com>"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://altarik.fr"
|
||||
@ -25,11 +25,6 @@
|
||||
"toolbox-database": "${version}",
|
||||
"toolbox-pagination": "${version}",
|
||||
"toolbox-task": "${version}"
|
||||
},
|
||||
"custom": {
|
||||
"modmenu": {
|
||||
"badges": [ "library" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|