diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-30 20:28:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-30 21:07:41 +0000 |
commit | 4f4c3032d3425f9757e0a27191e4f2c4fe5a4f17 (patch) | |
tree | f7fb25fee096156207d94669cc2af07c4555c017 /qadevOOo | |
parent | d77af785f962efa6f783a5106671d608c313f853 (diff) |
coverity#1326927 silence Suspicious use of non-short-circuit boolean operator
Change-Id: I2973ab6cd021e4a36f11ae97d926faca77ea42be
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java b/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java index dcdca9f0a684..d33165fd78a2 100644 --- a/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java +++ b/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java @@ -582,15 +582,21 @@ public class _XBreakIterator extends MultiMethodTest { for(int i = 0; i < vCharBlockBounds.size() - 1; i++) { int endPos = vCharBlockBounds.get(i).endPos; int startPos = vCharBlockBounds.get(i + 1).startPos; - bCharBlockRes &= endPos == startPos; + if (endPos != startPos) { + bCharBlockRes = false; + } } log.println("Testing for no intersections : " + bCharBlockRes); int startPos = vCharBlockBounds.get(0).startPos; - bCharBlockRes &= startPos == 0; + if (startPos != 0) { + bCharBlockRes = false; + } int endPos = vCharBlockBounds.get (vCharBlockBounds.size() - 1).endPos; - bCharBlockRes &= endPos == UnicodeString.length(); + if (endPos != UnicodeString.length()) { + bCharBlockRes = false; + } log.println("Regions should starts with 0 and ends with " + UnicodeString.length()); |