Skip to content

Commit

Permalink
Merge pull request #4958 from markusweigelt/change_peeking_iterator_d…
Browse files Browse the repository at this point in the history
…ependency

change peeking iterator to PeekingIterator of org.apache.commons depe…
  • Loading branch information
Kathrin-Huber authored Feb 7, 2022
2 parents 3bea119 + 10b940f commit 4be8fa7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 17 deletions.
5 changes: 0 additions & 5 deletions Kitodo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -461,11 +461,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.collect</groupId>
<artifactId>com.springsource.com.google.common.collect</artifactId>
<version>0.8.0.20080820</version>
</dependency>
<!-- Primefaces extension for a frontend code editor -->
<dependency>
<groupId>org.primefaces.extensions</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ public static void setErrorMessage(String control, String message, Exception e)
*/
public static void setErrorMessage(String title, Object... parameters) {
if (Objects.nonNull(parameters) && parameters.length > 0) {
setErrorMessage(getTranslation(title, Arrays.stream(parameters).map(Object::toString).toArray(String[]::new)));
setErrorMessage(getTranslation(title,
Arrays.stream(parameters).map(object -> Objects.toString(object)).toArray(String[]::new)));
} else {
setErrorMessage(getTranslation(title));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@

package org.kitodo.production.migration;

import com.google.common.collect.Iterators;
import com.google.common.collect.PeekingIterator;


import java.io.File;
import java.io.IOException;
Expand All @@ -33,6 +32,8 @@

import javax.naming.ConfigurationException;

import org.apache.commons.collections4.iterators.PeekingIterator;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.kitodo.api.MdSec;
Expand Down Expand Up @@ -755,7 +756,7 @@ private String getYearTitle(String year) {
*/
public boolean hasNextYear() {
if (Objects.isNull(yearsIterator)) {
yearsIterator = Iterators.peekingIterator(years.entrySet().iterator());
yearsIterator = new PeekingIterator(years.entrySet().iterator());
}
return yearsIterator.hasNext();
}
Expand Down
8 changes: 0 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,6 @@
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>maven-eu</id>
<name>maven-eu Repository</name>
<url>https://maven-eu.nuxeo.org/nexus/content/repositories/public/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

<modules>
Expand Down

0 comments on commit 4be8fa7

Please sign in to comment.