Fix get card data (#8)

This commit is contained in:
struga 2022-03-01 13:23:22 +03:00 committed by GitHub
parent 4ae1db1be5
commit a99037996a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 11 deletions

View File

@ -13,7 +13,7 @@
</parent> </parent>
<artifactId>adapter-flow-lib</artifactId> <artifactId>adapter-flow-lib</artifactId>
<version>0.0.4</version> <version>0.0.5</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>adapter-flow-lib</name> <name>adapter-flow-lib</name>

View File

@ -18,16 +18,7 @@ public class TagManagementService {
Optional<String> first = adapterProperties.getTagGeneratorFieldNames().stream() Optional<String> first = adapterProperties.getTagGeneratorFieldNames().stream()
.filter(s -> StringUtils.hasText(parameters.get(s))) .filter(s -> StringUtils.hasText(parameters.get(s)))
.findFirst(); .findFirst();
return first.get(); return adapterProperties.getTagPrefix() + parameters.get(first.get());
} }
@SneakyThrows
public String get(Map<String, String> parameters) {
Optional<String> first = adapterProperties.getTagGeneratorFieldNames().stream()
.filter(s -> StringUtils.hasText(parameters.get(s)))
.findFirst();
return first.get();
}
} }