commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1364793 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/RealMatrixFormat.java
Date Mon, 23 Jul 2012 20:46:28 GMT
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;
                 }
             }



Mime
View raw message