You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by nd...@apache.org on 2009/10/10 04:04:30 UTC
svn commit: r823761 -
/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ScrollStateController.java
Author: ndbeyer
Date: Sat Oct 10 02:04:29 2009
New Revision: 823761
URL: http://svn.apache.org/viewvc?rev=823761&view=rev
Log:
remove unnecessary null check - if field were null, a NPE would have been thrown before this point
Modified:
harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ScrollStateController.java
Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ScrollStateController.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ScrollStateController.java?rev=823761&r1=823760&r2=823761&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ScrollStateController.java (original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ScrollStateController.java Sat Oct 10 02:04:29 2009
@@ -272,12 +272,8 @@
int compSize = 0;
int adjSize = (isVertical ? scrollable.getAdjustableWidth()
: scrollable.getAdjustableHeight());
- if (comp != null) {
- Dimension prefSize = scrollable.getSize();
- compSize = isVertical ? prefSize.height
- : prefSize.width;
- }
- return ((spSize < compSize) &&
- (spOtherSize > adjSize + GAP));
+ Dimension prefSize = scrollable.getSize();
+ compSize = isVertical ? prefSize.height : prefSize.width;
+ return ((spSize < compSize) && (spOtherSize > adjSize + GAP));
}
}
\ No newline at end of file