harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r568963 - /harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/AttributedString.java
Date Thu, 23 Aug 2007 13:05:23 GMT
Author: tellison
Date: Thu Aug 23 06:05:22 2007
New Revision: 568963

URL: http://svn.apache.org/viewvc?rev=568963&view=rev
Log:
Remove redundant null checks, as value cannot be null.

Modified:
    harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/AttributedString.java

Modified: harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/AttributedString.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/AttributedString.java?rev=568963&r1=568962&r2=568963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/AttributedString.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/AttributedString.java
Thu Aug 23 06:05:22 2007
@@ -577,8 +577,7 @@
                 it.previous();
                 break;
             } else if (start < range.end
-                    || (start == range.end && (value == null ? range.value == null
-                            : value.equals(range.value)))) {
+                    || (start == range.end && value.equals(range.value))) {
                 Range r1 = null, r3;
                 it.remove();
                 r1 = new Range(range.start, start, range.value);
@@ -588,8 +587,7 @@
                     range = it.next();
                     if (end <= range.end) {
                         if (end > range.start
-                                || (end == range.start && (value == null ? range.value
== null
-                                        : value.equals(range.value)))) {
+                                || (end == range.start && value.equals(range.value)))
{
                             it.remove();
                             r3 = new Range(end, range.end, range.value);
                             break;
@@ -599,9 +597,8 @@
                     }
                 }
 
-                if (value == null ? r1.value == null : value.equals(r1.value)) {
-                    if (value == null ? r3.value == null : value
-                            .equals(r3.value)) {
+                if (value.equals(r1.value)) {
+                    if (value.equals(r3.value)) {
                         it.add(new Range(r1.start < start ? r1.start : start,
                                 r3.end > end ? r3.end : end, r1.value));
                     } else {
@@ -612,8 +609,7 @@
                         }
                     }
                 } else {
-                    if (value == null ? r3.value == null : value
-                            .equals(r3.value)) {
+                    if (value.equals(r3.value)) {
                         if (r1.start < r1.end) {
                             it.add(r1);
                         }



Mime
View raw message