From 7ce86ec84cab4869fe794081dd25926a172d2a1b Mon Sep 17 00:00:00 2001 From: Carsten Ziegeler Date: Wed, 27 Apr 2016 00:24:16 +0000 Subject: [PATCH] Update scr example git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1741129 13f79535-47bb-0310-9956-ffa450edef68 --- .../felix/examples/spellcheckscr/SpellCheckServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/spellcheckscr/src/main/java/org/apache/felix/examples/spellcheckscr/SpellCheckServiceImpl.java b/examples/spellcheckscr/src/main/java/org/apache/felix/examples/spellcheckscr/SpellCheckServiceImpl.java index 099795df135..42d174a9f83 100644 --- a/examples/spellcheckscr/src/main/java/org/apache/felix/examples/spellcheckscr/SpellCheckServiceImpl.java +++ b/examples/spellcheckscr/src/main/java/org/apache/felix/examples/spellcheckscr/SpellCheckServiceImpl.java @@ -93,6 +93,7 @@ public String[] check( String passage ) if ( dictionary.checkWord( word ) ) { correct = true; + break; } } @@ -105,7 +106,7 @@ public String[] check( String passage ) } // Return null if no words are incorrect. - if ( errorList.size() == 0 ) + if ( errorList.isEmpty() ) { return null; }