brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [04/17] brooklyn-server git commit: Add missing @Override annotation to method signatures overriding interface methods
Date Mon, 23 Jan 2017 15:14:32 GMT
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/software/base/src/test/java/org/apache/brooklyn/feed/jmx/JmxFeedTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/feed/jmx/JmxFeedTest.java b/software/base/src/test/java/org/apache/brooklyn/feed/jmx/JmxFeedTest.java
index 5326bd2..08434e8 100644
--- a/software/base/src/test/java/org/apache/brooklyn/feed/jmx/JmxFeedTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/feed/jmx/JmxFeedTest.java
@@ -253,6 +253,7 @@ public class JmxFeedTest {
         GeneralisedDynamicMBean mbean = jmxService.registerMBean(
                 Collections.emptyMap(), 
                 ImmutableMap.of(opInfo, new Function<Object[], Integer>() {
+                        @Override
                         public Integer apply(Object[] args) {
                             invocationCount.incrementAndGet(); return opReturnVal;
                         }}),
@@ -266,6 +267,7 @@ public class JmxFeedTest {
                 .build();
         
         Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT_MS), new Runnable() {
+            @Override
             public void run() {
                 assertTrue(invocationCount.get() > 0, "invocationCount="+invocationCount);
                 assertEquals(entity.getAttribute(intAttribute), (Integer)opReturnVal);
@@ -281,6 +283,7 @@ public class JmxFeedTest {
         GeneralisedDynamicMBean mbean = jmxService.registerMBean(
                 Collections.emptyMap(), 
                 ImmutableMap.of(opInfo, new Function<Object[], String>() {
+                        @Override
                         public String apply(Object[] args) {
                             return args[0]+"suffix";
                         }}),
@@ -313,6 +316,7 @@ public class JmxFeedTest {
         // Notification updates the sensor
         // Note that subscription is done async, so can't just send notification immediately during test.
         Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT_MS), new Runnable() {
+            @Override
             public void run() {
                 sendNotification(mbean, one, sequence.getAndIncrement(), 123);
                 assertEquals(entity.getAttribute(intAttribute), (Integer)123);
@@ -322,6 +326,7 @@ public class JmxFeedTest {
         sendNotification(mbean, two, sequence.getAndIncrement(), -1);
             
         Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT_MS), new Runnable() {
+            @Override
             public void run() {
                 assertEquals(entity.getAttribute(intAttribute), (Integer)123);
             }});
@@ -339,6 +344,7 @@ public class JmxFeedTest {
                         .objectName(objectName)
                         .notificationFilter(JmxNotificationFilters.matchesType(one))
                         .onNotification(new Function<Notification, Integer>() {
+                            @Override
                             public Integer apply(Notification notif) {
                                 return (Integer) notif.getUserData();
                             }
@@ -349,6 +355,7 @@ public class JmxFeedTest {
         // Notification updates the sensor
         // Note that subscription is done async, so can't just send notification immediately during test.
         Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT_MS), new Runnable() {
+            @Override
             public void run() {
                 sendNotification(mbean, one, sequence.getAndIncrement(), 123);
                 assertEquals(entity.getAttribute(intAttribute), (Integer)123);
@@ -372,6 +379,7 @@ public class JmxFeedTest {
         // Notification updates the sensor
         // Note that subscription is done async, so can't just send notification immediately during test.
         Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT_MS), new Runnable() {
+            @Override
             public void run() {
                 sendNotification(mbean, one, sequence.getAndIncrement(), 123);
                 assertEquals(entity.getAttribute(intAttribute), (Integer)123);
@@ -393,6 +401,7 @@ public class JmxFeedTest {
             
             final List<SensorEvent<String>> received = Lists.newArrayList();
             app2.subscriptions().subscribe(null, EntityWithEmitter.MY_NOTIF, new SensorEventListener<String>() {
+                @Override
                 public void onEvent(SensorEvent<String> event) {
                     received.add(event);
                 }});
@@ -402,6 +411,7 @@ public class JmxFeedTest {
             
             jmxHelper.connect(TIMEOUT_MS);
             jmxHelper.addNotificationListener(jmxObjectName, new NotificationListener() {
+                    @Override
                     public void handleNotification(Notification notif, Object callback) {
                         if (notif.getType().equals("one")) {
                             entity.sensors().emit(EntityWithEmitter.MY_NOTIF, (String) notif.getUserData());
@@ -410,6 +420,7 @@ public class JmxFeedTest {
             
 
             Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT_MS), new Runnable() {
+                @Override
                 public void run() {
                     sendNotification(mbean, "one", sequence.getAndIncrement(), "abc");
                     assertTrue(received.size() > 0, "received size should be bigger than 0");
@@ -443,6 +454,7 @@ public class JmxFeedTest {
     
     private <T> void assertSensorEventually(final AttributeSensor<T> sensor, final T expectedVal, long timeout) {
         Asserts.succeedsEventually(ImmutableMap.of("timeout", timeout), new Callable<Void>() {
+            @Override
             public Void call() {
                 assertEquals(entity.getAttribute(sensor), expectedVal);
                 return null;

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/software/base/src/test/java/org/apache/brooklyn/feed/jmx/JmxHelperTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/feed/jmx/JmxHelperTest.java b/software/base/src/test/java/org/apache/brooklyn/feed/jmx/JmxHelperTest.java
index 0aa528c..2fbdcb3 100644
--- a/software/base/src/test/java/org/apache/brooklyn/feed/jmx/JmxHelperTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/feed/jmx/JmxHelperTest.java
@@ -160,6 +160,7 @@ public class JmxHelperTest {
                 String.class.getName(), 
                 MBeanOperationInfo.ACTION);
         Function<Object[],String> opImpl = new Function<Object[],String>() {
+            @Override
             public String apply(Object[] input) {
                 return opReturnPrefix+input[0];
             }
@@ -215,6 +216,7 @@ public class JmxHelperTest {
     @Test
     public void testJmxObjectCheckExistsEventuallyReturnsIfCreatedDuringPolling() throws Exception {
         Thread t = new Thread(new Runnable() {
+                @Override
                 public void run() {
                     try {
                         Thread.sleep(SHORT_WAIT_MS);
@@ -243,6 +245,7 @@ public class JmxHelperTest {
         final List<Notification> received = Lists.newArrayList();
 
         jmxHelper.addNotificationListener(jmxObjectName, new NotificationListener() {
+            @Override
             public void handleNotification(Notification notif, Object callback) {
                 received.add(notif);
             }});
@@ -251,6 +254,7 @@ public class JmxHelperTest {
         final Notification notif = sendNotification(mbean, "one", sequence++, "abc");
 
         Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT_MS), new Runnable() {
+            @Override
             public void run() {
                 assertEquals(received.size(), 1);
                 assertNotificationsEqual(received.get(0), notif);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/test-framework/src/main/java/org/apache/brooklyn/test/framework/ParallelTestCaseImpl.java
----------------------------------------------------------------------
diff --git a/test-framework/src/main/java/org/apache/brooklyn/test/framework/ParallelTestCaseImpl.java b/test-framework/src/main/java/org/apache/brooklyn/test/framework/ParallelTestCaseImpl.java
index cec7d95..7ae8197 100644
--- a/test-framework/src/main/java/org/apache/brooklyn/test/framework/ParallelTestCaseImpl.java
+++ b/test-framework/src/main/java/org/apache/brooklyn/test/framework/ParallelTestCaseImpl.java
@@ -41,6 +41,7 @@ public class ParallelTestCaseImpl extends TargetableTestComponentImpl implements
     /**
      * {@inheritDoc}
      */
+    @Override
     public void start(final Collection<? extends Location> locations) {
         // Let everyone know we're starting up (so that the GUI shows the correct icon).
         sensors().set(Attributes.SERVICE_STATE_ACTUAL, Lifecycle.STARTING);
@@ -67,6 +68,7 @@ public class ParallelTestCaseImpl extends TargetableTestComponentImpl implements
     /**
      * {@inheritDoc}
      */
+    @Override
     public void stop() {
         // Let everyone know we're stopping (so that the GUI shows the correct icon).
         sensors().set(Attributes.SERVICE_STATE_ACTUAL, Lifecycle.STOPPING);
@@ -92,6 +94,7 @@ public class ParallelTestCaseImpl extends TargetableTestComponentImpl implements
     /**
      * {@inheritDoc}
      */
+    @Override
     public void restart() {
         // Let everyone know we're restarting (so that the GUI shows the correct icon).
         setServiceState(false, Lifecycle.STARTING);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestCaseImpl.java
----------------------------------------------------------------------
diff --git a/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestCaseImpl.java b/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestCaseImpl.java
index 2870aca..849d018 100644
--- a/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestCaseImpl.java
+++ b/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestCaseImpl.java
@@ -43,6 +43,7 @@ public class TestCaseImpl extends TargetableTestComponentImpl implements TestCas
     /**
      * {@inheritDoc}
      */
+    @Override
     public void start(Collection<? extends Location> locations) {
         ServiceStateLogic.setExpectedState(this, Lifecycle.STARTING);
         try {
@@ -71,6 +72,7 @@ public class TestCaseImpl extends TargetableTestComponentImpl implements TestCas
     /**
      * {@inheritDoc}
      */
+    @Override
     public void stop() {
         ServiceStateLogic.setExpectedState(this, Lifecycle.STOPPING);
         sensors().set(Attributes.SERVICE_UP, false);
@@ -88,6 +90,7 @@ public class TestCaseImpl extends TargetableTestComponentImpl implements TestCas
     /**
      * {@inheritDoc}
      */
+    @Override
     public void restart() {
         final Collection<Location> locations = Lists.newArrayList(getLocations());
         stop();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestEffectorImpl.java
----------------------------------------------------------------------
diff --git a/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestEffectorImpl.java b/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestEffectorImpl.java
index 7381631..b052740 100644
--- a/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestEffectorImpl.java
+++ b/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestEffectorImpl.java
@@ -53,6 +53,7 @@ public class TestEffectorImpl extends TargetableTestComponentImpl implements Tes
     /**
      * {@inheritDoc}
      */
+    @Override
     public void start(Collection<? extends Location> locations) {
         ServiceStateLogic.setExpectedState(this, Lifecycle.STARTING);
         try {
@@ -105,6 +106,7 @@ public class TestEffectorImpl extends TargetableTestComponentImpl implements Tes
     /**
      * {@inheritDoc}
      */
+    @Override
     public void stop() {
         setUpAndRunState(false, Lifecycle.STOPPED);
     }
@@ -112,6 +114,7 @@ public class TestEffectorImpl extends TargetableTestComponentImpl implements Tes
     /**
      * {@inheritDoc}
      */
+    @Override
     public void restart() {
         final Collection<Location> locations = Lists.newArrayList(getLocations());
         stop();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestEndpointReachableImpl.java
----------------------------------------------------------------------
diff --git a/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestEndpointReachableImpl.java b/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestEndpointReachableImpl.java
index c604540..48beec3 100644
--- a/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestEndpointReachableImpl.java
+++ b/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestEndpointReachableImpl.java
@@ -207,6 +207,7 @@ public class TestEndpointReachableImpl extends TargetableTestComponentImpl imple
     /**
      * {@inheritDoc}
      */
+    @Override
     public void stop() {
         setUpAndRunState(false, Lifecycle.STOPPED);
     }
@@ -214,6 +215,7 @@ public class TestEndpointReachableImpl extends TargetableTestComponentImpl imple
     /**
      * {@inheritDoc}
      */
+    @Override
     public void restart() {
         final Collection<Location> locations = Lists.newArrayList(getLocations());
         stop();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestFrameworkAssertions.java
----------------------------------------------------------------------
diff --git a/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestFrameworkAssertions.java b/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestFrameworkAssertions.java
index 8210d7e..9484ab5 100644
--- a/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestFrameworkAssertions.java
+++ b/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestFrameworkAssertions.java
@@ -243,6 +243,7 @@ public class TestFrameworkAssertions {
         try {
             Repeater.create()
                     .until(new Callable<Boolean>() {
+                        @Override
                         public Boolean call() {
                             try {
                                 Object actual = options.supplier.get();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestHttpCallImpl.java
----------------------------------------------------------------------
diff --git a/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestHttpCallImpl.java b/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestHttpCallImpl.java
index 0422c7c..9f51c0e 100644
--- a/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestHttpCallImpl.java
+++ b/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestHttpCallImpl.java
@@ -52,6 +52,7 @@ public class TestHttpCallImpl extends TargetableTestComponentImpl implements Tes
     /**
      * {@inheritDoc}
      */
+    @Override
     public void start(Collection<? extends Location> locations) {
         String url = null;
 
@@ -142,6 +143,7 @@ public class TestHttpCallImpl extends TargetableTestComponentImpl implements Tes
     /**
      * {@inheritDoc}
      */
+    @Override
     public void stop() {
         setUpAndRunState(false, Lifecycle.STOPPED);
     }
@@ -149,6 +151,7 @@ public class TestHttpCallImpl extends TargetableTestComponentImpl implements Tes
     /**
      * {@inheritDoc}
      */
+    @Override
     public void restart() {
         final Collection<Location> locations = Lists.newArrayList(getLocations());
         stop();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestSensorImpl.java
----------------------------------------------------------------------
diff --git a/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestSensorImpl.java b/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestSensorImpl.java
index 08e9108..6dae5ea 100644
--- a/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestSensorImpl.java
+++ b/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestSensorImpl.java
@@ -53,6 +53,7 @@ public class TestSensorImpl extends TargetableTestComponentImpl implements TestS
     /**
      * {@inheritDoc}
      */
+    @Override
     public void start(Collection<? extends Location> locations) {
         final AtomicReference<String> sensor = new AtomicReference<>();
         
@@ -95,6 +96,7 @@ public class TestSensorImpl extends TargetableTestComponentImpl implements TestS
     /**
      * {@inheritDoc}
      */
+    @Override
     public void stop() {
         setUpAndRunState(false, Lifecycle.STOPPED);
     }
@@ -102,6 +104,7 @@ public class TestSensorImpl extends TargetableTestComponentImpl implements TestS
     /**
      * {@inheritDoc}
      */
+    @Override
     public void restart() {
         final Collection<Location> locations = Lists.newArrayList(getLocations());
         stop();
@@ -116,6 +119,7 @@ public class TestSensorImpl extends TargetableTestComponentImpl implements TestS
      */
     private Predicate<Object> isEqualTo(final Object value) {
         return new Predicate<Object>() {
+            @Override
             public boolean apply(final Object input) {
                 return (input != null) && Objects.equal(TypeCoercions.coerce(value, input.getClass()), input);
             }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestWinrmCommandImpl.java
----------------------------------------------------------------------
diff --git a/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestWinrmCommandImpl.java b/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestWinrmCommandImpl.java
index f35163a..3dc2545 100644
--- a/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestWinrmCommandImpl.java
+++ b/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestWinrmCommandImpl.java
@@ -189,6 +189,7 @@ public class TestWinrmCommandImpl extends TargetableTestComponentImpl implements
     private WinRmToolResponse executeCommand(final WinRmMachineLocation machine, final String command) {
         TaskBuilder<WinRmToolResponse> tb = Tasks.<WinRmToolResponse>builder().displayName("winrm-exec").body(
                 new Callable<WinRmToolResponse>() {
+                    @Override
                     public WinRmToolResponse call() throws Exception {
                         return machine.executeCommand(command);
                     }
@@ -199,6 +200,7 @@ public class TestWinrmCommandImpl extends TargetableTestComponentImpl implements
     private WinRmToolResponse executePsScript(final WinRmMachineLocation machine, final String psScript) {
         TaskBuilder<WinRmToolResponse> tb = Tasks.<WinRmToolResponse>builder().displayName("winrm-exec").body(
                 new Callable<WinRmToolResponse>() {
+                    @Override
                     public WinRmToolResponse call() throws Exception {
                         // FIXME Do I need COMPUTER_NAME in flags?
                         return machine.executePsScript(psScript);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/test-framework/src/test/java/org/apache/brooklyn/test/framework/TestEffectorTest.java
----------------------------------------------------------------------
diff --git a/test-framework/src/test/java/org/apache/brooklyn/test/framework/TestEffectorTest.java b/test-framework/src/test/java/org/apache/brooklyn/test/framework/TestEffectorTest.java
index 18d530a..ad1b6da 100644
--- a/test-framework/src/test/java/org/apache/brooklyn/test/framework/TestEffectorTest.java
+++ b/test-framework/src/test/java/org/apache/brooklyn/test/framework/TestEffectorTest.java
@@ -212,6 +212,7 @@ public class TestEffectorTest extends BrooklynAppUnitTestSupport {
     
     protected void assertStartFails(final TestApplication app, final Class<? extends Throwable> clazz, Duration execTimeout) throws Exception {
         Runnable task = new Runnable() {
+            @Override
             public void run() {
                 try {
                     app.start(locs);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/test-framework/src/test/java/org/apache/brooklyn/test/framework/TestSensorTest.java
----------------------------------------------------------------------
diff --git a/test-framework/src/test/java/org/apache/brooklyn/test/framework/TestSensorTest.java b/test-framework/src/test/java/org/apache/brooklyn/test/framework/TestSensorTest.java
index 97ed480..38c83e2 100644
--- a/test-framework/src/test/java/org/apache/brooklyn/test/framework/TestSensorTest.java
+++ b/test-framework/src/test/java/org/apache/brooklyn/test/framework/TestSensorTest.java
@@ -134,6 +134,7 @@ public class TestSensorTest extends BrooklynAppUnitTestSupport {
 
         // Wait long enough that we expect the assertion to have been attempted
         executor.submit(new Runnable() {
+            @Override
             public void run() {
                 Time.sleep(Duration.millis(250));
                 app.sensors().set(STRING_SENSOR, testId);
@@ -313,6 +314,7 @@ public class TestSensorTest extends BrooklynAppUnitTestSupport {
         // been checked).
         entity.sensors().set(serviceStateSensor, Lifecycle.STARTING);
         executor.submit(new Runnable() {
+            @Override
             public void run() {
                 Time.sleep(Duration.millis(50));
                 entity.sensors().set(serviceStateSensor, Lifecycle.RUNNING);
@@ -399,6 +401,7 @@ public class TestSensorTest extends BrooklynAppUnitTestSupport {
     
     protected void assertStartFails(final TestApplication app, final Class<? extends Throwable> clazz, Duration execTimeout) throws Exception {
         Runnable task = new Runnable() {
+            @Override
             public void run() {
                 try {
                     app.start(locs);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/test-support/src/main/java/org/apache/brooklyn/test/HttpTestUtils.java
----------------------------------------------------------------------
diff --git a/test-support/src/main/java/org/apache/brooklyn/test/HttpTestUtils.java b/test-support/src/main/java/org/apache/brooklyn/test/HttpTestUtils.java
index 1d69ff2..d6bff2a 100644
--- a/test-support/src/main/java/org/apache/brooklyn/test/HttpTestUtils.java
+++ b/test-support/src/main/java/org/apache/brooklyn/test/HttpTestUtils.java
@@ -81,6 +81,7 @@ public class HttpTestUtils {
         
         // sometimes openConnection hangs, so run in background
         Future<URLConnection> f = executor.submit(new Callable<URLConnection>() {
+            @Override
             public URLConnection call() {
                 try {
                     HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() {
@@ -178,6 +179,7 @@ public class HttpTestUtils {
     
     public static void assertUrlUnreachableEventually(Map<String,?> flags, final String url) {
         Asserts.succeedsEventually(flags, new Runnable() {
+            @Override
             public void run() {
                 assertUrlUnreachable(url);
             }
@@ -207,6 +209,7 @@ public class HttpTestUtils {
 
     public static void assertHttpStatusCodeEventuallyEquals(Map<String,?> flags, final String url, final int expectedCode) {
         Asserts.succeedsEventually(flags, new Runnable() {
+            @Override
             public void run() {
                 assertHttpStatusCodeEquals(url, expectedCode);
             }
@@ -280,6 +283,7 @@ public class HttpTestUtils {
     
     public static void assertContentEventuallyContainsText(Map<String,?> flags, final String url, final String phrase, final String ...additionalPhrases) {
         Asserts.succeedsEventually(flags, new Runnable() {
+            @Override
             public void run() {
                 assertContentContainsText(url, phrase, additionalPhrases);
             }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/test-support/src/main/java/org/apache/brooklyn/test/LogWatcher.java
----------------------------------------------------------------------
diff --git a/test-support/src/main/java/org/apache/brooklyn/test/LogWatcher.java b/test-support/src/main/java/org/apache/brooklyn/test/LogWatcher.java
index beed018..fb90808 100644
--- a/test-support/src/main/java/org/apache/brooklyn/test/LogWatcher.java
+++ b/test-support/src/main/java/org/apache/brooklyn/test/LogWatcher.java
@@ -154,6 +154,7 @@ public class LogWatcher implements Closeable {
 
     public List<ILoggingEvent> assertHasEventEventually() {
         Asserts.succeedsEventually(new Runnable() {
+            @Override
             public void run() {
                 assertFalse(events.isEmpty());
             }});
@@ -163,6 +164,7 @@ public class LogWatcher implements Closeable {
     public List<ILoggingEvent> assertHasEventEventually(final Predicate<? super ILoggingEvent> filter) {
         final AtomicReference<List<ILoggingEvent>> result = new AtomicReference<>();
         Asserts.succeedsEventually(new Runnable() {
+            @Override
             public void run() {
                 synchronized (events) {
                     Iterable<ILoggingEvent> filtered = Iterables.filter(events, filter);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/test-support/src/main/java/org/apache/brooklyn/test/NetworkingTestUtils.java
----------------------------------------------------------------------
diff --git a/test-support/src/main/java/org/apache/brooklyn/test/NetworkingTestUtils.java b/test-support/src/main/java/org/apache/brooklyn/test/NetworkingTestUtils.java
index 3cb4ba9..4a92ffd 100644
--- a/test-support/src/main/java/org/apache/brooklyn/test/NetworkingTestUtils.java
+++ b/test-support/src/main/java/org/apache/brooklyn/test/NetworkingTestUtils.java
@@ -45,6 +45,7 @@ public class NetworkingTestUtils {
     public static void assertPortsAvailableEventually(final Map<String, Integer> ports, final Duration timeout) {
         Asserts.succeedsEventually(ImmutableMap.of("timeout", Duration.minutes(4)), new Runnable() {
             private boolean logged = false;
+            @Override
             public void run() {
                 try {
                     assertPortsAvailable(ports);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/test-support/src/main/java/org/apache/brooklyn/test/WebAppMonitor.java
----------------------------------------------------------------------
diff --git a/test-support/src/main/java/org/apache/brooklyn/test/WebAppMonitor.java b/test-support/src/main/java/org/apache/brooklyn/test/WebAppMonitor.java
index b957a5b..439013f 100644
--- a/test-support/src/main/java/org/apache/brooklyn/test/WebAppMonitor.java
+++ b/test-support/src/main/java/org/apache/brooklyn/test/WebAppMonitor.java
@@ -70,6 +70,7 @@ public class WebAppMonitor implements Runnable {
         return this;
     }
     
+    @Override
     public void run() {
         synchronized (isActive) {
             if (isActive.getAndSet(true))

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/config/ConfigInheritances.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/config/ConfigInheritances.java b/utils/common/src/main/java/org/apache/brooklyn/config/ConfigInheritances.java
index bac207d..0845305 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/config/ConfigInheritances.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/config/ConfigInheritances.java
@@ -171,6 +171,7 @@ public class ConfigInheritances {
             this.key = key;
         }
         
+        @Override
         public Maybe<TValue> getDefaultValue() { 
             if (defaultValue!=null) return defaultValue;
             // explicit absent default value means don't look at key

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/config/ConfigValueAtContainer.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/config/ConfigValueAtContainer.java b/utils/common/src/main/java/org/apache/brooklyn/config/ConfigValueAtContainer.java
index 59168a3..aa08038 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/config/ConfigValueAtContainer.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/config/ConfigValueAtContainer.java
@@ -28,6 +28,7 @@ import com.google.common.base.Supplier;
 public interface ConfigValueAtContainer<TContainer,TValue> extends Supplier<TValue> {
     
     /** Returns the value for this key, or null.  Technically this returns {@link #asMaybe()} or null. */
+    @Override
     @Nullable TValue get();
     /** Absent if no value can be found, typically meaning no default value, but in raw value lookups it may ignore default values. */ 
     @Nonnull Maybe<? extends TValue> asMaybe();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/config/StringConfigMap.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/config/StringConfigMap.java b/utils/common/src/main/java/org/apache/brooklyn/config/StringConfigMap.java
index b327442..6b68caf 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/config/StringConfigMap.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/config/StringConfigMap.java
@@ -36,10 +36,12 @@ public interface StringConfigMap extends ConfigMap {
     public String getFirst(@SuppressWarnings("rawtypes") Map flags, String... keys);
     
     /** returns submap matching the given filter predicate; see ConfigPredicates for common predicates */
+    @Override
     public StringConfigMap submap(Predicate<ConfigKey<?>> filter);
     
     /** returns a read-only map view which has string keys (corresponding to the config key names);
      * callers encouraged to use the typed keys (and so not use this method),
      * but in some compatibility areas having a Properties-like view is useful */
+    @Override
     public Map<String,Object> asMapWithStringKeys();
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/test/Asserts.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/test/Asserts.java b/utils/common/src/main/java/org/apache/brooklyn/test/Asserts.java
index a92d764..0d6e770 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/test/Asserts.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/test/Asserts.java
@@ -1060,6 +1060,7 @@ public class Asserts {
     
     public static void assertFailsWith(Callable<?> c, final Closure<Boolean> exceptionChecker) {
         assertFailsWith(c, new Predicate<Throwable>() {
+            @Override
             public boolean apply(Throwable input) {
                 return exceptionChecker.call(input);
             }
@@ -1074,6 +1075,7 @@ public class Asserts {
                 .build();
         
         assertFailsWith(c, new Predicate<Throwable>() {
+            @Override
             public boolean apply(Throwable e) {
                 for (Class<?> validException: validExceptions) {
                     if (validException.isInstance(e)) return true;
@@ -1348,6 +1350,7 @@ public class Asserts {
             this.task = task;
             this.result = result;
         }
+        @Override
         public T call() {
             task.run();
             return result;

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/ShellUtils.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/ShellUtils.java b/utils/common/src/main/java/org/apache/brooklyn/util/ShellUtils.java
index ce053b2..defa676 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/ShellUtils.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/ShellUtils.java
@@ -134,6 +134,7 @@ public class ShellUtils {
             //if a timeout was specified, this thread will kill the process. This is a work around because the process.waitFor'
             //doesn't accept a timeout.
             Thread timeoutThread = new Thread(new Runnable() {
+                @Override
                 public void run() {
                     if (timeout <= 0) return;
                     try { 

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/collections/Jsonya.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/collections/Jsonya.java b/utils/common/src/main/java/org/apache/brooklyn/util/collections/Jsonya.java
index 6a13dbf..cbaa1dc 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/collections/Jsonya.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/collections/Jsonya.java
@@ -338,6 +338,7 @@ public class Jsonya {
                 }
                 final Function<Object, Void> previousCreation = creationInPreviousFocus;
                 creationInPreviousFocus = new Function<Object, Void>() {
+                    @Override
                     public Void apply(Object input) {
                         creationInPreviousFocus = null;
                         Map parentMap = givenParentMap;
@@ -369,6 +370,7 @@ public class Jsonya {
                 // TODO a nicer architecture would create a new object with focus for each traversal
                 // in that case we could create, filling other positions with null; but is there a need?
                 creationInPreviousFocus = new Function<Object, Void>() {
+                    @Override
                     public Void apply(Object input) {
                         throw new IllegalStateException("cannot create "+input+" here because we are at a non-existent position in a list");
                     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/concurrent/CallableFromRunnable.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/concurrent/CallableFromRunnable.java b/utils/common/src/main/java/org/apache/brooklyn/util/concurrent/CallableFromRunnable.java
index 72510f6..ff6fdbc 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/concurrent/CallableFromRunnable.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/concurrent/CallableFromRunnable.java
@@ -39,6 +39,7 @@ public class CallableFromRunnable<T> implements Callable<T> {
         this.result = result;
     }
     
+    @Override
     public T call() {
         task.run();
         return result;

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/crypto/SslTrustUtils.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/crypto/SslTrustUtils.java b/utils/common/src/main/java/org/apache/brooklyn/util/crypto/SslTrustUtils.java
index 3dd394d..63df86e 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/crypto/SslTrustUtils.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/crypto/SslTrustUtils.java
@@ -41,6 +41,7 @@ public class SslTrustUtils {
     
     /** trusts all SSL certificates */
     public static final TrustManager TRUST_ALL = new X509TrustManager() {
+        @Override
         public X509Certificate[] getAcceptedIssuers() {
             return new X509Certificate[0];
         }
@@ -57,6 +58,7 @@ public class SslTrustUtils {
     
     /** trusts no SSL certificates */
     public static final TrustManager TRUST_NONE = new X509TrustManager() {
+        @Override
         public X509Certificate[] getAcceptedIssuers() {
             return new X509Certificate[0];
         }
@@ -92,6 +94,7 @@ public class SslTrustUtils {
     }
     
     public static final HostnameVerifier ALL_HOSTS_VALID = new HostnameVerifier() {
+        @Override
         public boolean verify(String hostname, SSLSession session) {
             return true;
         }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/exceptions/ReferenceWithError.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/exceptions/ReferenceWithError.java b/utils/common/src/main/java/org/apache/brooklyn/util/exceptions/ReferenceWithError.java
index 7885659..6a070fc 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/exceptions/ReferenceWithError.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/exceptions/ReferenceWithError.java
@@ -62,6 +62,7 @@ public class ReferenceWithError<T> implements Supplier<T> {
     }
 
     /** returns the underlying value, throwing if there is an error which is not masked (ie {@link #throwsErrorOnAccess()} is set) */
+    @Override
     public T get() {
         if (masksErrorIfPresent()) {
             return getWithoutError();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/guava/Maybe.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/guava/Maybe.java b/utils/common/src/main/java/org/apache/brooklyn/util/guava/Maybe.java
index dbbe949..4be923a 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/guava/Maybe.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/guava/Maybe.java
@@ -207,6 +207,7 @@ public abstract class Maybe<T> implements Serializable, Supplier<T> {
     }
 
     public abstract boolean isPresent();
+    @Override
     public abstract T get();
     
     public boolean isAbsent() {

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpAsserts.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpAsserts.java b/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpAsserts.java
index a7c195f..c87eab4 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpAsserts.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpAsserts.java
@@ -140,6 +140,7 @@ public class HttpAsserts {
      */
     public static void assertUrlUnreachableEventually(Map<String,?> flags, final String url) {
         assertEventually(flags, new Runnable() {
+            @Override
             public void run() {
                 assertUrlUnreachable(url);
             }
@@ -175,6 +176,7 @@ public class HttpAsserts {
 
     public static void assertHttpStatusCodeEventuallyEquals(Map<String,?> flags, final String url, final int expectedCode) {
         assertEventually(flags, new Runnable() {
+            @Override
             public void run() {
                 assertHttpStatusCodeEquals(url, expectedCode);
             }
@@ -253,6 +255,7 @@ public class HttpAsserts {
     
     public static void assertContentEventuallyContainsText(Map<String,?> flags, final String url, final String phrase, final String ...additionalPhrases) {
         assertEventually(flags, new Runnable() {
+            @Override
             public void run() {
                 assertContentContainsText(url, phrase, additionalPhrases);
             }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpTool.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpTool.java b/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpTool.java
index 6ee3040..52b8d7a 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpTool.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpTool.java
@@ -114,6 +114,7 @@ public class HttpTool {
 
         // sometimes openConnection hangs, so run in background
         Future<URLConnection> f = executor.submit(new Callable<URLConnection>() {
+            @Override
             public URLConnection call() {
                 try {
                     HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() {

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/http/TrustingSslSocketFactory.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/http/TrustingSslSocketFactory.java b/utils/common/src/main/java/org/apache/brooklyn/util/http/TrustingSslSocketFactory.java
index 41b753a..6b03536 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/http/TrustingSslSocketFactory.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/http/TrustingSslSocketFactory.java
@@ -67,6 +67,7 @@ public class TrustingSslSocketFactory extends SSLSocketFactory {
     
     /** trusts all SSL certificates */
     public static final TrustManager TRUST_ALL = new X509TrustManager() {
+        @Override
         public X509Certificate[] getAcceptedIssuers() {
             return new X509Certificate[0];
         }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/http/executor/UsernamePassword.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/http/executor/UsernamePassword.java b/utils/common/src/main/java/org/apache/brooklyn/util/http/executor/UsernamePassword.java
index 13f61e1..da74b3c 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/http/executor/UsernamePassword.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/http/executor/UsernamePassword.java
@@ -30,10 +30,12 @@ public class UsernamePassword implements Credentials {
         this.password = password;
     }
 
+    @Override
     public String getUser() {
         return username;
     }
 
+    @Override
     public String getPassword() {
         return password;
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/math/MathFunctions.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/math/MathFunctions.java b/utils/common/src/main/java/org/apache/brooklyn/util/math/MathFunctions.java
index 865aca3..671078b 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/math/MathFunctions.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/math/MathFunctions.java
@@ -32,6 +32,7 @@ public class MathFunctions {
     private static Function<Number, Integer> plusOld(final int addend) {
         // TODO PERSISTENCE WORKAROUND
         return new Function<Number, Integer>() {
+            @Override
             public Integer apply(@Nullable Number input) {
                 if (input==null) return null;
                 return input.intValue() + addend;
@@ -44,6 +45,7 @@ public class MathFunctions {
     private static Function<Number, Long> plusOld(final long addend) {
         // TODO PERSISTENCE WORKAROUND
         return new Function<Number, Long>() {
+            @Override
             public Long apply(@Nullable Number input) {
                 if (input==null) return null;
                 return input.longValue() + addend;
@@ -56,6 +58,7 @@ public class MathFunctions {
     private static Function<Number, Double> plusOld(final double addend) {
         // TODO PERSISTENCE WORKAROUND
         return new Function<Number, Double>() {
+            @Override
             public Double apply(@Nullable Number input) {
                 if (input==null) return null;
                 return input.doubleValue() + addend;
@@ -68,6 +71,7 @@ public class MathFunctions {
     private static Function<Number, Integer> timesOld(final int multiplicand) {
         // TODO PERSISTENCE WORKAROUND
         return new Function<Number, Integer>() {
+            @Override
             public Integer apply(@Nullable Number input) {
                 if (input==null) return null;
                 return input.intValue() * multiplicand;
@@ -80,6 +84,7 @@ public class MathFunctions {
     private static Function<Number, Long> timesOld(final long multiplicand) {
         // TODO PERSISTENCE WORKAROUND
         return new Function<Number, Long>() {
+            @Override
             public Long apply(@Nullable Number input) {
                 if (input==null) return null;
                 return input.longValue() * multiplicand;
@@ -92,6 +97,7 @@ public class MathFunctions {
     private static Function<Number, Double> timesOld(final double multiplicand) {
         // TODO PERSISTENCE WORKAROUND
         return new Function<Number, Double>() {
+            @Override
             public Double apply(@Nullable Number input) {
                 if (input==null) return null;
                 return input.doubleValue() * multiplicand;
@@ -104,6 +110,7 @@ public class MathFunctions {
     private static Function<Number, Double> divideOld(final double divisor) {
         // TODO PERSISTENCE WORKAROUND
         return new Function<Number, Double>() {
+            @Override
             public Double apply(@Nullable Number input) {
                 if (input==null) return null;
                 return input.doubleValue() / divisor;
@@ -116,6 +123,7 @@ public class MathFunctions {
     private static <T> Function<T, Double> divideOld(final Function<T, ? extends Number> input, final double divisor) {
         // TODO PERSISTENCE WORKAROUND
         return new Function<T, Double>() {
+            @Override
             public Double apply(@Nullable T input2) {
                 if (input==null) return null;
                 Number n = input.apply(input2);
@@ -131,6 +139,7 @@ public class MathFunctions {
     private static Function<Number, String> readableStringOld(final int significantDigits, final int maxLen) {
         // TODO PERSISTENCE WORKAROUND
         return new Function<Number, String>() {
+            @Override
             public String apply(@Nullable Number input) {
                 if (input==null) return null;
                 return Strings.makeRealString(input.doubleValue(), maxLen, significantDigits, 0);
@@ -144,6 +153,7 @@ public class MathFunctions {
     private static Function<Number, String> percentOld(final int significantDigits) {
         // TODO PERSISTENCE WORKAROUND
         return new Function<Number, String>() {
+            @Override
             public String apply(@Nullable Number input) {
                 if (input==null) return null;
                 return readableString(significantDigits, significantDigits+3).apply(input.doubleValue() * 100d)+"%";
@@ -161,6 +171,7 @@ public class MathFunctions {
         public PlusInt(int addend) {
             this.addend = addend;
         }
+        @Override
         public Integer apply(@Nullable Number input) {
             if (input==null) return null;
             return input.intValue() + addend;
@@ -177,6 +188,7 @@ public class MathFunctions {
         public PlusLong(long addend) {
             this.addend = addend;
         }
+        @Override
         public Long apply(@Nullable Number input) {
             if (input==null) return null;
             return input.longValue() + addend;
@@ -193,6 +205,7 @@ public class MathFunctions {
         public PlusDouble(double addend) {
             this.addend = addend;
         }
+        @Override
         public Double apply(@Nullable Number input) {
             if (input==null) return null;
             return input.doubleValue() + addend;
@@ -209,6 +222,7 @@ public class MathFunctions {
         public TimesInt(int multiplicand) {
             this.multiplicand = multiplicand;
         }
+        @Override
         public Integer apply(@Nullable Number input) {
             if (input==null) return null;
             return input.intValue() * multiplicand;
@@ -225,6 +239,7 @@ public class MathFunctions {
         public TimesLong(long multiplicand) {
             this.multiplicand = multiplicand;
         }
+        @Override
         public Long apply(@Nullable Number input) {
             if (input==null) return null;
             return input.longValue() * multiplicand;
@@ -241,6 +256,7 @@ public class MathFunctions {
         public TimesDouble(double multiplicand) {
             this.multiplicand = multiplicand;
         }
+        @Override
         public Double apply(@Nullable Number input) {
             if (input==null) return null;
             return input.doubleValue() * multiplicand;
@@ -257,6 +273,7 @@ public class MathFunctions {
         public DivideDouble(double divisor) {
             this.divisor = divisor;
         }
+        @Override
         public Double apply(@Nullable Number input) {
             if (input==null) return null;
             return input.doubleValue() / divisor;
@@ -282,6 +299,7 @@ public class MathFunctions {
             this.significantDigits = significantDigits;
             this.maxLen = maxLen;
         }
+        @Override
         public String apply(@Nullable Number input) {
             if (input==null) return null;
             return Strings.makeRealString(input.doubleValue(), maxLen, significantDigits, 0);
@@ -299,6 +317,7 @@ public class MathFunctions {
             this.significantDigits = significantDigits;
         }
 
+        @Override
         public String apply(@Nullable Number input) {
             if (input==null) return null;
             return readableString(significantDigits, significantDigits+3).apply(input.doubleValue() * 100d)+"%";

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/math/MathPredicates.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/math/MathPredicates.java b/utils/common/src/main/java/org/apache/brooklyn/util/math/MathPredicates.java
index 3e5c9c2..01a2f71 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/math/MathPredicates.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/math/MathPredicates.java
@@ -30,6 +30,7 @@ public class MathPredicates {
     private  static <T extends Number> Predicate<T> greaterThanOld(final double val) {
         // TODO PERSISTENCE WORKAROUND
         return new Predicate<T>() {
+            @Override
             public boolean apply(@Nullable T input) {
                 return (input == null) ? false : input.doubleValue() > val;
             }
@@ -41,6 +42,7 @@ public class MathPredicates {
     private  static <T extends Number> Predicate<T> greaterThanOrEqualOld(final double val) {
         // TODO PERSISTENCE WORKAROUND
         return new Predicate<T>() {
+            @Override
             public boolean apply(@Nullable T input) {
                 return (input == null) ? false : input.doubleValue() >= val;
             }
@@ -52,6 +54,7 @@ public class MathPredicates {
     private  static <T extends Number> Predicate<T> lessThanOld(final double val) {
         // TODO PERSISTENCE WORKAROUND
         return new Predicate<T>() {
+            @Override
             public boolean apply(@Nullable T input) {
                 return (input == null) ? false : input.doubleValue() < val;
             }
@@ -63,6 +66,7 @@ public class MathPredicates {
     private  static <T extends Number> Predicate<T> lessThanOrEqualOld(final double val) {
         // TODO PERSISTENCE WORKAROUND
         return new Predicate<T>() {
+            @Override
             public boolean apply(@Nullable T input) {
                 return (input == null) ? false : input.doubleValue() <= val;
             }
@@ -82,6 +86,7 @@ public class MathPredicates {
         protected GreaterThan(double val) {
             this.val = val;
         }
+        @Override
         public boolean apply(@Nullable T input) {
             return (input == null) ? false : input.doubleValue() > val;
         }
@@ -100,6 +105,7 @@ public class MathPredicates {
         protected GreaterThanOrEqual(double val) {
             this.val = val;
         }
+        @Override
         public boolean apply(@Nullable T input) {
             return (input == null) ? false : input.doubleValue() >= val;
         }
@@ -118,6 +124,7 @@ public class MathPredicates {
         protected LessThan(double val) {
             this.val = val;
         }
+        @Override
         public boolean apply(@Nullable T input) {
             return (input == null) ? false : input.doubleValue() < val;
         }
@@ -136,6 +143,7 @@ public class MathPredicates {
         protected LessThanOrEqual(double val) {
             this.val = val;
         }
+        @Override
         public boolean apply(@Nullable T input) {
             return (input == null) ? false : input.doubleValue() <= val;
         }
@@ -161,6 +169,7 @@ public class MathPredicates {
             Preconditions.checkArgument(delta>=0, "delta must be non-negative");
             this.delta = delta;
         }
+        @Override
         public boolean apply(@Nullable T input) {
             return (input == null) ? false : Math.abs(input.doubleValue() - val) <= delta;
         }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/maven/MavenRetriever.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/maven/MavenRetriever.java b/utils/common/src/main/java/org/apache/brooklyn/util/maven/MavenRetriever.java
index d8cf89c..2611b7a 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/maven/MavenRetriever.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/maven/MavenRetriever.java
@@ -30,6 +30,7 @@ import com.google.common.base.Function;
 public class MavenRetriever {
 
     public static final Function<MavenArtifact,String> CONDITIONAL_SNAPSHOT_URL_GENERATOR = new Function<MavenArtifact, String>() {
+        @Override
         public String apply(MavenArtifact artifact) {
             if (artifact.groupId.startsWith("org.apache")) {
                 return APACHE_SNAPSHOT_URL_GENERATOR.apply(artifact);
@@ -47,6 +48,7 @@ public class MavenRetriever {
 
     public static Function<MavenArtifact,String> nexusSnapshotUrlGenerator(final String baseUrl) {
         return new Function<MavenArtifact, String>() {
+            @Override
             public String apply(MavenArtifact artifact) {
                 return baseUrl+"/service/local/artifact/maven/redirect?" +
                         "r=snapshots&" +
@@ -60,6 +62,7 @@ public class MavenRetriever {
     }
 
     public static final Function<MavenArtifact,String> MAVEN_CENTRAL_URL_GENERATOR = new Function<MavenArtifact, String>() {
+        @Override
         public String apply(MavenArtifact artifact) {
             return "http://search.maven.org/remotecontent?filepath="+
                     Urls.encode(Strings.replaceAllNonRegex(artifact.groupId, ".", "/")+"/"+
@@ -69,6 +72,7 @@ public class MavenRetriever {
     };
 
     public static final Function<MavenArtifact,String> LOCAL_REPO_PATH_GENERATOR = new Function<MavenArtifact, String>() {
+        @Override
         public String apply(MavenArtifact artifact) {
             return System.getProperty("user.home")+"/.m2/repository/"+
                     Strings.replaceAllNonRegex(artifact.groupId, ".", "/")+"/"+

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/net/ReachableSocketFinder.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/net/ReachableSocketFinder.java b/utils/common/src/main/java/org/apache/brooklyn/util/net/ReachableSocketFinder.java
index 5302c3e..d488021 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/net/ReachableSocketFinder.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/net/ReachableSocketFinder.java
@@ -89,6 +89,7 @@ public class ReachableSocketFinder {
                 .limitTimeTo(timeout)
                 .backoffTo(Duration.FIVE_SECONDS)
                 .until(new Callable<Boolean>() {
+                        @Override
                         public Boolean call() {
                             Optional<HostAndPort> reachableSocket = tryReachable(sockets, Duration.FIVE_SECONDS);
                             if (reachableSocket.isPresent()) {

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/osgi/OsgiActivator.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/osgi/OsgiActivator.java b/utils/common/src/main/java/org/apache/brooklyn/util/osgi/OsgiActivator.java
index 2927ed8..9881bb0 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/osgi/OsgiActivator.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/osgi/OsgiActivator.java
@@ -23,11 +23,13 @@ import org.osgi.framework.BundleContext;
  */
 public class OsgiActivator implements BundleActivator {
 
+  @Override
   public void start(BundleContext context) throws Exception {
   }
 
+  @Override
   public void stop(BundleContext context) throws Exception {
       OsgiUtil.shutdown();
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/pool/Lease.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/pool/Lease.java b/utils/common/src/main/java/org/apache/brooklyn/util/pool/Lease.java
index 38eee26..af1bf36 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/pool/Lease.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/pool/Lease.java
@@ -25,5 +25,6 @@ public interface Lease<T> extends Closeable {
 
     T leasedObject();
     
+    @Override
     void close() throws IOException;
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/text/ComparableVersion.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/text/ComparableVersion.java b/utils/common/src/main/java/org/apache/brooklyn/util/text/ComparableVersion.java
index 339f1ca..6fa1dda 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/text/ComparableVersion.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/text/ComparableVersion.java
@@ -29,6 +29,7 @@ public class ComparableVersion implements Comparable<String> {
         this.version = version;
     }
 
+    @Override
     public int compareTo(String target) {
         return VersionComparator.INSTANCE.compare(version, target);
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/text/NaturalOrderComparator.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/text/NaturalOrderComparator.java b/utils/common/src/main/java/org/apache/brooklyn/util/text/NaturalOrderComparator.java
index d76244a..7cdf421 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/text/NaturalOrderComparator.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/text/NaturalOrderComparator.java
@@ -98,6 +98,7 @@ public class NaturalOrderComparator implements Comparator<String> {
         }
     }
 
+    @Override
     public int compare(String a, String b) {
 
         int ia = 0, ib = 0;

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/text/StringFunctions.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/text/StringFunctions.java b/utils/common/src/main/java/org/apache/brooklyn/util/text/StringFunctions.java
index c9ec2a6..ddf1914 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/text/StringFunctions.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/text/StringFunctions.java
@@ -65,6 +65,7 @@ public class StringFunctions {
     private static Function<Object, String> formatterOld(final String pattern) {
         // TODO PERSISTENCE WORKAROUND
         return new Function<Object, String>() {
+            @Override
             public String apply(@Nullable Object input) {
                 return String.format(pattern, input);
             }
@@ -76,6 +77,7 @@ public class StringFunctions {
     private static Function<Object[], String> formatterForArrayOld(final String pattern) {
         // TODO PERSISTENCE WORKAROUND
         return new Function<Object[], String>() {
+            @Override
             public String apply(@Nullable Object[] input) {
                 return String.format(pattern, input);
             }
@@ -87,6 +89,7 @@ public class StringFunctions {
     private static Function<Iterable<?>, String> joinerOld(final String separator) {
         // TODO PERSISTENCE WORKAROUND
         return new Function<Iterable<?>, String>() {
+            @Override
             public String apply(@Nullable Iterable<?> input) {
                 return Strings.join(input, separator);
             }
@@ -98,6 +101,7 @@ public class StringFunctions {
     private static Function<Object[], String> joinerForArrayOld(final String separator) {
         // TODO PERSISTENCE WORKAROUND
         return new Function<Object[], String>() {
+            @Override
             public String apply(@Nullable Object[] input) {
                 if (input == null) return Strings.EMPTY;
                 return Strings.join(input, separator);
@@ -229,6 +233,7 @@ public class StringFunctions {
         FormatterFunction(String pattern) {
             this.pattern = pattern;
         }
+        @Override
         public String apply(@Nullable Object input) {
             return String.format(pattern, input);
         }
@@ -245,6 +250,7 @@ public class StringFunctions {
         public FormatterForArrayFunction(String pattern) {
             this.pattern = pattern;
         }
+        @Override
         public String apply(@Nullable Object[] input) {
             return String.format(pattern, input);
         }
@@ -266,6 +272,7 @@ public class StringFunctions {
             this.pattern = pattern;
         }
 
+        @Override
         public String apply(@Nullable Iterable<?> input) {
             Object[] arr = (input == null) ? null : Iterables.toArray(input, Object.class);
             return String.format(pattern, arr);
@@ -283,6 +290,7 @@ public class StringFunctions {
         public JoinerFunction(String separator) {
             this.separator = separator;
         }
+        @Override
         public String apply(@Nullable Iterable<?> input) {
             return Strings.join(input, separator);
         }
@@ -299,6 +307,7 @@ public class StringFunctions {
         protected JoinerForArrayFunction(String separator) {
             this.separator = separator;
         }
+        @Override
         public String apply(@Nullable Object[] input) {
             if (input == null) return Strings.EMPTY;
             return Strings.join(input, separator);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/main/java/org/apache/brooklyn/util/text/StringShortener.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/text/StringShortener.java b/utils/common/src/main/java/org/apache/brooklyn/util/text/StringShortener.java
index 3a5a018..d531f79 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/text/StringShortener.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/text/StringShortener.java
@@ -40,6 +40,7 @@ public class StringShortener {
         String id;
         int len;
         
+        @Override
         public int apply(LinkedHashMap<String, String> words, int maxlen, int length) {
             String v = words.get(id);
             if (v!=null && v.length()>len) {
@@ -79,6 +80,7 @@ public class StringShortener {
         }
         String id;
         
+        @Override
         public int apply(LinkedHashMap<String, String> words, int maxlen, int length) {
             String v = words.get(id);
             if (v!=null) {

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/test/java/org/apache/brooklyn/test/AssertsTest.java
----------------------------------------------------------------------
diff --git a/utils/common/src/test/java/org/apache/brooklyn/test/AssertsTest.java b/utils/common/src/test/java/org/apache/brooklyn/test/AssertsTest.java
index b3e39d1..bd411b7 100644
--- a/utils/common/src/test/java/org/apache/brooklyn/test/AssertsTest.java
+++ b/utils/common/src/test/java/org/apache/brooklyn/test/AssertsTest.java
@@ -61,6 +61,7 @@ public class AssertsTest {
         
         try {
             Asserts.assertReturnsEventually(new Runnable() {
+                @Override
                 public void run() {
                     try {
                         Thread.sleep(60*1000);
@@ -86,6 +87,7 @@ public class AssertsTest {
     public void testAssertReturnsEventuallyPropagatesException() throws Exception {
         try {
             Asserts.assertReturnsEventually(new Runnable() {
+                @Override
                 public void run() {
                     throw new IllegalStateException("Simulating failure");
                 }},

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/test/java/org/apache/brooklyn/util/javalang/MemoryUsageTrackerTest.java
----------------------------------------------------------------------
diff --git a/utils/common/src/test/java/org/apache/brooklyn/util/javalang/MemoryUsageTrackerTest.java b/utils/common/src/test/java/org/apache/brooklyn/util/javalang/MemoryUsageTrackerTest.java
index e80f08d..fb7fd17 100644
--- a/utils/common/src/test/java/org/apache/brooklyn/util/javalang/MemoryUsageTrackerTest.java
+++ b/utils/common/src/test/java/org/apache/brooklyn/util/javalang/MemoryUsageTrackerTest.java
@@ -68,6 +68,7 @@ public class MemoryUsageTrackerTest {
         }
         
         Asserts.succeedsEventually(new Runnable() {
+            @Override
             public void run() {
                 long totalMemory = Runtime.getRuntime().totalMemory();
                 long freeMemory = Runtime.getRuntime().freeMemory();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/test/java/org/apache/brooklyn/util/pool/BasicPoolTest.java
----------------------------------------------------------------------
diff --git a/utils/common/src/test/java/org/apache/brooklyn/util/pool/BasicPoolTest.java b/utils/common/src/test/java/org/apache/brooklyn/util/pool/BasicPoolTest.java
index 961afa5..c299759 100644
--- a/utils/common/src/test/java/org/apache/brooklyn/util/pool/BasicPoolTest.java
+++ b/utils/common/src/test/java/org/apache/brooklyn/util/pool/BasicPoolTest.java
@@ -170,6 +170,7 @@ public class BasicPoolTest {
         
         for (int i = 0; i < 1000; i++) {
             futures.add(executor.submit(new Runnable() {
+                @Override
                 public void run() {
                     leases.add(pool.leaseObject());
                 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/test/java/org/apache/brooklyn/util/repeat/RepeaterTest.java
----------------------------------------------------------------------
diff --git a/utils/common/src/test/java/org/apache/brooklyn/util/repeat/RepeaterTest.java b/utils/common/src/test/java/org/apache/brooklyn/util/repeat/RepeaterTest.java
index 728120e..9ec6229 100644
--- a/utils/common/src/test/java/org/apache/brooklyn/util/repeat/RepeaterTest.java
+++ b/utils/common/src/test/java/org/apache/brooklyn/util/repeat/RepeaterTest.java
@@ -149,7 +149,9 @@ public class RepeaterTest {
     public void runRespectsMaximumIterationLimitAndReturnsFalseIfReached() {
         final AtomicInteger iterations = new AtomicInteger();
         assertFalse(new Repeater("runRespectsMaximumIterationLimitAndReturnsFalseIfReached")
-            .repeat(new Runnable() { public void run() { iterations.incrementAndGet(); } })
+            .repeat(new Runnable() {
+                @Override public void run() { iterations.incrementAndGet(); }
+            })
             .every(Duration.millis(1))
             .until(Callables.returning(false))
             .limitIterationsTo(5)

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/common/src/test/java/org/apache/brooklyn/util/stream/StreamGobblerTest.java
----------------------------------------------------------------------
diff --git a/utils/common/src/test/java/org/apache/brooklyn/util/stream/StreamGobblerTest.java b/utils/common/src/test/java/org/apache/brooklyn/util/stream/StreamGobblerTest.java
index 0bb2b94..a4b9cb8 100644
--- a/utils/common/src/test/java/org/apache/brooklyn/util/stream/StreamGobblerTest.java
+++ b/utils/common/src/test/java/org/apache/brooklyn/util/stream/StreamGobblerTest.java
@@ -83,6 +83,7 @@ public class StreamGobblerTest {
     
     private void assertEqualsEventually(final ByteArrayOutputStream out, final String expected) {
         Asserts.succeedsEventually(new Runnable() {
+            @Override
             public void run() {
                 assertEquals(new String(out.toByteArray()), expected);
             }});

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/jmx/jmxmp-ssl-agent/src/main/java/org/apache/brooklyn/util/jmx/jmxmp/JmxmpAgent.java
----------------------------------------------------------------------
diff --git a/utils/jmx/jmxmp-ssl-agent/src/main/java/org/apache/brooklyn/util/jmx/jmxmp/JmxmpAgent.java b/utils/jmx/jmxmp-ssl-agent/src/main/java/org/apache/brooklyn/util/jmx/jmxmp/JmxmpAgent.java
index 5dcd37d..488e7f5 100644
--- a/utils/jmx/jmxmp-ssl-agent/src/main/java/org/apache/brooklyn/util/jmx/jmxmp/JmxmpAgent.java
+++ b/utils/jmx/jmxmp-ssl-agent/src/main/java/org/apache/brooklyn/util/jmx/jmxmp/JmxmpAgent.java
@@ -315,6 +315,7 @@ public class JmxmpAgent {
 
     public static final TrustManager newInspectAllTrustManager(final X509TrustManager delegate) {
         return new X509TrustManager() {
+            @Override
             public X509Certificate[] getAcceptedIssuers() {
                 // overriding this method fixes bug where non-accepted issuers have an "accept all" policy, in JMXMP/TLS
                 return new X509Certificate[0];

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/utils/test-support/src/main/java/org/apache/brooklyn/test/support/StatusListener.java
----------------------------------------------------------------------
diff --git a/utils/test-support/src/main/java/org/apache/brooklyn/test/support/StatusListener.java b/utils/test-support/src/main/java/org/apache/brooklyn/test/support/StatusListener.java
index fcf7bb2..4b01104 100644
--- a/utils/test-support/src/main/java/org/apache/brooklyn/test/support/StatusListener.java
+++ b/utils/test-support/src/main/java/org/apache/brooklyn/test/support/StatusListener.java
@@ -53,36 +53,43 @@ public class StatusListener implements ITestListener {
         log.info(msg);
     }
     
+    @Override
     public void onTestStart(ITestResult res) {
         log("Starting test " + getTestDesc(res));
         threadTestClass.set(res.getTestClass());
         threadTestStart.set(System.currentTimeMillis());
     }
 
+    @Override
     synchronized public void onTestSuccess(ITestResult arg0) {
         log(getThreadId() + " Test " + getTestDesc(arg0) + " succeeded: " + (System.currentTimeMillis() - threadTestStart.get()) + "ms");
         succeded.incrementAndGet();
         printStatus();
     }
 
+    @Override
     synchronized public void onTestFailure(ITestResult arg0) {
         log(getThreadId() + " Test " + getTestDesc(arg0) + " failed: "+arg0.getThrowable());
         failed.incrementAndGet();
         printStatus();
     }
 
+    @Override
     synchronized public void onTestSkipped(ITestResult arg0) {
         System.out.println(getThreadId() + " Test " + getTestDesc(arg0) + " skipped.");
         skipped.incrementAndGet();
         printStatus();
     }
 
+    @Override
     public void onTestFailedButWithinSuccessPercentage(ITestResult arg0) {
     }
 
+    @Override
     public void onStart(ITestContext arg0) {
     }
 
+    @Override
     public void onFinish(ITestContext arg0) {
     }
 


Mime
View raw message