Merge pull request '5.0.0' (#32) from dev into master
All checks were successful
Test and Deploy / build (17, ubuntu-latest) (push) Successful in 3m50s
Test and Deploy / deploy (17, ubuntu-latest) (push) Successful in 4m5s

Reviewed-on: #32
This commit is contained in:
Quentin Legot 2024-02-12 20:49:49 +01:00
commit 5e6eff241e
17 changed files with 41 additions and 24 deletions

View File

@ -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());
@ -58,6 +58,7 @@ 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
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 323 KiB

View File

@ -8,7 +8,7 @@
"Altarik"
],
"contributors": [
"Legot Quentin<legotquentin@gmail.com>"
],
"contact": {
"homepage": "https://altarik.fr"
@ -25,5 +25,13 @@
"fabric-api": "*",
"minecraft": "${minecraftVersion}",
"java": ">=17"
},
"custom": {
"modmenu": {
"badges": [ "library" ],
"parent": {
"parent": "toolbox"
}
}
}
}

View File

@ -32,7 +32,7 @@ public class BuilderImpl implements IBuilder<BuilderResult> {
@Override
public BuilderResult build() throws Exception {
public BuilderResult build() {
return new BuilderResult(collection.get(), numberOfSentences.get());
}
}

View File

@ -14,7 +14,7 @@ public class ConfigITest {
public double para3 = 3.14;
public static ConfigClazz load() throws IOException {
return (ConfigClazz) load(Path.of("."), "test.json", ConfigClazz.class);
return load(Path.of("."), "test.json", ConfigClazz.class);
}
}

View File

@ -25,13 +25,6 @@ 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()) {

View File

@ -23,10 +23,4 @@ public interface SqlConnection extends AutoCloseable {
*/
void checkConnection() throws SQLException;
/**
* @deprecated replaced with {@link AutoCloseable#close()}
*/
@Deprecated(forRemoval = true)
void closeConnection();
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 323 KiB

View File

@ -8,7 +8,7 @@
"Altarik"
],
"contributors": [
"Legot Quentin<legotquentin@gmail.com>"
],
"contact": {
"homepage": "https://altarik.fr"
@ -26,5 +26,13 @@
"minecraft": "${minecraftVersion}",
"java": ">=17",
"toolbox-core": "${version}"
},
"custom": {
"modmenu": {
"badges": [ "library" ],
"parent": {
"parent": "toolbox"
}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 323 KiB

View File

@ -8,7 +8,7 @@
"Altarik"
],
"contributors": [
"Legot Quentin<legotquentin@gmail.com>"
],
"contact": {
"homepage": "https://altarik.fr"
@ -29,5 +29,13 @@
"fabric-api": "*",
"minecraft": "${minecraftVersion}",
"java": ">=17"
},
"custom": {
"modmenu": {
"badges": [ "library" ],
"parent": {
"parent": "toolbox"
}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 323 KiB

View File

@ -8,7 +8,7 @@
"Altarik"
],
"contributors": [
"Legot Quentin<legotquentin@gmail.com>"
],
"contact": {
"homepage": "https://altarik.fr"

View File

@ -1 +1 @@
okhttp_version=4.10.0
okhttp_version=4.12.0

View File

@ -8,7 +8,7 @@ loader_version=0.15.6
fabric_version=0.95.4+1.20.4
maven_group=fr.altarik.toolbox
maven_version=4.5.1
maven_version=5.0.0
git_owner=quentinlegot
git_repo=Toolbox

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 323 KiB

View File

@ -8,7 +8,7 @@
"Altarik"
],
"contributors": [
"Legot Quentin<legotquentin@gmail.com>"
],
"contact": {
"homepage": "https://altarik.fr"
@ -25,6 +25,11 @@
"toolbox-database": "${version}",
"toolbox-pagination": "${version}",
"toolbox-task": "${version}"
},
"custom": {
"modmenu": {
"badges": [ "library" ]
}
}
}