Skip to content

Commit 1d0b77b

Browse files
committed
Upgrade dependencies
1 parent d1a5438 commit 1d0b77b

2 files changed

Lines changed: 20 additions & 22 deletions

File tree

build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
id 'idea'
66
id 'maven-publish'
77
//id 'com.github.johnrengelman.shadow' version '7.1.0'
8-
id 'io.freefair.lombok' version '6.2.0'
8+
id 'io.freefair.lombok' version '6.4.3'
99
}
1010

1111

@@ -31,18 +31,18 @@ java {
3131

3232
dependencies {
3333
/* ChronosJob.ChronosJob(org.json.JSONObject) is exposed to overwriting classes */
34-
api group: 'org.json', name: 'json', version: '20160212' /* version '20160212' is used by com.mashape.unirest:unirest-java:1.4.9 */
34+
api group: 'org.json', name: 'json', version: '20220320' /* version '20160212' is used by com.mashape.unirest:unirest-java:1.4.9 */
3535

3636
implementation group: 'com.mashape.unirest', name: 'unirest-java', version: '1.4.9'
37-
implementation group: 'com.google.guava', name: 'guava', version: '28.2-jre'
37+
implementation group: 'com.google.guava', name: 'guava', version: '31.1-jre'
3838

39-
implementation group: 'commons-validator', name: 'commons-validator', version: '1.6'
40-
implementation group: 'commons-net', name: 'commons-net', version: '3.6'
41-
implementation group: 'commons-io', name: 'commons-io', version: '2.5'
39+
implementation group: 'commons-validator', name: 'commons-validator', version: '1.7'
40+
implementation group: 'commons-net', name: 'commons-net', version: '3.8.0'
41+
implementation group: 'commons-io', name: 'commons-io', version: '2.11.0'
4242

43-
implementation group: 'net.lingala.zip4j', name: 'zip4j', version: '1.3.2'
43+
implementation group: 'net.lingala.zip4j', name: 'zip4j', version: '2.10.0'
4444

45-
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.26'
45+
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.36'
4646
}
4747

4848

src/main/java/ch/unibas/dmi/dbis/chronos/agent/AbstractChronosAgent.java

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ of this software and associated documentation files (the "Software"), to deal
4646
import java.util.concurrent.ConcurrentHashMap;
4747
import java.util.concurrent.TimeUnit;
4848
import lombok.extern.slf4j.Slf4j;
49-
import net.lingala.zip4j.core.ZipFile;
50-
import net.lingala.zip4j.exception.ZipException;
49+
import net.lingala.zip4j.ZipFile;
5150
import net.lingala.zip4j.model.ZipParameters;
52-
import net.lingala.zip4j.util.Zip4jConstants;
51+
import net.lingala.zip4j.model.enums.CompressionLevel;
52+
import net.lingala.zip4j.model.enums.CompressionMethod;
5353
import org.apache.commons.io.FileUtils;
5454
import org.json.JSONObject;
5555

@@ -572,21 +572,19 @@ protected void copyResults( final ChronosJob job, final File outputDirectory ) t
572572

573573

574574
private Properties zip( final ChronosJob job, final File outputDirectory, final File outputZipFile ) throws ExecutionException {
575-
try {
576-
final Properties results = new Properties();
575+
final Properties results = new Properties();
577576

578-
ZipParameters zipParams = new ZipParameters();
579-
zipParams.setCompressionMethod( Zip4jConstants.COMP_DEFLATE );
580-
zipParams.setCompressionLevel( Zip4jConstants.DEFLATE_LEVEL_NORMAL );
577+
ZipParameters zipParams = new ZipParameters();
578+
zipParams.setCompressionMethod( CompressionMethod.DEFLATE );
579+
zipParams.setCompressionLevel( CompressionLevel.NORMAL );
581580

582-
log.info( "Zipping results." );
583-
ZipFile outputZip = new ZipFile( outputZipFile );
581+
log.info( "Zipping results." );
582+
try ( ZipFile outputZip = new ZipFile( outputZipFile ) ) {
584583
outputZip.addFolder( outputDirectory, zipParams );
585-
586-
return results;
587-
} catch ( ZipException ex ) {
588-
throw new ExecutionException( ex );
584+
} catch ( IOException e ) {
585+
throw new RuntimeException( e );
589586
}
587+
return results;
590588
}
591589

592590

0 commit comments

Comments
 (0)