Skip to content

Commit 50e8afa

Browse files
committed
Fix sonarqube issues.
1 parent 39e1178 commit 50e8afa

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/java/edu/ie3/datamodel/utils/ExceptionUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ public static String combineExceptions(List<? extends Exception> exceptions) {
4242
exceptions.stream().map(converter).reduce("", (a, b) -> a + messageSeparator + b);
4343

4444
// some formating
45-
return messages.replaceAll("\n", "\n ").replaceFirst(messageSeparator, "");
45+
return messages.replace("\n", "\n ").replaceFirst(messageSeparator, "");
4646
}
4747
}

src/main/java/edu/ie3/datamodel/utils/Try.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ public static <D, E extends Exception> List<E> getExceptions(Try<? extends D, E>
167167
* @return a {@link Success} if no {@link Failure}'s are found in the collection
168168
* @param <U> type of data
169169
*/
170-
public static <U, E extends Exception, RE extends Exception> Try<Set<U>, RE> scanCollection(
171-
Collection<Try<U, E>> c, Class<U> typeOfData, Function<String, RE> exceptionBuilder) {
170+
public static <U, E extends Exception, R extends Exception> Try<Set<U>, R> scanCollection(
171+
Collection<Try<U, E>> c, Class<U> typeOfData, Function<String, R> exceptionBuilder) {
172172
return scanStream(c.stream(), typeOfData.getSimpleName(), exceptionBuilder)
173173
.transformS(stream -> stream.collect(Collectors.toSet()));
174174
}
@@ -183,8 +183,8 @@ public static <U, E extends Exception, RE extends Exception> Try<Set<U>, RE> sca
183183
* @return a {@link Success} if no {@link Failure}'s are found in the stream
184184
* @param <U> type of data
185185
*/
186-
public static <U, E extends Exception, RE extends Exception> Try<Stream<U>, RE> scanStream(
187-
Stream<Try<U, E>> stream, String typeOfData, Function<String, RE> exceptionBuilder) {
186+
public static <U, E extends Exception, R extends Exception> Try<Stream<U>, R> scanStream(
187+
Stream<Try<U, E>> stream, String typeOfData, Function<String, R> exceptionBuilder) {
188188
Map<Boolean, List<Try<U, E>>> map = stream.collect(partitioningBy(Try::isSuccess));
189189

190190
List<Try<U, E>> successes = map.get(true);

0 commit comments

Comments
 (0)