[MATH-831] Use String.length check instead of isEmpty due to jdk1.5 compatibility.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1364793 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2012-07-23 20:46:28 +00:00
parent 2166fdac3d
commit 7d077b1431
1 changed files with 4 additions and 2 deletions

View File

@ -323,7 +323,8 @@ public class RealMatrixFormat {
if (!rowComponents.isEmpty()) {
CompositeFormat.parseAndIgnoreWhitespace(source, pos);
if (!CompositeFormat.parseFixedstring(source, trimmedColumnSeparator, pos)) {
if (!trimmedRowSuffix.isEmpty() && !CompositeFormat.parseFixedstring(source, trimmedRowSuffix, pos)) {
if (trimmedRowSuffix.length() != 0 &&
!CompositeFormat.parseFixedstring(source, trimmedRowSuffix, pos)) {
return null;
} else {
CompositeFormat.parseAndIgnoreWhitespace(source, pos);
@ -338,7 +339,8 @@ public class RealMatrixFormat {
}
} else {
CompositeFormat.parseAndIgnoreWhitespace(source, pos);
if (!trimmedRowPrefix.isEmpty() && !CompositeFormat.parseFixedstring(source, trimmedRowPrefix, pos)) {
if (trimmedRowPrefix.length() != 0 &&
!CompositeFormat.parseFixedstring(source, trimmedRowPrefix, pos)) {
return null;
}
}