Skip to content

Commit

Permalink
Merge branch 'master' into to/#113-refactoring-filemodel-naming
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-peter committed May 19, 2022
2 parents bf88fcf + 9c455ba commit e91e842
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
16 changes: 8 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
plugins {
id "com.jfrog.artifactory" version "4.24.20" //artifactory support
id "com.jfrog.artifactory" version "4.28.3" //artifactory support
id 'groovy' // groovy support
id 'java' // java support
id 'application' // creates a JVM executable
id 'maven-publish' // publish to a maven repo (local or mvn central, has to be defined)
id 'pmd' // code check, working on source code
id 'com.github.spotbugs' version '4.7.8' // code check, working on byte code
id 'com.diffplug.spotless' version '5.17.0'// code format
id 'com.github.spotbugs' version '5.0.6' // code check, working on byte code
id 'com.diffplug.spotless' version '6.6.1'// code format
id 'com.simonharrer.modernizer' version '2.1.0-1' // detect deprecated APIs
id 'com.github.onslip.gradle-one-jar' version '1.0.6' // pack a self contained jar
id 'jacoco' // java code coverage plugin
Expand All @@ -16,8 +16,8 @@ plugins {
ext {
//version (changing these should be considered thoroughly!)
hibernateVersion = '5.3.3.Final'
log4jVersion = '2.17.1'
picoliVersion = '4.6.1'
log4jVersion = '2.17.2'
picoliVersion = '4.6.3'
javaVersion = JavaVersion.VERSION_17

scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator //location of script plugins
Expand Down Expand Up @@ -64,7 +64,7 @@ dependencies {
implementation 'javax.activation:activation:1.1.1'

//database
implementation 'org.postgresql:postgresql:42.2.24'
implementation 'org.postgresql:postgresql:42.3.4'
implementation 'javax.persistence:javax.persistence-api:2.2'

// logging
Expand All @@ -76,11 +76,11 @@ dependencies {
implementation 'org.jetbrains:annotations:23.0.0'
annotationProcessor "info.picocli:picocli-codegen:$picoliVersion"
implementation "info.picocli:picocli:$picoliVersion"
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.2.2'

//tests
testImplementation 'junit:junit:4.+'
testImplementation 'org.testcontainers:postgresql:1.16.0'
testImplementation 'org.testcontainers:postgresql:1.17.1'

}

Expand Down
12 changes: 9 additions & 3 deletions src/main/java/edu/ie3/tools/Converter.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ public class Converter implements Runnable {
private final ExecutorService fileEraserExecutor =
Executors.newFixedThreadPool((int) Math.ceil(noOfProcessors / 3d));

/** @return timestamp for logging output (e.g "MR 09.10.2018 18:00 - TS 01 | ") */
/**
* @return timestamp for logging output (e.g "MR 09.10.2018 18:00 - TS 01 | ")
*/
public static String getFormattedTimestep(@NotNull ZonedDateTime modelrun, int timestep) {
return "MR "
+ MODEL_RUN_FORMATTER.format(modelrun)
Expand All @@ -59,12 +61,16 @@ public static String getFormattedTimestep(@NotNull ZonedDateTime modelrun, int t
+ " | ";
}

/** @return timestamp for logging output (e.g "MR 09.10.2018 18:00 | ") */
/**
* @return timestamp for logging output (e.g "MR 09.10.2018 18:00 | ")
*/
public static String getFormattedModelrun(@NotNull ZonedDateTime modelrun) {
return "MR " + MODEL_RUN_FORMATTER.format(modelrun) + " | ";
}

/** @return timestamp for logging output (e.g "MR 09.10.2018 18:00 - TS 01 | ") */
/**
* @return timestamp for logging output (e.g "MR 09.10.2018 18:00 - TS 01 | ")
*/
public static String getFormattedTimestep(@NotNull FileModel file) {
return getFormattedTimestep(file.getModelrun(), file.getTimestep());
}
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/edu/ie3/tools/Downloader.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ public Downloader() {
dbController = new DatabaseController(PERSISTENCE_UNIT_NAME, validateConnectionProperties());
}

/** @return if a connection to given url could be established */
/**
* @return if a connection to given url could be established
*/
public static boolean isUrlReachable(String url) {
HttpURLConnection.setFollowRedirects(false);
HttpURLConnection con;
Expand Down

0 comments on commit e91e842

Please sign in to comment.