diff options
author | 2014-07-30 16:58:00 +0000 | |
---|---|---|
committer | 2014-07-30 16:58:00 +0000 | |
commit | ec8472b5f5e478ba4eb830a7603da9c5a4637461 (patch) | |
tree | 25add4320dd2185e8318cea03492ad26447de945 /java/src/com/android/inputmethod/event/CombinerChain.java | |
parent | 14d985bdbdfd4a237add1009912a6920573c1a9d (diff) | |
parent | 7f545a57c987862d55966ac08ef64cfe0b9f51e4 (diff) | |
download | latinime-ec8472b5f5e478ba4eb830a7603da9c5a4637461.tar.gz latinime-ec8472b5f5e478ba4eb830a7603da9c5a4637461.tar.xz latinime-ec8472b5f5e478ba4eb830a7603da9c5a4637461.zip |
am 7f545a57: [HW7.5] Introduce the @Nonnull annotation (take 2)
* commit '7f545a57c987862d55966ac08ef64cfe0b9f51e4':
[HW7.5] Introduce the @Nonnull annotation (take 2)
Diffstat (limited to 'java/src/com/android/inputmethod/event/CombinerChain.java')
-rw-r--r-- | java/src/com/android/inputmethod/event/CombinerChain.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/event/CombinerChain.java b/java/src/com/android/inputmethod/event/CombinerChain.java index 8ddc9e7d9..f69bf4fd0 100644 --- a/java/src/com/android/inputmethod/event/CombinerChain.java +++ b/java/src/com/android/inputmethod/event/CombinerChain.java @@ -24,6 +24,8 @@ import com.android.inputmethod.latin.Constants; import java.util.ArrayList; import java.util.HashMap; +import javax.annotation.Nonnull; + /** * This class implements the logic chain between receiving events and generating code points. * @@ -87,6 +89,7 @@ public class CombinerChain { * @return the processed event. It may be the same event, or a consumed event, or a completely * new event. However it may never be null. */ + @Nonnull public Event processEvent(final ArrayList<Event> previousEvents, final Event newEvent) { final ArrayList<Event> modifiablePreviousEvents = new ArrayList<>(previousEvents); Event event = newEvent; @@ -94,10 +97,6 @@ public class CombinerChain { // A combiner can never return more than one event; it can return several // code points, but they should be encapsulated within one event. event = combiner.processEvent(modifiablePreviousEvents, event); - if (null == event) { - // Combiners return null if they eat the event. - break; - } } return event; } |