You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2012/07/23 22:46:28 UTC

svn commit: r1364793 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/RealMatrixFormat.java

Author: tn
Date: Mon Jul 23 20:46:28 2012
New Revision: 1364793

URL: http://svn.apache.org/viewvc?rev=1364793&view=rev
Log:
[MATH-831] Use String.length check instead of isEmpty due to jdk1.5 compatibility.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/RealMatrixFormat.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/RealMatrixFormat.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/RealMatrixFormat.java?rev=1364793&r1=1364792&r2=1364793&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/RealMatrixFormat.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/RealMatrixFormat.java Mon Jul 23 20:46:28 2012
@@ -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;
                 }
             }