Skip to content

Commit 1b10e60

Browse files
authored
Merge branch 'dev' into sh/#872-storage-documentation
2 parents ae9c38f + 5aec8a0 commit 1b10e60

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Changed
1515
- Changing from comparing strings to comparing uuids in `EntitySource.findFirstEntityByUuid` [#829](https://github.com/ie3-institute/PowerSystemDataModel/issues/829)
16-
16+
- Adding JavaDoc to `EntitySource.safeMapGet` [#828](https://github.com/ie3-institute/PowerSystemDataModel/issues/828)
1717

1818
## [4.1.0] - 2023-11-02
1919

Jenkinsfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,6 @@ def constantBranchesProps() {
451451
[
452452
string(defaultValue: '', description: '', name: 'deploy', trim: true)
453453
]),
454-
[$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false],
455454
[$class: 'ThrottleJobProperty', categories: [], limitOneJobWithMatchingParams: false, maxConcurrentPerNode: 0, maxConcurrentTotal: 0, paramsToUseForLimit: '', throttleEnabled: true, throttleOption: 'project']
456455
])
457456
}

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
id 'maven-publish'
55
id 'signing'
66
id 'pmd' // code check, working on source code
7-
id 'com.diffplug.spotless' version '6.22.0' //code format
7+
id 'com.diffplug.spotless' version '6.23.0' //code format
88
id 'com.github.spotbugs' version '5.2.4' // code check, working on byte code
99
id 'de.undercouch.download' version '5.5.0'
1010
id 'kr.motd.sphinx' version '2.10.1' // documentation generation

src/main/java/edu/ie3/datamodel/io/source/EntitySource.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ protected String buildSkippingMessage(
5151
+ missingElementsString;
5252
}
5353

54+
/**
55+
* Method for retrieving an element from a map. If the map doesn't contain the key an error
56+
* message is build and returned instead.
57+
*
58+
* <p>Should not be used for other purposes than creating error messages.
59+
*
60+
* @param map with value
61+
* @param key for the value
62+
* @param mapName name of the map used for the error message
63+
* @return either the value or an error message
64+
*/
5465
protected String safeMapGet(Map<String, String> map, String key, String mapName) {
5566
return Optional.ofNullable(map.get(key))
5667
.orElse(
@@ -83,7 +94,7 @@ protected <T extends UniqueEntity> Optional<T> findFirstEntityByUuid(
8394
* the provided fields to values mapping. The provided fields to values mapping needs to have one
8495
* and only one field with key {@link #TYPE} and a corresponding UUID value. If the type can be
8596
* found in the provided collection based on the UUID it is returned wrapped in a {@link Success}.
86-
* Otherwise a {@link Failure} is returned and a warning is logged.
97+
* Otherwise, a {@link Failure} is returned and a warning is logged.
8798
*
8899
* @param types a collection of types that should be used for searching
89100
* @param fieldsToAttributes the field name to value mapping incl. the key {@link #TYPE}

0 commit comments

Comments
 (0)