Skip to content

Commit 4b36a4b

Browse files
authored
Merge pull request #1410 from ie3-institute/df/#1409-spotless-java-format
Change spotless to use googleJavaFormat('1.28.0')
2 parents b4b11ad + 9b30fbc commit 4b36a4b

File tree

66 files changed

+393
-127
lines changed

Some content is hidden

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

66 files changed

+393
-127
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
### Changed
1919
- Updated CI-Pipeline to run task `Deploy` and `Staging` only for `Main` [#1403](https://github.com/ie3-institute/PowerSystemDataModel/issues/1403)
2020
- Extend `GermanVoltageLevelUtils` with more synonymousIds [#143](https://github.com/ie3-institute/PowerSystemDataModel/issues/143)
21+
- Change spotless to use googleJavaFormat('1.28.0') [#1409](https://github.com/ie3-institute/PowerSystemDataModel/issues/1409)
2122

2223
## [8.1.0] - 2025-07-25
2324

gradle/scripts/spotless.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ spotless {
1010
//sets a license header, removes unused imports and formats conforming to the google java format
1111
java {
1212
removeUnusedImports() // removes any unused imports
13-
googleJavaFormat('1.13.0')
13+
googleJavaFormat('1.28.0')
1414
licenseHeader ie3LicHead
1515
}
1616

src/main/java/edu/ie3/datamodel/exceptions/FailedValidationException.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ public FailedValidationException(String message) {
2121
super(message);
2222
}
2323

24-
/** @param exceptions List of exceptions, which must not be empty */
24+
/**
25+
* @param exceptions List of exceptions, which must not be empty
26+
*/
2527
public FailedValidationException(List<? extends Exception> exceptions) {
2628
super("Validation failed due to:\n " + ExceptionUtils.combineExceptions(exceptions));
2729
}

src/main/java/edu/ie3/datamodel/graph/SubGridGate.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,14 @@ public static SubGridGate fromTransformer3W(
4343
return switch (inferiorPort) {
4444
case B -> new SubGridGate(transformer, transformer.getNodeA(), transformer.getNodeB());
4545
case C -> new SubGridGate(transformer, transformer.getNodeA(), transformer.getNodeC());
46-
default -> throw new IllegalArgumentException(
47-
"Only port "
48-
+ ConnectorPort.B
49-
+ " or "
50-
+ ConnectorPort.C
51-
+ " can be "
52-
+ "chosen as inferior port.");
46+
default ->
47+
throw new IllegalArgumentException(
48+
"Only port "
49+
+ ConnectorPort.B
50+
+ " or "
51+
+ ConnectorPort.C
52+
+ " can be "
53+
+ "chosen as inferior port.");
5354
};
5455
}
5556

src/main/java/edu/ie3/datamodel/io/DbGridMetadata.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ public String toString() {
2121
return GRID_NAME_COLUMN + "=" + gridName + ", " + GRID_UUID_COLUMN + "=" + uuid.toString();
2222
}
2323

24-
/** @return Stream with grid uuid */
24+
/**
25+
* @return Stream with grid uuid
26+
*/
2527
public Stream<String> getStreamForQuery() {
2628
return Stream.of(quote(uuid.toString(), "'"));
2729
}

src/main/java/edu/ie3/datamodel/io/SqlUtils.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ private static String beginQueryCreateTable(String schemaName, String tableName)
2323
return "CREATE TABLE " + schemaName + "." + tableName + "\n(\n";
2424
}
2525

26-
/** @return query to create a SQL table for a grid */
26+
/**
27+
* @return query to create a SQL table for a grid
28+
*/
2729
public static String queryCreateGridTable(String schemaName) {
2830
return beginQueryCreateTable(schemaName, DbGridMetadata.GRID_TABLE_COLUMN)
2931
+ "\tuuid uuid PRIMARY KEY,\n\tname TEXT NOT NULL\n"

src/main/java/edu/ie3/datamodel/io/connectors/CouchbaseConnector.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ public void shutdown() {
137137
cluster.disconnect();
138138
}
139139

140-
/** @return the bucket name */
140+
/**
141+
* @return the bucket name
142+
*/
141143
public String getBucketName() {
142144
return bucketName;
143145
}

src/main/java/edu/ie3/datamodel/io/factory/timeseries/BdewLoadProfileFactory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ public ComparableQuantity<Power> calculateMaxPower(
9595
Function<BdewLoadValues, Double> valueExtractor =
9696
switch (loadProfile) {
9797
case H0, H25, P25, S25 ->
98-
// maximum dynamization factor is on day 366 (leap year) or day 365 (regular year).
99-
// The difference between day 365 and day 366 is negligible, thus pick 366
100-
v -> BdewLoadValues.dynamization(v.getMaxValue(true), 366);
98+
// maximum dynamization factor is on day 366 (leap year) or day 365 (regular year).
99+
// The difference between day 365 and day 366 is negligible, thus pick 366
100+
v -> BdewLoadValues.dynamization(v.getMaxValue(true), 366);
101101
default -> v -> v.getMaxValue(false);
102102
};
103103

src/main/java/edu/ie3/datamodel/io/factory/timeseries/IdCoordinateFactory.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,18 @@ protected IdCoordinateFactory() {
1919
super(IdCoordinateInput.class);
2020
}
2121

22-
/** @return the field id for the coordinate id */
22+
/**
23+
* @return the field id for the coordinate id
24+
*/
2325
public abstract String getIdField();
2426

25-
/** @return the field id for the coordinate latitude */
27+
/**
28+
* @return the field id for the coordinate latitude
29+
*/
2630
public abstract String getLatField();
2731

28-
/** @return the field id for the coordinate longitude */
32+
/**
33+
* @return the field id for the coordinate longitude
34+
*/
2935
public abstract String getLonField();
3036
}

src/main/java/edu/ie3/datamodel/io/naming/EntityPersistenceNamingStrategy.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public class EntityPersistenceNamingStrategy {
4141

4242
private static final String UUID_STRING =
4343
"[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}";
44+
4445
/**
4546
* Regex to match the naming convention of a source for an individual time series. The column
4647
* scheme is accessible via the named capturing group "columnScheme". The time series' UUID is

0 commit comments

Comments
 (0)