changeset 9210:de55d9a94796

Fixed: was using java 7 features in java 6 code
author gernotbelger
date Tue, 03 Jul 2018 13:00:56 +0200
parents f7f226666c59
children aca5a7a57a3a
files gwt-client/src/test/java/test/AbstractModuleRunner.java
diffstat 1 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/gwt-client/src/test/java/test/AbstractModuleRunner.java	Tue Jul 03 11:29:58 2018 +0200
+++ b/gwt-client/src/test/java/test/AbstractModuleRunner.java	Tue Jul 03 13:00:56 2018 +0200
@@ -65,6 +65,8 @@
         sinfo
     }
 
+    private static final String lineSeparator = System.getProperty("line.separator");
+
     private final String serverUrl = "http://localhost:8181";
     private final String locale = "de";
     private final HttpClient client;
@@ -171,14 +173,14 @@
 
         final String[] states = artifact.getArtifactDescription().getReachableStates();
         if (states != null) {
-            if (states.length > index) {
+
+            if (states.length > index)
                 return states[index];
-            } else {
-                return states[0];
-            }
-        } else {
-            return "";
+
+            return states[0];
         }
+
+        return "";
     }
 
     private final void feed(final Data[] data) throws ServerException, ConnectionException {
@@ -270,11 +272,11 @@
 
     private final String deleteErstelldatum(final String input) {
         String result = "";
-        final String[] lines = input.split(System.lineSeparator());
+        final String[] lines = input.split(lineSeparator);
         for (final String line : lines) {
             if (!line.contains(AbstractModuleRunner.IGNORE_ERSTELLDATUM) && !line.contains(AbstractModuleRunner.IGNORE_FLYS_VERSION)
                     && !line.contains(AbstractModuleRunner.IGNORE_BEARBEITER)) {
-                result = result + line + System.lineSeparator();
+                result = result + line + lineSeparator;
             }
         }
         return result;
@@ -340,5 +342,4 @@
 
         return rec1.getRecommendationPairString(rec2, getCollection(), this.serverUrl, this.locale);
     }
-
-}
+}
\ No newline at end of file

http://dive4elements.wald.intevation.org