Minor changes for Froyo compatibility.

This commit is contained in:
Kevin Ruland 2012-08-09 13:02:53 +00:00
parent 3cc439e490
commit 91ac8deb7d
2 changed files with 5 additions and 4 deletions

View File

@ -7,6 +7,7 @@ import java.util.List;
import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.startup.Application; import net.sf.openrocket.startup.Application;
import net.sf.openrocket.util.ArrayUtils;
import net.sf.openrocket.util.Coordinate; import net.sf.openrocket.util.Coordinate;
import net.sf.openrocket.util.MathUtil; import net.sf.openrocket.util.MathUtil;
import net.sf.openrocket.util.Transformation; import net.sf.openrocket.util.Transformation;
@ -675,7 +676,7 @@ public abstract class FinSet extends ExternalComponent {
double y = -getTabHeight(); double y = -getTabHeight();
int n = points.length; 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] = new Coordinate(x2, 0);
points[n + 1] = new Coordinate(x2, y); points[n + 1] = new Coordinate(x2, y);
points[n + 2] = new Coordinate(x1, y); points[n + 2] = new Coordinate(x1, y);

View File

@ -200,7 +200,7 @@ public class CustomExpression implements Cloneable{
} }
public boolean checkSymbol(){ public boolean checkSymbol(){
if (symbol.trim().isEmpty()) if ("".equals(symbol.trim()))
return false; return false;
// No bad characters // No bad characters
@ -226,7 +226,7 @@ public class CustomExpression implements Cloneable{
} }
public boolean checkName(){ public boolean checkName(){
if (name.trim().isEmpty()) if ("".equals(name.trim()))
return false; return false;
// No characters that could mess things up saving etc // No characters that could mess things up saving etc
@ -275,7 +275,7 @@ public class CustomExpression implements Cloneable{
* building the expression. * building the expression.
*/ */
public boolean checkExpression(){ public boolean checkExpression(){
if (expression.trim().isEmpty()){ if ("".equals(expression.trim())){
return false; return false;
} }