Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/XMLMemento.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/XMLMemento.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/XMLMemento.java
index fb50ce9dc..2a54c851b 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/XMLMemento.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/XMLMemento.java
@@ -16,8 +16,6 @@ import java.io.PrintWriter;
import java.io.Reader;
import java.io.Writer;
import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.function.Predicate;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -73,12 +71,15 @@ public final class XMLMemento {
StringBuffer strNewValue = new StringBuffer(FILE_STRING);
if (attributeOldValue instanceof String && ((String) attributeOldValue).length() != 0) {
String strOldValue = (String) attributeOldValue;
- boolean exists = Arrays.asList(strOldValue.split(",")).stream().anyMatch(new Predicate<String>() { //$NON-NLS-1$
- @Override
- public boolean test(String x) {
- return x.trim().equals(FILE_STRING);
+ boolean exists = false;
+ String[] splittedArray = strOldValue.split(","); //$NON-NLS-1$
+ for (int i = 0; i < splittedArray.length; i++) {
+ String item = splittedArray[i];
+ if (item.trim().equals(FILE_STRING)) {
+ exists = true;
+ break;
}
- });
+ }
if (!exists) {
strNewValue.append(", ").append(strOldValue); //$NON-NLS-1$
} else {

Back to the top