sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1396916 - in /sis/branches/JDK7/sis-utility/src: main/java/org/apache/sis/util/Exceptions.java main/java/org/apache/sis/util/resources/IndexedResourceBundle.java test/java/org/apache/sis/test/XMLComparator.java
Date Thu, 11 Oct 2012 05:59:34 GMT
Author: desruisseaux
Date: Thu Oct 11 05:59:33 2012
New Revision: 1396916

URL: http://svn.apache.org/viewvc?rev=1396916&view=rev
Log:
Replaced System.getProperty("line.separator") by calls to System.lineSeparator() (JDK7 only).

Modified:
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Exceptions.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
    sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/XMLComparator.java

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Exceptions.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Exceptions.java?rev=1396916&r1=1396915&r2=1396916&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Exceptions.java (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Exceptions.java Thu Oct
11 05:59:33 2012
@@ -106,7 +106,7 @@ public final class Exceptions extends St
                 if (buffer == null) {
                     done = new HashSet<>();
                     buffer = new StringBuilder(128);
-                    lineSeparator = System.getProperty("line.separator", "\n");
+                    lineSeparator = System.lineSeparator();
                     if (header != null && !(header = header.trim()).isEmpty()) {
                         buffer.append(header);
                         done.add(header);

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java?rev=1396916&r1=1396915&r2=1396916&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
(original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
Thu Oct 11 05:59:33 2012
@@ -299,7 +299,7 @@ public class IndexedResourceBundle exten
                 keyLength = Math.max(keyLength, key.length());
             }
         }
-        final String lineSeparator = System.getProperty("line.separator", "\n");
+        final String lineSeparator = System.lineSeparator();
         final String[] values = ensureLoaded(null);
         for (int i=0; i<values.length; i++) {
             final String key   = keys  [i];

Modified: sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/XMLComparator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/XMLComparator.java?rev=1396916&r1=1396915&r2=1396916&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/XMLComparator.java (original)
+++ sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/XMLComparator.java Thu
Oct 11 05:59:33 2012
@@ -506,7 +506,7 @@ public strictfp class XMLComparator {
             if (tolerance > 0 && abs(doubleValue(expected) - doubleValue(actual))
<= tolerance) {
                 return;
             }
-            final String lineSeparator = System.getProperty("line.separator", "\n");
+            final String lineSeparator = System.lineSeparator();
             final StringBuilder buffer = new StringBuilder(1024).append("Expected ")
                     .append(propertyName).append(" \"")
                     .append(expected).append("\" but got \"")
@@ -551,7 +551,7 @@ public strictfp class XMLComparator {
      * @return         An error message containing the expected and actual node.
      */
     protected String formatErrorMessage(final Node expected, final Node result) {
-        final String lineSeparator = System.getProperty("line.separator", "\n");
+        final String lineSeparator = System.lineSeparator();
         final StringBuilder buffer = new StringBuilder(256).append("Nodes are not equal:").append(lineSeparator);
         formatErrorMessage(buffer, expected, result, lineSeparator);
         return buffer.toString();



Mime
View raw message