sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1690244 - /sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/CoordinateOperationMethodsHTML.java
Date Fri, 10 Jul 2015 11:04:51 GMT
Author: desruisseaux
Date: Fri Jul 10 11:04:50 2015
New Revision: 1690244

URL: http://svn.apache.org/r1690244
Log:
Modification in the sorting order of coordinate operation methods.

Modified:
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/CoordinateOperationMethodsHTML.java

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/CoordinateOperationMethodsHTML.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/CoordinateOperationMethodsHTML.java?rev=1690244&r1=1690243&r2=1690244&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/CoordinateOperationMethodsHTML.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/CoordinateOperationMethodsHTML.java
[UTF-8] Fri Jul 10 11:04:50 2015
@@ -79,7 +79,9 @@ public final class CoordinateOperationMe
         Collections.sort(methods, (final OperationMethod o1, final OperationMethod o2) ->
{
             int c = category(o1) - category(o2);
             if (c == 0) {  // If the two methods are in the same category, sort by name.
-                c = o1.getName().getCode().compareTo(o2.getName().getCode());
+                final String n1 = o1.getName().getCode().replace('(',' ').replace(')',' ').replace('_','
');
+                final String n2 = o2.getName().getCode().replace('(',' ').replace(')',' ').replace('_','
');
+                c = n1.compareTo(n2);
             }
             return c;
         });
@@ -485,6 +487,9 @@ public final class CoordinateOperationMe
     private static String getUnit(final ParameterDescriptor<?> param) {
         final String unit = PatchedUnitFormat.toString(param.getUnit());
         if (unit != null && !unit.isEmpty()) {
+            if (unit.equals("°")) {
+                return unit;
+            }
             return " " + unit;
         }
         return "";



Mime
View raw message