Revision: 1699 http://svn.sourceforge.net/spring-rich-c/?rev=1699&view=rev Author: ge0ffrey Date: 2007-01-27 07:03:37 -0800 (Sat, 27 Jan 2007)
Log Message: ----------- redundant conditional expression Modified Paths: -------------- trunk/spring-richclient/support/src/main/java/org/springframework/richclient/command/AbstractCommand.java trunk/spring-richclient/support/src/main/java/org/springframework/richclient/form/FormGuard.java Modified: trunk/spring-richclient/support/src/main/java/org/springframework/richclient/command/AbstractCommand.java =================================================================== --- trunk/spring-richclient/support/src/main/java/org/springframework/richclient/command/AbstractCommand.java 2007-01-27 14:44:36 UTC (rev 1698) +++ trunk/spring-richclient/support/src/main/java/org/springframework/richclient/command/AbstractCommand.java 2007-01-27 15:03:37 UTC (rev 1699) @@ -43,7 +43,6 @@ import org.springframework.richclient.command.support.CommandFaceButtonManager; import org.springframework.richclient.core.SecurityControllable; import org.springframework.richclient.factory.ButtonFactory; -import org.springframework.richclient.factory.LabelInfoFactory; import org.springframework.richclient.factory.MenuFactory; import org.springframework.util.Assert; import org.springframework.util.CachingMapDecorator; @@ -350,7 +349,7 @@ // We need to keep the buttons in sync with the command, so go through the buttons and set Enabled state. // alternative is to add a listener to the enabled value and change buttons in that listener // NOT redundant - boolean enabled = evt.getNewValue() == Boolean.TRUE ? true : false; + boolean enabled = evt.getNewValue() == Boolean.TRUE; Iterator it = buttonIterator(); while (it.hasNext()) { @@ -371,7 +370,7 @@ // We need to keep the buttons in sync with the command, so go through the buttons and set visible state. // alternative is to add a listener to the visible value and change buttons in that listener // NOT redundant - boolean enabled = evt.getNewValue() == Boolean.TRUE ? true : false; + boolean enabled = evt.getNewValue() == Boolean.TRUE; Iterator it = buttonIterator(); while (it.hasNext()) { Modified: trunk/spring-richclient/support/src/main/java/org/springframework/richclient/form/FormGuard.java =================================================================== --- trunk/spring-richclient/support/src/main/java/org/springframework/richclient/form/FormGuard.java 2007-01-27 14:44:36 UTC (rev 1698) +++ trunk/spring-richclient/support/src/main/java/org/springframework/richclient/form/FormGuard.java 2007-01-27 15:03:37 UTC (rev 1699) @@ -176,6 +176,6 @@ */ public boolean removeGuarded(Guarded toRemove) { Object mask = this.guardedEntries.remove(toRemove); - return mask == null ? false : true; + return mask != null; } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ spring-rich-c-cvs mailing list spring-rich-c-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spring-rich-c-cvs