From 23c706ff915c4be7d371d3098fc8de2cc3aa2b67 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Wed, 16 Nov 2016 16:47:00 -0800 Subject: [PATCH] Add missing '@Override' annotations. --- .../commons/lang3/concurrent/AbstractCircuitBreaker.java | 6 ++++++ src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java | 1 + .../org/apache/commons/lang3/CharSequenceUtilsTest.java | 1 + .../apache/commons/lang3/builder/JsonToStringStyleTest.java | 1 + .../lang3/concurrent/EventCountCircuitBreakerTest.java | 1 + 5 files changed, 10 insertions(+) diff --git a/src/main/java/org/apache/commons/lang3/concurrent/AbstractCircuitBreaker.java b/src/main/java/org/apache/commons/lang3/concurrent/AbstractCircuitBreaker.java index bcafeb6ce..6eeade070 100644 --- a/src/main/java/org/apache/commons/lang3/concurrent/AbstractCircuitBreaker.java +++ b/src/main/java/org/apache/commons/lang3/concurrent/AbstractCircuitBreaker.java @@ -49,6 +49,7 @@ public abstract class AbstractCircuitBreaker implements CircuitBreaker { /** * {@inheritDoc} */ + @Override public boolean isOpen() { return isOpen(state.get()); } @@ -56,6 +57,7 @@ public abstract class AbstractCircuitBreaker implements CircuitBreaker { /** * {@inheritDoc} */ + @Override public boolean isClosed() { return !isOpen(); } @@ -63,16 +65,19 @@ public abstract class AbstractCircuitBreaker implements CircuitBreaker { /** * {@inheritDoc} */ + @Override public abstract boolean checkState(); /** * {@inheritDoc} */ + @Override public abstract boolean incrementAndCheckState(T increment); /** * {@inheritDoc} */ + @Override public void close() { changeState(State.CLOSED); } @@ -80,6 +85,7 @@ public abstract class AbstractCircuitBreaker implements CircuitBreaker { /** * {@inheritDoc} */ + @Override public void open() { changeState(State.OPEN); } diff --git a/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java b/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java index 39edfb244..de6170077 100644 --- a/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java @@ -4289,6 +4289,7 @@ public class ArrayUtilsTest { @Test public void testIsSortedComparator() { final Comparator c = new Comparator() { + @Override public int compare(final Integer o1, final Integer o2) { return o2.compareTo(o1); } diff --git a/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java b/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java index 7abafead5..30e992c05 100644 --- a/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java @@ -104,6 +104,7 @@ public class CharSequenceUtilsTest { this.expected = false; this.throwable = throwable; } + @Override public String toString(){ final StringBuilder sb = new StringBuilder(); sb.append(source).append("[").append(toffset).append("]"); diff --git a/src/test/java/org/apache/commons/lang3/builder/JsonToStringStyleTest.java b/src/test/java/org/apache/commons/lang3/builder/JsonToStringStyleTest.java index 682a6d26f..354398870 100644 --- a/src/test/java/org/apache/commons/lang3/builder/JsonToStringStyleTest.java +++ b/src/test/java/org/apache/commons/lang3/builder/JsonToStringStyleTest.java @@ -229,6 +229,7 @@ public class JsonToStringStyleTest { @Test public void testNestingPerson() { final Person p = new Person(){ + @Override public String toString(){ return new ToStringBuilder(this).append("name", this.name) .append("age", this.age).append("smoker", this.smoker) diff --git a/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java b/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java index 3c5dfe484..8e0ee2ac3 100644 --- a/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java +++ b/src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java @@ -379,6 +379,7 @@ public class EventCountCircuitBreakerTest { changedValues = new ArrayList<>(); } + @Override public void propertyChange(final PropertyChangeEvent evt) { assertEquals("Wrong event source", expectedSource, evt.getSource()); assertEquals("Wrong property name", "open", evt.getPropertyName());