From 92cb639463fcd6c3e7a8e8a68082b960861eeda7 Mon Sep 17 00:00:00 2001 From: kruland2607 Date: Thu, 9 Aug 2012 13:02:53 +0000 Subject: [PATCH] Minor changes for Froyo compatibility. git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@961 180e2498-e6e9-4542-8430-84ac67f01cd8 --- core/src/net/sf/openrocket/rocketcomponent/FinSet.java | 3 ++- .../simulation/customexpression/CustomExpression.java | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/src/net/sf/openrocket/rocketcomponent/FinSet.java b/core/src/net/sf/openrocket/rocketcomponent/FinSet.java index 5e40810b..4b8d5805 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/FinSet.java +++ b/core/src/net/sf/openrocket/rocketcomponent/FinSet.java @@ -7,6 +7,7 @@ import java.util.List; import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.startup.Application; +import net.sf.openrocket.util.ArrayUtils; import net.sf.openrocket.util.Coordinate; import net.sf.openrocket.util.MathUtil; import net.sf.openrocket.util.Transformation; @@ -675,7 +676,7 @@ public abstract class FinSet extends ExternalComponent { double y = -getTabHeight(); int n = points.length; - points = Arrays.copyOf(points, points.length + 4); + points = ArrayUtils.copyOf(points, points.length + 4); points[n] = new Coordinate(x2, 0); points[n + 1] = new Coordinate(x2, y); points[n + 2] = new Coordinate(x1, y); diff --git a/core/src/net/sf/openrocket/simulation/customexpression/CustomExpression.java b/core/src/net/sf/openrocket/simulation/customexpression/CustomExpression.java index ddafd9bf..40b3d700 100644 --- a/core/src/net/sf/openrocket/simulation/customexpression/CustomExpression.java +++ b/core/src/net/sf/openrocket/simulation/customexpression/CustomExpression.java @@ -200,7 +200,7 @@ public class CustomExpression implements Cloneable{ } public boolean checkSymbol(){ - if (symbol.trim().isEmpty()) + if ("".equals(symbol.trim())) return false; // No bad characters @@ -226,7 +226,7 @@ public class CustomExpression implements Cloneable{ } public boolean checkName(){ - if (name.trim().isEmpty()) + if ("".equals(name.trim())) return false; // No characters that could mess things up saving etc @@ -275,7 +275,7 @@ public class CustomExpression implements Cloneable{ * building the expression. */ public boolean checkExpression(){ - if (expression.trim().isEmpty()){ + if ("".equals(expression.trim())){ return false; } -- 2.30.2