Revision: 6226
          http://sourceforge.net/p/jump-pilot/code/6226
Author:   michaudm
Date:     2020-01-28 07:54:17 +0000 (Tue, 28 Jan 2020)
Log Message:
-----------
Fix PointsToPathsPlugIn

Modified Paths:
--------------
    
core/trunk/src/org/openjump/core/ui/plugin/tools/geometrychange/PointsToPathsPlugIn.java

Modified: 
core/trunk/src/org/openjump/core/ui/plugin/tools/geometrychange/PointsToPathsPlugIn.java
===================================================================
--- 
core/trunk/src/org/openjump/core/ui/plugin/tools/geometrychange/PointsToPathsPlugIn.java
    2020-01-27 00:24:47 UTC (rev 6225)
+++ 
core/trunk/src/org/openjump/core/ui/plugin/tools/geometrychange/PointsToPathsPlugIn.java
    2020-01-28 07:54:17 UTC (rev 6226)
@@ -96,7 +96,13 @@
                 list.add(feature);
             }
             Comparator<Feature> comparator = Comparator.comparing(new 
Function<Feature,Comparable>() {
-                public Comparable apply(Feature f) { return 
(Comparable)f.getAttribute(orderByAttribute); }
+                public Comparable apply(Feature f) {
+                    if (f.getSchema().hasAttribute(orderByAttribute)) {
+                        return (Comparable) f.getAttribute(orderByAttribute);
+                    } else {
+                        return f.getID();
+                    }
+                }
             });
             for (Map.Entry<Object,List<Feature>> entry : map.entrySet()) {
                 List<Feature> list = entry.getValue();



_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to