Merge commit '42b2e5ca519766e37ce6941ba4faecc9691cc403' into upstream
[debian/openrocket] / core / src / net / sf / openrocket / file / rocksim / importt / FinSetHandler.java
index 9b42617b0ffa2a09443aae64d3dd6d3ed01b02b4..01b49030d0ccf1428bee439da11601780e7416ac 100644 (file)
@@ -7,6 +7,7 @@ import net.sf.openrocket.aerodynamics.WarningSet;
 import net.sf.openrocket.file.rocksim.RocksimCommonConstants;
 import net.sf.openrocket.file.rocksim.RocksimFinishCode;
 import net.sf.openrocket.file.rocksim.RocksimLocationMode;
+import net.sf.openrocket.file.simplesax.AbstractElementHandler;
 import net.sf.openrocket.file.simplesax.ElementHandler;
 import net.sf.openrocket.file.simplesax.PlainTextHandler;
 import net.sf.openrocket.material.Material;
@@ -31,7 +32,7 @@ import java.util.List;
  * characteristics are kept here until the closing FinSet tag. At that point, <code>asOpenRocket</code> method is called
  * to construct the corresponding OpenRocket FinSet.
  */
-class FinSetHandler extends ElementHandler {
+class FinSetHandler extends AbstractElementHandler {
     /**
      * The parent component.
      */
@@ -329,7 +330,7 @@ class FinSetHandler extends ElementHandler {
      */
     private Coordinate[] toCoordinates (String pointList, WarningSet warnings) {
         List<Coordinate> result = new ArrayList<Coordinate>();
-        if (pointList != null && !pointList.isEmpty()) {
+        if (pointList != null && pointList.length() > 0) {
             String[] points = pointList.split("\\Q|\\E");
             for (String point : points) {
                 String[] aPoint = point.split(",");