Skip to content

Commit 5a94a60

Browse files
committed
Merge pull request 'Release v25.08' (!382) from release_25.08 into master
2 parents 6c14534 + 7052e9f commit 5a94a60

File tree

440 files changed

+4870
-4076
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

440 files changed

+4870
-4076
lines changed

checkstyle-suppressions.xml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@
44
"http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
55

66
<suppressions>
7-
<suppress checks="LineLength" files="FilterHelper.java"/>
8-
<suppress checks="LineLength" files="H2Production.java"/>
7+
<!-- disable check for automatically generated code -->
8+
<suppress
9+
files="EDTFValidator.java"
10+
checks=".*" />
11+
<suppress
12+
files="ExtendedDateTimeFormat.*.java"
13+
checks=".*" />
14+
<suppress
15+
files="MD4.java"
16+
checks=".*" />
17+
18+
<!-- disable check for junit tests -->
19+
<suppress
20+
files=".*Test.java"
21+
checks=".*" />
922
</suppressions>

pom.xml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44
<parent>
55
<groupId>io.goobi.workflow</groupId>
66
<artifactId>workflow-base</artifactId>
7-
<version>25.07</version>
7+
<version>25.08</version>
88
<relativePath/>
99
</parent>
1010
<artifactId>workflow-core</artifactId>
1111
<packaging>war</packaging>
12+
<properties>
13+
<!-- Checkstyle -->
14+
<checkstyle.max.violations>1800</checkstyle.max.violations>
15+
<skipCheckstyle>false</skipCheckstyle>
16+
</properties>
1217
<repositories>
1318
<repository>
1419
<id>intranda-public</id>
@@ -28,9 +33,44 @@
2833
<plugin>
2934
<groupId>org.apache.maven.plugins</groupId>
3035
<artifactId>maven-checkstyle-plugin</artifactId>
36+
<version>3.6.0</version>
37+
<inherited>true</inherited>
38+
<dependencies>
39+
<dependency>
40+
<groupId>com.puppycrawl.tools</groupId>
41+
<artifactId>checkstyle</artifactId>
42+
<version>10.21.1</version>
43+
</dependency>
44+
<dependency>
45+
<groupId>io.goobi.workflow</groupId>
46+
<artifactId>workflow-maven-config</artifactId>
47+
<version>25.08</version>
48+
</dependency>
49+
</dependencies>
50+
<!-- TODO: Check where and how to execute checkstyle -->
3151
<configuration>
52+
<configLocation>checkstyle.xml</configLocation>
3253
<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
3354
</configuration>
55+
<executions>
56+
<execution>
57+
<id>checkstyle-check</id>
58+
<phase>verify</phase>
59+
<configuration>
60+
<skip>${skipCheckstyle}</skip>
61+
<failOnViolation>true</failOnViolation>
62+
<failsOnError>false</failsOnError>
63+
<logViolationsToConsole>true</logViolationsToConsole>
64+
<maxAllowedViolations>${checkstyle.max.violations}</maxAllowedViolations>
65+
<violationSeverity>warning</violationSeverity>
66+
<configLocation>checkstyle.xml</configLocation>
67+
<inputEncoding>UTF-8</inputEncoding>
68+
</configuration>
69+
<goals>
70+
<goal>check</goal>
71+
</goals>
72+
</execution>
73+
</executions>
3474
</plugin>
3575
<plugin>
3676
<groupId>com.github.eirslett</groupId>

src/main/java/de/sub/goobi/beans/property/IGoobiProperty.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,43 +31,43 @@
3131

3232
public interface IGoobiProperty {
3333

34-
public Integer getId();
34+
Integer getId();
3535

36-
public void setId(Integer id);
36+
void setId(Integer id);
3737

38-
public String getTitel();
38+
String getTitel();
3939

40-
public void setTitel(String titel);
40+
void setTitel(String titel);
4141

42-
public String getWert();
42+
String getWert();
4343

44-
public void setWert(String wert);
44+
void setWert(String wert);
4545

46-
public void setCreationDate(Date creation);
46+
void setCreationDate(Date creation);
4747

48-
public Date getCreationDate();
48+
Date getCreationDate();
4949

5050
/**
51-
* set datentyp to specific value from {@link PropertyType}
51+
* set datentyp to specific value from {@link PropertyType}.
5252
*
5353
* @param inType as {@link PropertyType}
5454
*/
55-
public void setType(PropertyType inType);
55+
void setType(PropertyType inType);
5656

5757
/**
58-
* get datentyp as {@link PropertyType}
58+
* get datentyp as {@link PropertyType}.
5959
*
6060
* @return current datentyp
6161
*/
62-
public PropertyType getType();
62+
PropertyType getType();
6363

64-
public void setContainer(String name);
64+
void setContainer(String name);
6565

66-
public String getContainer();
66+
String getContainer();
6767

68-
public String getNormalizedTitle();
68+
String getNormalizedTitle();
6969

70-
public String getNormalizedValue();
70+
String getNormalizedValue();
7171

72-
public String getNormalizedDate();
72+
String getNormalizedDate();
7373
}

src/main/java/de/sub/goobi/config/ConfigExportValidation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
*/
3636

3737
@Log4j2
38-
public class ConfigExportValidation {
38+
public final class ConfigExportValidation {
3939

4040
private ConfigExportValidation() {
4141
}

src/main/java/de/sub/goobi/config/ConfigNormdata.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import lombok.extern.log4j.Log4j2;
3131

3232
@Log4j2
33-
public class ConfigNormdata {
33+
public final class ConfigNormdata {
3434

3535
private ConfigNormdata() {
3636
}

src/main/java/de/sub/goobi/config/ConfigPlugins.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,30 @@
3737
import lombok.extern.log4j.Log4j2;
3838

3939
@Log4j2
40-
public class ConfigPlugins {
40+
public final class ConfigPlugins {
4141

4242
private ConfigPlugins() {
4343

4444
}
4545

4646
/**
47-
* pass back the right configuration file by giving the plugin class
47+
* pass back the right configuration file by giving the plugin class.
4848
*
4949
* @deprecated use getPluginConfig(String pluginname) for this instead
50+
* @param inPlugin plugin object
51+
* @return XMLConfiguration
5052
*/
5153
@Deprecated(since = "3.0", forRemoval = false)
5254
public static XMLConfiguration getPluginConfig(IPlugin inPlugin) {
5355
return getPluginConfig(inPlugin.getClass().getSimpleName());
5456
}
5557

5658
/**
57-
* pass back the right configuration by giving the internal plugin name
59+
* pass back the right configuration by giving the internal plugin name.
5860
*
5961
* @param pluginname Name of the plugin to use for finding the right configuration file in the config folder
62+
*
63+
* @return XMLConfiguration
6064
*/
6165
public static XMLConfiguration getPluginConfig(String pluginname) {
6266
String file = "plugin_" + pluginname + ".xml";
@@ -80,6 +84,8 @@ public static XMLConfiguration getPluginConfig(String pluginname) {
8084
*
8185
* @param pluginname Name of the plugin to use for finding the right configuration file in the config folder
8286
* @param step Step to be used to detect the right sub-configuration
87+
*
88+
* @return SubnodeConfiguration
8389
*/
8490
public static SubnodeConfiguration getProjectAndStepConfig(String pluginname, Step step) {
8591

src/main/java/de/sub/goobi/config/ConfigProjects.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public ConfigProjects(String projectTitle, String configPfad) throws IOException
114114
// if not, try to load 'default' project
115115
if (projectNameInFile == null) {
116116
for (String name : projectNames) {
117-
if (name.equalsIgnoreCase("default")) {
117+
if ("default".equalsIgnoreCase(name)) {
118118
projectNameInFile = name;
119119
break;
120120
}
@@ -149,7 +149,7 @@ public String getParamString(String inParameter) {
149149
this.config.setListDelimiter('&');
150150
String rueckgabe = this.config.getString(inParameter);
151151
return cleanXmlFormatedString(rueckgabe);
152-
} catch (RuntimeException e) {
152+
} catch (NoSuchElementException e) {
153153
log.error(e);
154154
return null;
155155
}
@@ -178,6 +178,7 @@ private String cleanXmlFormatedString(String inString) {
178178
* default value from the second parameter is returned.
179179
*
180180
* @param inParameter The name of the parameter that should be searched
181+
* @param inDefaultIfNull default value to use
181182
* @return The value that is configured for the parameter or the default value in case of no fitting parameter
182183
*/
183184
public String getParamString(String inParameter, String inDefaultIfNull) {
@@ -186,7 +187,7 @@ public String getParamString(String inParameter, String inDefaultIfNull) {
186187
String myParam = inParameter;
187188
String rueckgabe = this.config.getString(myParam, inDefaultIfNull);
188189
return cleanXmlFormatedString(rueckgabe);
189-
} catch (RuntimeException e) {
190+
} catch (NoSuchElementException e) {
190191
return inDefaultIfNull;
191192
}
192193
}
@@ -201,7 +202,7 @@ public String getParamString(String inParameter, String inDefaultIfNull) {
201202
public boolean getParamBoolean(String inParameter) {
202203
try {
203204
return this.config.getBoolean(inParameter);
204-
} catch (RuntimeException e) {
205+
} catch (NoSuchElementException e) {
205206
return false;
206207
}
207208
}
@@ -215,7 +216,7 @@ public boolean getParamBoolean(String inParameter) {
215216
public long getParamLong(String inParameter) {
216217
try {
217218
return this.config.getLong(inParameter);
218-
} catch (RuntimeException e) {
219+
} catch (NoSuchElementException e) {
219220
log.error(e);
220221
return 0;
221222
}
@@ -231,7 +232,7 @@ public long getParamLong(String inParameter) {
231232
public List<String> getParamList(String inParameter) {
232233
try {
233234
return Arrays.asList(this.config.getStringArray(inParameter));
234-
} catch (RuntimeException e) {
235+
} catch (NoSuchElementException e) {
235236
log.error(e);
236237
return new ArrayList<>();
237238
}
@@ -247,7 +248,7 @@ public List<String> getParamList(String inParameter) {
247248
public List<HierarchicalConfiguration> getList(String inParameter) {
248249
try {
249250
return config.configurationsAt(inParameter);
250-
} catch (RuntimeException e) {
251+
} catch (NoSuchElementException e) {
251252
log.error(e);
252253
return new ArrayList<>();
253254
}

0 commit comments

Comments
 (0)