From 60f152caeee38579433a31dd3a98e91dc3d23ff6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 13 Aug 2014 10:19:51 +0200 Subject: java: avoid unnecessary comparisons in boolean expressions i.e. stuff like "x == true" Change-Id: Ib82a4a30e736df392405332fa197b588482cffcf --- forms/qa/integration/forms/BooleanValidator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'forms/qa') diff --git a/forms/qa/integration/forms/BooleanValidator.java b/forms/qa/integration/forms/BooleanValidator.java index dfd3fcaa5eb8..730c45f65eb9 100644 --- a/forms/qa/integration/forms/BooleanValidator.java +++ b/forms/qa/integration/forms/BooleanValidator.java @@ -43,7 +43,7 @@ public class BooleanValidator extends integration.forms.ControlValidator if ( AnyConverter.isVoid( Value ) ) return "'indetermined' is not an allowed state"; boolean value = ((Boolean)Value).booleanValue(); - if ( m_preventChecked && ( value == true ) ) + if ( m_preventChecked && ( value ) ) return "no no no. Don't check it."; } catch( java.lang.Exception e ) @@ -61,7 +61,7 @@ public class BooleanValidator extends integration.forms.ControlValidator return false; boolean value = ((Boolean)Value).booleanValue(); - if ( m_preventChecked && ( value == true ) ) + if ( m_preventChecked && ( value ) ) return false; return true; } -- cgit