brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [06/17] brooklyn-server git commit: Add missing @Override annotation to method signatures overriding interface methods
Date Mon, 23 Jan 2017 15:14:34 GMT
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/core/src/test/java/org/apache/brooklyn/util/core/task/ScheduledExecutionTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/util/core/task/ScheduledExecutionTest.java b/core/src/test/java/org/apache/brooklyn/util/core/task/ScheduledExecutionTest.java
index 5c11355..536dfea 100644
--- a/core/src/test/java/org/apache/brooklyn/util/core/task/ScheduledExecutionTest.java
+++ b/core/src/test/java/org/apache/brooklyn/util/core/task/ScheduledExecutionTest.java
@@ -56,8 +56,10 @@ public class ScheduledExecutionTest {
         BasicExecutionManager m = new BasicExecutionManager("mycontextid");
         final AtomicInteger i = new AtomicInteger(0);
         ScheduledTask t = new ScheduledTask(MutableMap.of("delay", 2*PERIOD, "period", PERIOD, "maxIterations", 5), new Callable<Task<?>>() {
+            @Override
             public Task<?> call() throws Exception {
                 return new BasicTask<Integer>(new Callable<Integer>() {
+                    @Override
                     public Integer call() {
                         log.debug("task running: "+Tasks.current()+" "+Tasks.current().getStatusDetail(false));
                         return i.incrementAndGet();
@@ -82,8 +84,10 @@ public class ScheduledExecutionTest {
         BasicExecutionManager m = new BasicExecutionManager("mycontextid");
         final AtomicInteger calls = new AtomicInteger(0);
         ScheduledTask t = new ScheduledTask(MutableMap.of("period", Duration.ONE_MILLISECOND, "maxIterations", 5), new Callable<Task<?>>() {
+            @Override
             public Task<?> call() throws Exception {
                 return new BasicTask<>(new Callable<Integer>() {
+                    @Override
                     public Integer call() {
                         calls.incrementAndGet();
                         throw new RuntimeException("boo");
@@ -108,8 +112,10 @@ public class ScheduledExecutionTest {
         BasicExecutionManager m = new BasicExecutionManager("mycontextid");
         final AtomicInteger calls = new AtomicInteger(0);
         ScheduledTask t = new ScheduledTask(MutableMap.of("period", Duration.ONE_MILLISECOND, "maxIterations", 5, "cancelOnException", false), new Callable<Task<?>>() {
+            @Override
             public Task<?> call() throws Exception {
                 return new BasicTask<>(new Callable<Integer>() {
+                    @Override
                     public Integer call() {
                         calls.incrementAndGet();
                         throw new RuntimeException("boo");
@@ -128,8 +134,10 @@ public class ScheduledExecutionTest {
         BasicExecutionManager m = new BasicExecutionManager("mycontextid");
         final AtomicInteger i = new AtomicInteger(0);
         ScheduledTask t = new ScheduledTask(MutableMap.of("delay", 2*PERIOD, "period", PERIOD), new Callable<Task<?>>() {
+            @Override
             public Task<?> call() throws Exception {
                 return new BasicTask<Integer>(new Callable<Integer>() {
+                    @Override
                     public Integer call() {
                         ScheduledTask submitter = (ScheduledTask) ((BasicTask)Tasks.current()).getSubmittedByTask();
                         if (i.get() >= 4) submitter.period = null;
@@ -157,8 +165,10 @@ public class ScheduledExecutionTest {
         BasicExecutionManager m = new BasicExecutionManager("mycontextid");
         final AtomicInteger i = new AtomicInteger();
         ScheduledTask t = new ScheduledTask(MutableMap.of("delay", PERIOD.times(2), "period", PERIOD), new Callable<Task<?>>() {
+            @Override
             public Task<?> call() throws Exception {
                 return new BasicTask<Integer>(new Callable<Integer>() {
+                    @Override
                     public Integer call() {
                         log.info("task running ("+i+"): "+Tasks.current()+" "+Tasks.current().getStatusDetail(false));
                         ScheduledTask submitter = (ScheduledTask) ((BasicTask)Tasks.current()).getSubmittedByTask();
@@ -192,8 +202,10 @@ public class ScheduledExecutionTest {
         BasicExecutionManager m = new BasicExecutionManager("mycontextid");
         final AtomicInteger i = new AtomicInteger();
         ScheduledTask t = new ScheduledTask(MutableMap.of("delay", PERIOD.times(2), "period", PERIOD), new Callable<Task<?>>() {
+            @Override
             public Task<?> call() throws Exception {
                 return new BasicTask<Integer>(new Callable<Integer>() {
+                    @Override
                     public Integer call() {
                         log.info("task running ("+i+"): "+Tasks.current()+" "+Tasks.current().getStatusDetail(false));
                         Time.sleep(CYCLE_DELAY);
@@ -241,8 +253,10 @@ public class ScheduledExecutionTest {
         final Semaphore interruptedSemaphore = new Semaphore(0);
         final AtomicInteger i = new AtomicInteger();
         ScheduledTask t = new ScheduledTask(MutableMap.of("delay", PERIOD.times(2), "period", PERIOD), new Callable<Task<?>>() {
+            @Override
             public Task<?> call() throws Exception {
                 return new BasicTask<Integer>(new Callable<Integer>() {
+                    @Override
                     public Integer call() {
                         try {
                             log.info("task running ("+i+"): "+Tasks.current()+" "+Tasks.current().getStatusDetail(false));
@@ -293,8 +307,10 @@ public class ScheduledExecutionTest {
         final List<Long> execTimes = new CopyOnWriteArrayList<Long>();
         
         ScheduledTask t = new ScheduledTask(MutableMap.of("delay", PERIOD, "period", PERIOD), new Callable<Task<?>>() {
+            @Override
             public Task<?> call() throws Exception {
                 return new BasicTask<Void>(new Runnable() {
+                    @Override
                     public void run() {
                         execTimes.add(System.currentTimeMillis());
                         try {
@@ -308,6 +324,7 @@ public class ScheduledExecutionTest {
         m.submit(t);
         
         Asserts.succeedsEventually(new Runnable() {
+            @Override
             public void run() {
                 assertTrue(execTimes.size() > 3, "size="+execTimes.size());
             }});

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/core/src/test/java/org/apache/brooklyn/util/core/task/SingleThreadedSchedulerTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/util/core/task/SingleThreadedSchedulerTest.java b/core/src/test/java/org/apache/brooklyn/util/core/task/SingleThreadedSchedulerTest.java
index 56d61c0..fd63fcc 100644
--- a/core/src/test/java/org/apache/brooklyn/util/core/task/SingleThreadedSchedulerTest.java
+++ b/core/src/test/java/org/apache/brooklyn/util/core/task/SingleThreadedSchedulerTest.java
@@ -70,6 +70,7 @@ public class SingleThreadedSchedulerTest {
         for (int i = 0; i < NUM_TIMES; i++) {
             final int counter = i;
             em.submit(MutableMap.of("tag", "category1"), new Runnable() {
+                @Override
                 public void run() {
                     result.add(counter);
                 }});
@@ -95,6 +96,7 @@ public class SingleThreadedSchedulerTest {
         final AtomicInteger counter = new AtomicInteger(0);
         for (int i = 0; i < NUM_TIMES; i++) {
             BasicTask<Void> t = new BasicTask<Void>(new Runnable() {
+                @Override
                 public void run() {
                     counter.incrementAndGet();
                 }});
@@ -120,6 +122,7 @@ public class SingleThreadedSchedulerTest {
         Future<Integer> future = em.submit(MutableMap.of("tag", "category1"), t);
 
         Thread thread = new Thread(new Runnable() {
+            @Override
             public void run() {
                 try {
                     Thread.sleep(10);
@@ -155,6 +158,7 @@ public class SingleThreadedSchedulerTest {
         
         final AtomicBoolean executed = new AtomicBoolean();
         BasicTask<?> t = new BasicTask<Void>(new Runnable() {
+            @Override
             public void run() {
                 executed.set(true);
             }});
@@ -185,6 +189,7 @@ public class SingleThreadedSchedulerTest {
     
     private Callable<Void> newLatchAwaiter(final CountDownLatch latch) {
         return new Callable<Void>() {
+            @Override
             public Void call() throws Exception {
                 latch.await();
                 return null;

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/core/src/test/java/org/apache/brooklyn/util/core/task/TaskFinalizationTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/util/core/task/TaskFinalizationTest.java b/core/src/test/java/org/apache/brooklyn/util/core/task/TaskFinalizationTest.java
index ef63a7c..ff39898 100644
--- a/core/src/test/java/org/apache/brooklyn/util/core/task/TaskFinalizationTest.java
+++ b/core/src/test/java/org/apache/brooklyn/util/core/task/TaskFinalizationTest.java
@@ -38,9 +38,10 @@ public class TaskFinalizationTest {
     // integration because it can take a while (and finalizers aren't even guaranteed)
     @Test(groups="Integration")
     public void testFinalizerInvoked() throws InterruptedException {
-        BasicTask<?> t = new BasicTask<Void>(new Runnable() { public void run() { /* no op */ }});
+        BasicTask<?> t = new BasicTask<Void>(new Runnable() { @Override public void run() { /* no op */ }});
         final Semaphore x = new Semaphore(0);
         t.setFinalizer(new BasicTask.TaskFinalizer() {
+            @Override
             public void onTaskFinalization(Task<?> t) {
                 synchronized (x) { 
                     x.release();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/core/src/test/java/org/apache/brooklyn/util/core/task/ValueResolverTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/util/core/task/ValueResolverTest.java b/core/src/test/java/org/apache/brooklyn/util/core/task/ValueResolverTest.java
index ffe6762..647b558 100644
--- a/core/src/test/java/org/apache/brooklyn/util/core/task/ValueResolverTest.java
+++ b/core/src/test/java/org/apache/brooklyn/util/core/task/ValueResolverTest.java
@@ -87,6 +87,7 @@ public class ValueResolverTest extends BrooklynAppUnitTestSupport {
         // Below, we call ValueResolver.getMaybe() in app's execution context. Therefore it will execute the task.
         Maybe<String>  result = app.getExecutionContext()
                 .submit(new Callable<Maybe<String> >() {
+                    @Override
                     public Maybe<String>  call() throws Exception {
                         return Tasks.resolving(t).as(String.class).timeout(Asserts.DEFAULT_LONG_TIMEOUT).getMaybe();
                     }})
@@ -102,6 +103,7 @@ public class ValueResolverTest extends BrooklynAppUnitTestSupport {
         // However, it will quickly timeout as the task will not have completed.
         Maybe<String>  result = app.getExecutionContext()
                 .submit(new Callable<Maybe<String> >() {
+                    @Override
                     public Maybe<String>  call() throws Exception {
                         return Tasks.resolving(t).as(String.class).timeout(Duration.ZERO).getMaybe();
                     }})
@@ -153,6 +155,7 @@ public class ValueResolverTest extends BrooklynAppUnitTestSupport {
     public void testGetImmediatelyInTask() throws Exception {
         final MyImmediateAndDeferredSupplier supplier = new MyImmediateAndDeferredSupplier();
         Task<CallInfo> task = app.getExecutionContext().submit(new Callable<CallInfo>() {
+            @Override
             public CallInfo call() {
                 return myUniquelyNamedMethod();
             }
@@ -297,6 +300,7 @@ public class ValueResolverTest extends BrooklynAppUnitTestSupport {
     
     public static final Task<String> newSleepTask(final Duration timeout, final String result) {
         return Tasks.<String>builder().body(new Callable<String>() { 
+            @Override
             public String call() { 
                 Time.sleep(timeout); 
                 return result; 
@@ -306,6 +310,7 @@ public class ValueResolverTest extends BrooklynAppUnitTestSupport {
     
     public static final Task<String> newThrowTask(final Duration timeout) {
         return Tasks.<String>builder().body(new Callable<String>() { 
+            @Override
             public String call() {
                 Time.sleep(timeout); 
                 throw new IllegalStateException("intended, during tests");

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/launcher/src/test/java/org/apache/brooklyn/entity/basic/VanillaSoftwareYamlTest.java
----------------------------------------------------------------------
diff --git a/launcher/src/test/java/org/apache/brooklyn/entity/basic/VanillaSoftwareYamlTest.java b/launcher/src/test/java/org/apache/brooklyn/entity/basic/VanillaSoftwareYamlTest.java
index e7648e9..947202b 100644
--- a/launcher/src/test/java/org/apache/brooklyn/entity/basic/VanillaSoftwareYamlTest.java
+++ b/launcher/src/test/java/org/apache/brooklyn/entity/basic/VanillaSoftwareYamlTest.java
@@ -54,6 +54,7 @@ public class VanillaSoftwareYamlTest {
             Assert.assertTrue( Math.abs(d1*1000-System.currentTimeMillis())<15000, "Time UTC does not match system; "+d1+" v "+System.currentTimeMillis() );
 
             Asserts.succeedsEventually(new Runnable() {
+                @Override
                 public void run() {
                     String fileContents = new ResourceUtils(this).getResourceAsString(filePath);
                     Assert.assertTrue(fileContents.contains("checkRunning"));
@@ -62,6 +63,7 @@ public class VanillaSoftwareYamlTest {
 
             app.invoke(Startable.STOP, null).getUnchecked();
             Asserts.succeedsEventually(new Runnable() {
+                @Override
                 public void run() {
                     String fileContents = new ResourceUtils(this).getResourceAsString(filePath);
                     Assert.assertTrue(fileContents.contains("stop"));

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/launcher/src/test/java/org/apache/brooklyn/launcher/blueprints/AbstractBlueprintTest.java
----------------------------------------------------------------------
diff --git a/launcher/src/test/java/org/apache/brooklyn/launcher/blueprints/AbstractBlueprintTest.java b/launcher/src/test/java/org/apache/brooklyn/launcher/blueprints/AbstractBlueprintTest.java
index 565ad5d..68ab781 100644
--- a/launcher/src/test/java/org/apache/brooklyn/launcher/blueprints/AbstractBlueprintTest.java
+++ b/launcher/src/test/java/org/apache/brooklyn/launcher/blueprints/AbstractBlueprintTest.java
@@ -163,6 +163,7 @@ public abstract class AbstractBlueprintTest {
         EntityAsserts.assertAttributeEqualsEventually(app, Attributes.SERVICE_STATE_ACTUAL, Lifecycle.RUNNING);
         
         Asserts.succeedsEventually(new Runnable() {
+            @Override
             public void run() {
                 for (Entity entity : Entities.descendantsAndSelf(app)) {
                     assertNotEquals(entity.getAttribute(Attributes.SERVICE_STATE_ACTUAL), Lifecycle.ON_FIRE);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/core/mgmt/persist/jclouds/JcloudsBlobStoreBasedObjectStore.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/core/mgmt/persist/jclouds/JcloudsBlobStoreBasedObjectStore.java b/locations/jclouds/src/main/java/org/apache/brooklyn/core/mgmt/persist/jclouds/JcloudsBlobStoreBasedObjectStore.java
index 25558a2..c679dc5 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/core/mgmt/persist/jclouds/JcloudsBlobStoreBasedObjectStore.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/core/mgmt/persist/jclouds/JcloudsBlobStoreBasedObjectStore.java
@@ -80,6 +80,7 @@ public class JcloudsBlobStoreBasedObjectStore implements PersistenceObjectStore
         getBlobStoreContext();
     }
 
+    @Override
     public String getSummaryName() {
         return (locationSpec!=null ? locationSpec : location)+":"+getContainerNameFull();
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
index d7ff9e8..1d2ac9c 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
@@ -2352,6 +2352,7 @@ public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation im
                     subtasks.put(
                             "Close port-forward "+hostAndPortOverride+"->"+loginPort,
                             new Runnable() {
+                                @Override
                                 public void run() {
                                     LOG.debug("Closing port-forwarding at {} for machine {}: {}->{}", new Object[] {this, machine, hostAndPortOverride, loginPort});
                                     portForwarder.closePortForwarding(node.get(), loginPort, hostAndPortOverride, Protocol.TCP);
@@ -2375,6 +2376,7 @@ public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation im
                     subtasks.put(
                             "Close port-forward "+publicEndpoint+"->"+targetPort,
                             new Runnable() {
+                                @Override
                                 public void run() {
                                     LOG.debug("Closing port-forwarding at {} for machine {}: {}->{}", new Object[] {this, machine, publicEndpoint, targetPort});
                                     portForwarder.closePortForwarding(node.get(), targetPort, publicEndpoint, protocol);
@@ -2544,6 +2546,7 @@ public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation im
 
         try {
             Callable<Boolean> checker = new Callable<Boolean>() {
+                @Override
                 public Boolean call() {
                     final WinRmMachineLocation machine = machinesToTry.getLeft();
                     WinRmToolResponse response = machine.executeCommand(
@@ -2673,6 +2676,7 @@ public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation im
         }
         try {
             Callable<Boolean> checker = new Callable<Boolean>() {
+                @Override
                 public Boolean call() {
                     for (Map.Entry<SshMachineLocation, LoginCredentials> entry : machinesToTry.entrySet()) {
                         SshMachineLocation machine = entry.getKey();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/networking/SecurityGroupDefinition.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/networking/SecurityGroupDefinition.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/networking/SecurityGroupDefinition.java
index b0c6339..86d411e 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/networking/SecurityGroupDefinition.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/networking/SecurityGroupDefinition.java
@@ -37,7 +37,9 @@ import com.google.common.annotations.Beta;
 @Beta
 public class SecurityGroupDefinition {
 
-    private Callable<String> groupNameFactory = new Callable<String>() { public String call() { return "br-sg-"+Identifiers.makeRandomId(8); } };
+    private Callable<String> groupNameFactory = new Callable<String>() {
+        @Override public String call() { return "br-sg-"+Identifiers.makeRandomId(8); }
+    };
     private List<IpPermission> ipPerms = MutableList.of();
     
     public void createGroupInAwsRegion(ComputeServiceContext computeServiceContext, String region) {
@@ -88,7 +90,9 @@ public class SecurityGroupDefinition {
     
     // TODO use cloud machine namer
     public SecurityGroupDefinition named(final String name) {
-        groupNameFactory = new Callable<String>() { public String call() { return name; } };
+        groupNameFactory = new Callable<String>() {
+            @Override public String call() { return name; }
+        };
         return this;
     }
     public String getName() { 

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/AbstractPortableTemplateBuilder.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/AbstractPortableTemplateBuilder.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/AbstractPortableTemplateBuilder.java
index f159834..1347426 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/AbstractPortableTemplateBuilder.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/AbstractPortableTemplateBuilder.java
@@ -70,6 +70,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     @Override
     public T any() {
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.any(); }});
         return (T)this;
     }
@@ -78,6 +79,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T fromHardware(final Hardware hardware) {
         this.hardware = hardware;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.fromHardware(hardware); }});
         return (T)this;
     }
@@ -90,6 +92,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T fromImage(final Image image) {
         this.image = image;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.fromImage(image); }});
         return (T)this;
     }
@@ -102,6 +105,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T fromTemplate(final Template template) {
         this.template = template;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.fromTemplate(template); }});
         return (T)this;
     }
@@ -113,6 +117,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     @Override
     public T smallest() {
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.smallest(); }});
         return (T)this;
     }
@@ -120,6 +125,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     @Override
     public T fastest() {
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.fastest(); }});
         return (T)this;
     }
@@ -127,6 +133,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     @Override
     public T biggest() {
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.biggest(); }});
         return (T)this;
     }
@@ -135,6 +142,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T locationId(final String locationId) {
         this.locationId = locationId;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.locationId(locationId); }});
         return (T)this;
     }
@@ -147,6 +155,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T imageId(final String imageId) {
         this.imageId = imageId;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.imageId(imageId); }});
         return (T)this;
     }
@@ -159,6 +168,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T hardwareId(final String hardwareId) {
         this.hardwareId = hardwareId;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.hardwareId(hardwareId); }});
         return (T)this;
     }
@@ -171,6 +181,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T osNameMatches(final String osNameRegex) {
         this.osNameRegex = osNameRegex;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.osNameMatches(osNameRegex); }});
         return (T)this;
     }
@@ -183,6 +194,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T osDescriptionMatches(final String osDescriptionRegex) {
         this.osDescriptionRegex = osDescriptionRegex;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.osDescriptionMatches(osDescriptionRegex); }});
         return (T)this;
     }
@@ -195,6 +207,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T osVersionMatches(final String osVersionRegex) {
         this.osVersionRegex = osVersionRegex;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.osVersionMatches(osVersionRegex); }});
         return (T)this;
     }
@@ -207,6 +220,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T osArchMatches(final String osArchitectureRegex) {
         this.osArchitectureRegex = osArchitectureRegex;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.osArchMatches(osArchitectureRegex); }});
         return (T)this;
     }
@@ -219,6 +233,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T os64Bit(final boolean is64bit) {
         this.is64bit = is64bit;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.os64Bit(is64bit); }});
         return (T)this;
     }
@@ -231,6 +246,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T osFamily(final OsFamily os) {
         this.os = os;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.osFamily(os); }});
         return (T)this;
     }
@@ -243,6 +259,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T hypervisorMatches(final String hypervisorRegex) {
         this.hypervisorRegex = hypervisorRegex;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.hypervisorMatches(hypervisorRegex); }});
         return (T)this;
     }
@@ -255,6 +272,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T imageNameMatches(final String imageNameRegex) {
         this.imageNameRegex = imageNameRegex;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.imageNameMatches(imageNameRegex); }});
         return (T)this;
     }
@@ -267,6 +285,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T imageDescriptionMatches(final String imageDescriptionRegex) {
         this.imageDescriptionRegex = imageDescriptionRegex;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.imageDescriptionMatches(imageDescriptionRegex); }});
         return (T)this;
     }
@@ -279,6 +298,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T imageVersionMatches(final String imageVersionRegex) {
         this.imageVersionRegex = imageVersionRegex;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.imageVersionMatches(imageVersionRegex); }});
         return (T)this;
     }
@@ -291,6 +311,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T imageMatches(final Predicate<Image> condition) {
         this.imageCondition = condition;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.imageMatches(condition); }});
         return (T)this;
     }
@@ -303,6 +324,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T minCores(final double minCores) {
         this.minCores = minCores;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.minCores(minCores); }});
         return (T)this;
     }
@@ -315,6 +337,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T minRam(final int megabytes) {
         this.minRam = megabytes;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.minRam(megabytes); }});
         return (T)this;
     }
@@ -328,6 +351,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T minDisk(final double gigabytes) {
         this.minDisk = gigabytes;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.minDisk(gigabytes); }});
         return (T)this;
     }
@@ -337,9 +361,11 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
         return minDisk;
     }
 
+    @Override
     public T imageChooser(final Function<Iterable<? extends Image>, Image> imageChooserFunction) {
         this.imageChooserFunction = imageChooserFunction;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.imageChooser(imageChooserFunction); }});
         return (T)this;
     }
@@ -398,6 +424,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T options(final TemplateOptions options) {
         this.options = options;
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.options(options); }});
         return (T)this;
     }
@@ -413,6 +440,7 @@ public abstract class AbstractPortableTemplateBuilder<T extends AbstractPortable
     public T addOptions(final TemplateOptions options) {
         this.additionalOptions.add(options);
         commands.add(new Function<TemplateBuilder,TemplateBuilder>() { 
+            @Override
             public TemplateBuilder apply(TemplateBuilder b) { return b.options(options); }});
         return (T)this;
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/AutoAssignFloatingIpOption.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/AutoAssignFloatingIpOption.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/AutoAssignFloatingIpOption.java
index 0996222..42063d7 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/AutoAssignFloatingIpOption.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/AutoAssignFloatingIpOption.java
@@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory;
 class AutoAssignFloatingIpOption implements TemplateOptionCustomizer {
     private static final Logger LOG = LoggerFactory.getLogger(AutoAssignFloatingIpOption.class);
 
+    @Override
     public void apply(TemplateOptions t, ConfigBag props, Object v) {
         if (t instanceof NovaTemplateOptions) {
             ((NovaTemplateOptions) t).autoAssignFloatingIp((Boolean) v);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/AutoCreateFloatingIpsOption.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/AutoCreateFloatingIpsOption.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/AutoCreateFloatingIpsOption.java
index 4f91a8e..96590c8 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/AutoCreateFloatingIpsOption.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/AutoCreateFloatingIpsOption.java
@@ -30,6 +30,7 @@ class AutoCreateFloatingIpsOption implements TemplateOptionCustomizer {
 
     private static final Logger LOG = LoggerFactory.getLogger(AutoCreateFloatingIpsOption.class);
     
+    @Override
     public void apply(TemplateOptions t, ConfigBag props, Object v) {
         LOG.warn("Using deprecated " + JcloudsLocationConfig.AUTO_CREATE_FLOATING_IPS + "; use " + JcloudsLocationConfig.AUTO_ASSIGN_FLOATING_IP + " instead");
         if (t instanceof NovaTemplateOptions) {

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/AutoGenerateKeypairsOption.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/AutoGenerateKeypairsOption.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/AutoGenerateKeypairsOption.java
index 8d1601f..023eb18 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/AutoGenerateKeypairsOption.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/AutoGenerateKeypairsOption.java
@@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory;
 class AutoGenerateKeypairsOption implements TemplateOptionCustomizer {
     private static final Logger LOG = LoggerFactory.getLogger(AutoGenerateKeypairsOption.class);
 
+    @Override
     public void apply(TemplateOptions t, ConfigBag props, Object v) {
         if (t instanceof NovaTemplateOptions) {
             ((NovaTemplateOptions) t).generateKeyPair((Boolean) v);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/DomainNameOption.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/DomainNameOption.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/DomainNameOption.java
index 54f67f2..43e0731 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/DomainNameOption.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/DomainNameOption.java
@@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory;
 class DomainNameOption implements TemplateOptionCustomizer {
     private static final Logger LOG = LoggerFactory.getLogger(DomainNameOption.class);
 
+    @Override
     public void apply(TemplateOptions t, ConfigBag props, Object v) {
         if (t instanceof SoftLayerTemplateOptions) {
             ((SoftLayerTemplateOptions) t).domainName(TypeCoercions.coerce(v, String.class));

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/ExtraPublicKeyDataToAuthOption.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/ExtraPublicKeyDataToAuthOption.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/ExtraPublicKeyDataToAuthOption.java
index 15ffd27..2ab0ff6 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/ExtraPublicKeyDataToAuthOption.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/ExtraPublicKeyDataToAuthOption.java
@@ -28,6 +28,7 @@ import org.slf4j.LoggerFactory;
 class ExtraPublicKeyDataToAuthOption implements TemplateOptionCustomizer {
     private static final Logger LOG = LoggerFactory.getLogger(ExtraPublicKeyDataToAuthOption.class);
 
+    @Override
     public void apply(TemplateOptions t, ConfigBag props, Object v) {
         // this is unreliable:
         // * seems now (Aug 2016) to be run *before* the TO.runScript which creates the user,

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/InboundPortsOption.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/InboundPortsOption.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/InboundPortsOption.java
index 8d233bc..1cfd55d 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/InboundPortsOption.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/InboundPortsOption.java
@@ -35,6 +35,7 @@ import com.google.common.collect.Iterables;
 class InboundPortsOption implements TemplateOptionCustomizer {
     private static final Logger LOG = LoggerFactory.getLogger(InboundPortsOption.class);
 
+    @Override
     public void apply(TemplateOptions t, ConfigBag props, Object v) {
         int[] inboundPorts = toIntPortArray(v);
         if (LOG.isDebugEnabled())

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/KeyPairOption.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/KeyPairOption.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/KeyPairOption.java
index 1edeaf2..ec288e5 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/KeyPairOption.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/KeyPairOption.java
@@ -30,6 +30,7 @@ import org.slf4j.LoggerFactory;
 class KeyPairOption implements TemplateOptionCustomizer {
     private static final Logger LOG = LoggerFactory.getLogger(KeyPairOption.class);
 
+    @Override
     public void apply(TemplateOptions t, ConfigBag props, Object v) {
         if (t instanceof EC2TemplateOptions) {
             ((EC2TemplateOptions) t).keyPair(v.toString());

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserOption.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserOption.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserOption.java
index 695f544..bf8343c 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserOption.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserOption.java
@@ -23,6 +23,7 @@ import org.apache.brooklyn.util.core.config.ConfigBag;
 import org.jclouds.compute.options.TemplateOptions;
 
 class LoginUserOption implements TemplateOptionCustomizer {
+    @Override
     public void apply(TemplateOptions t, ConfigBag props, Object v) {
         if (v != null) {
             t.overrideLoginUser(v.toString());

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserPasswordOption.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserPasswordOption.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserPasswordOption.java
index 9ee2b11..b559dd5 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserPasswordOption.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserPasswordOption.java
@@ -23,6 +23,7 @@ import org.apache.brooklyn.util.core.config.ConfigBag;
 import org.jclouds.compute.options.TemplateOptions;
 
 class LoginUserPasswordOption implements TemplateOptionCustomizer {
+    @Override
     public void apply(TemplateOptions t, ConfigBag props, Object v) {
         if (v != null) {
             t.overrideLoginPassword(v.toString());

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserPrivateKeyDataOption.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserPrivateKeyDataOption.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserPrivateKeyDataOption.java
index 403ca86..7a685d2 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserPrivateKeyDataOption.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserPrivateKeyDataOption.java
@@ -23,6 +23,7 @@ import org.apache.brooklyn.util.core.config.ConfigBag;
 import org.jclouds.compute.options.TemplateOptions;
 
 class LoginUserPrivateKeyDataOption implements TemplateOptionCustomizer {
+    @Override
     public void apply(TemplateOptions t, ConfigBag props, Object v) {
         if (v != null) {
             t.overrideLoginPrivateKey(v.toString());

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserPrivateKeyFileOption.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserPrivateKeyFileOption.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserPrivateKeyFileOption.java
index b18ef7f..a09fe9d 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserPrivateKeyFileOption.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/LoginUserPrivateKeyFileOption.java
@@ -35,6 +35,7 @@ import com.google.common.io.Files;
 class LoginUserPrivateKeyFileOption implements TemplateOptionCustomizer {
     private static final Logger LOG = LoggerFactory.getLogger(LoginUserPrivateKeyFileOption.class);
 
+    @Override
     public void apply(TemplateOptions t, ConfigBag props, Object v) {
         if (v != null) {
             String privateKeyFileName = v.toString();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/NetworkNameOption.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/NetworkNameOption.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/NetworkNameOption.java
index e4bf045..16c0949 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/NetworkNameOption.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/NetworkNameOption.java
@@ -31,6 +31,7 @@ import org.slf4j.LoggerFactory;
 class NetworkNameOption implements TemplateOptionCustomizer {
     private static final Logger LOG = LoggerFactory.getLogger(NetworkNameOption.class);
 
+    @Override
     public void apply(TemplateOptions t, ConfigBag props, Object v) {
         if (t instanceof AWSEC2TemplateOptions) {
             // subnet ID is the sensible interpretation of network name in EC2

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/RunAsRootOption.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/RunAsRootOption.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/RunAsRootOption.java
index 326b883..925ee13 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/RunAsRootOption.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/RunAsRootOption.java
@@ -23,6 +23,7 @@ import org.apache.brooklyn.util.core.config.ConfigBag;
 import org.jclouds.compute.options.TemplateOptions;
 
 class RunAsRootOption implements TemplateOptionCustomizer {
+    @Override
     public void apply(TemplateOptions t, ConfigBag props, Object v) {
         t.runAsRoot((Boolean)v);
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/SecurityGroupOption.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/SecurityGroupOption.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/SecurityGroupOption.java
index ee1040d..b4e34f0 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/SecurityGroupOption.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/SecurityGroupOption.java
@@ -31,6 +31,7 @@ import org.slf4j.LoggerFactory;
 class SecurityGroupOption implements TemplateOptionCustomizer {
     private static final Logger LOG = LoggerFactory.getLogger(SecurityGroupOption.class);
 
+    @Override
     public void apply(TemplateOptions t, ConfigBag props, Object v) {
         if (t instanceof EC2TemplateOptions) {
             String[] securityGroups = toStringArray(v);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/StringTagsOption.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/StringTagsOption.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/StringTagsOption.java
index 153577c..f29f50c 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/StringTagsOption.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/StringTagsOption.java
@@ -30,6 +30,7 @@ import org.slf4j.LoggerFactory;
 class StringTagsOption implements TemplateOptionCustomizer {
     private static final Logger LOG = LoggerFactory.getLogger(StringTagsOption.class);
 
+    @Override
     public void apply(TemplateOptions t, ConfigBag props, Object v) {
         List<String> tags = Strings.toStringList(v);
         if (LOG.isDebugEnabled()) {

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/TemplateBuilderCustomizers.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/TemplateBuilderCustomizers.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/TemplateBuilderCustomizers.java
index e4426d6..402f359 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/TemplateBuilderCustomizers.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/TemplateBuilderCustomizers.java
@@ -84,48 +84,56 @@ public class TemplateBuilderCustomizers {
     }
 
     private static class MinRamTemplateBuilder implements TemplateBuilderCustomizer {
+        @Override
         public void apply(TemplateBuilder tb, ConfigBag props, Object v) {
             tb.minRam((int) (ByteSizeStrings.parse(Strings.toString(v), "mb") / 1000 / 1000));
         }
     }
 
     private static class MinCoresTemplateBuilder implements TemplateBuilderCustomizer {
+        @Override
         public void apply(TemplateBuilder tb, ConfigBag props, Object v) {
             tb.minCores(TypeCoercions.coerce(v, Double.class));
         }
     }
 
     private static class MinDiskTemplateBuilder implements TemplateBuilderCustomizer {
+        @Override
         public void apply(TemplateBuilder tb, ConfigBag props, Object v) {
             tb.minDisk((int) (ByteSizeStrings.parse(Strings.toString(v), "gb") / 1000 / 1000 / 1000));
         }
     }
 
     private static class HardwareIdTemplateBuilder implements TemplateBuilderCustomizer {
+        @Override
         public void apply(TemplateBuilder tb, ConfigBag props, Object v) {
             tb.hardwareId(v.toString());
         }
     }
 
     private static class ImageIdTemplateBuilder implements TemplateBuilderCustomizer {
+        @Override
         public void apply(TemplateBuilder tb, ConfigBag props, Object v) {
             tb.imageId(v.toString());
         }
     }
 
     private static class ImageDescriptionRegexTemplateBuilder implements TemplateBuilderCustomizer {
+        @Override
         public void apply(TemplateBuilder tb, ConfigBag props, Object v) {
             tb.imageDescriptionMatches(v.toString());
         }
     }
 
     private static class ImageNameRegexTemplateBuilder implements TemplateBuilderCustomizer {
+        @Override
         public void apply(TemplateBuilder tb, ConfigBag props, Object v) {
             tb.imageNameMatches(v.toString());
         }
     }
 
     private static class OsFamilyTemplateBuilder implements TemplateBuilderCustomizer {
+        @Override
         public void apply(TemplateBuilder tb, ConfigBag props, Object v) {
             Maybe<OsFamily> osFamily = Enums.valueOfIgnoreCase(OsFamily.class, v.toString());
             if (osFamily.isAbsent()) {
@@ -136,18 +144,21 @@ public class TemplateBuilderCustomizers {
     }
 
     private static class OsVersionRegexTemplateBuilder implements TemplateBuilderCustomizer {
+        @Override
         public void apply(TemplateBuilder tb, ConfigBag props, Object v) {
             tb.osVersionMatches(v.toString());
         }
     }
 
     private static class TemplateSpecTemplateBuilder implements TemplateBuilderCustomizer {
+        @Override
         public void apply(TemplateBuilder tb, ConfigBag props, Object v) {
             tb.from(TemplateBuilderSpec.parse(v.toString()));
         }
     }
 
     private static class Os64BitTemplateBuidler implements TemplateBuilderCustomizer {
+        @Override
         public void apply(TemplateBuilder tb, ConfigBag props, Object v) {
             Boolean os64Bit = TypeCoercions.coerce(v, Boolean.class);
             if (os64Bit != null) {

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/UserDataUuencodedOption.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/UserDataUuencodedOption.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/UserDataUuencodedOption.java
index 18fdb38..ee0075e 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/UserDataUuencodedOption.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/UserDataUuencodedOption.java
@@ -30,6 +30,7 @@ import org.slf4j.LoggerFactory;
 class UserDataUuencodedOption implements TemplateOptionCustomizer {
     private static final Logger LOG = LoggerFactory.getLogger(UserDataUuencodedOption.class);
 
+    @Override
     public void apply(TemplateOptions t, ConfigBag props, Object v) {
         if (t instanceof EC2TemplateOptions) {
             byte[] bytes = toByteArray(v);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/UserMetadataMapOption.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/UserMetadataMapOption.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/UserMetadataMapOption.java
index 8650e9b..390084e 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/UserMetadataMapOption.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/UserMetadataMapOption.java
@@ -28,6 +28,7 @@ import org.jclouds.compute.options.TemplateOptions;
 import com.google.common.collect.Maps;
 
 class UserMetadataMapOption implements TemplateOptionCustomizer {
+    @Override
     public void apply(TemplateOptions t, ConfigBag props, Object v) {
         if (v != null) {
             t.userMetadata(toMapStringString(v));

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/UserMetadataStringOption.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/UserMetadataStringOption.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/UserMetadataStringOption.java
index b01fdcb..da887b2 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/UserMetadataStringOption.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/templates/customize/UserMetadataStringOption.java
@@ -34,6 +34,7 @@ import org.slf4j.LoggerFactory;
 class UserMetadataStringOption implements TemplateOptionCustomizer {
     private static final Logger LOG = LoggerFactory.getLogger(UserMetadataStringOption.class);
 
+    @Override
     public void apply(TemplateOptions t, ConfigBag props, Object v) {
         if (t instanceof EC2TemplateOptions) {
             // See AWS docs: http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/UsingConfig_WinAMI.html#user-data-execution

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/main/java/org/apache/brooklyn/policy/jclouds/os/CreateUserPolicy.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/policy/jclouds/os/CreateUserPolicy.java b/locations/jclouds/src/main/java/org/apache/brooklyn/policy/jclouds/os/CreateUserPolicy.java
index 100cf97..1de2421 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/policy/jclouds/os/CreateUserPolicy.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/policy/jclouds/os/CreateUserPolicy.java
@@ -111,6 +111,7 @@ public class CreateUserPolicy extends AbstractPolicy implements SensorEventListe
 
     protected void addUserAsync(final Entity entity, final SshMachineLocation machine) {
         ((EntityInternal)entity).getExecutionContext().execute(new Runnable() {
+            @Override
             public void run() {
                 addUser(entity, machine);
             }});

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/test/java/org/apache/brooklyn/core/mgmt/persist/jclouds/BlobStorePersistencePerformanceTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/core/mgmt/persist/jclouds/BlobStorePersistencePerformanceTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/core/mgmt/persist/jclouds/BlobStorePersistencePerformanceTest.java
index bcba953..2238385 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/core/mgmt/persist/jclouds/BlobStorePersistencePerformanceTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/core/mgmt/persist/jclouds/BlobStorePersistencePerformanceTest.java
@@ -81,7 +81,7 @@ public class BlobStorePersistencePerformanceTest extends AbstractPerformanceTest
                  .iterations(numIterations)
                  .minAcceptablePerSecond(minRatePerSec)
                  .job(new Runnable() {
-                     public void run() {
+                     @Override public void run() {
                          blobstoreAccessor.put(""+i.incrementAndGet());
                      }}));
      }
@@ -97,7 +97,7 @@ public class BlobStorePersistencePerformanceTest extends AbstractPerformanceTest
                  .iterations(numIterations)
                  .minAcceptablePerSecond(minRatePerSec)
                  .job(new Runnable() {
-                     public void run() {
+                     @Override public void run() {
                          blobstoreAccessor.get();
                      }}));
      }
@@ -121,7 +121,7 @@ public class BlobStorePersistencePerformanceTest extends AbstractPerformanceTest
                      .iterations(numIterations)
                      .minAcceptablePerSecond(minRatePerSec)
                      .job(new Runnable() {
-                         public void run() {
+                         @Override public void run() {
                              StoreObjectAccessor blobstoreAccessor = blobstoreAccessors.get(i.getAndIncrement());
                              blobstoreAccessor.delete();
                          }}));

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationReleasePortForwardingDefaultTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationReleasePortForwardingDefaultTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationReleasePortForwardingDefaultTest.java
index d11a903..8446ee4 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationReleasePortForwardingDefaultTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationReleasePortForwardingDefaultTest.java
@@ -103,6 +103,7 @@ public class JcloudsLocationReleasePortForwardingDefaultTest extends BrooklynApp
         execRelease(loc, pseudoMachine);
         
         Asserts.succeedsEventually(new Runnable() {
+            @Override
             public void run() {
                 portForwarder.assertClosedEquals(ImmutableSet.of(HostAndPort.fromParts("1.1.1.1", 2000)));
             }});
@@ -124,6 +125,7 @@ public class JcloudsLocationReleasePortForwardingDefaultTest extends BrooklynApp
         execRelease(loc, pseudoMachine);
         
         Asserts.succeedsEventually(new Runnable() {
+            @Override
             public void run() {
                 portForwarder.assertClosedEquals(publicEndpoints);
             }});

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationTest.java
index 119c19b..9c87eaf 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsLocationTest.java
@@ -395,6 +395,7 @@ public class JcloudsLocationTest implements JcloudsLocationConfig {
                 managementContext, ImmutableMap.<ConfigKey<?>, Object>of(
                         LocationConfigKeys.CLOUD_MACHINE_NAMER_CLASS, machineNamerClass));
         jcloudsLocation.tryObtainAndCheck(ImmutableMap.of(CustomMachineNamer.MACHINE_NAME_TEMPLATE, "ignored"), new Predicate<ConfigBag>() {
+            @Override
             public boolean apply(ConfigBag input) {
                 Assert.assertEquals(input.get(LocationConfigKeys.CLOUD_MACHINE_NAMER_CLASS), machineNamerClass);
                 return true;
@@ -410,6 +411,7 @@ public class JcloudsLocationTest implements JcloudsLocationConfig {
                 CustomMachineNamer.MACHINE_NAME_TEMPLATE, "ignored",
                 LocationConfigKeys.CLOUD_MACHINE_NAMER_CLASS, machineNamerClass);
         jcloudsLocation.tryObtainAndCheck(flags, new Predicate<ConfigBag>() {
+            @Override
             public boolean apply(ConfigBag input) {
                 Assert.assertEquals(input.get(LocationConfigKeys.CLOUD_MACHINE_NAMER_CLASS), machineNamerClass);
                 return true;

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsRateLimitedRetryLiveTest.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsRateLimitedRetryLiveTest.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsRateLimitedRetryLiveTest.java
index d1d2372..6a7a008 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsRateLimitedRetryLiveTest.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/JcloudsRateLimitedRetryLiveTest.java
@@ -111,6 +111,7 @@ public class JcloudsRateLimitedRetryLiveTest extends AbstractJcloudsLiveTest {
         for (int i = 0; i < num; i++) {
             final int startingPort = 1024 + i;
             final Runnable task = new Runnable() {
+                @Override
                 public void run() {
                     doOnce(startingPort);
                 }
@@ -190,6 +191,7 @@ public class JcloudsRateLimitedRetryLiveTest extends AbstractJcloudsLiveTest {
         for (int c = 0; c < n; c++) {
             final String id = "sgtest-" + Identifiers.makeRandomLowercaseId(6) + "-" + String.valueOf(c);
             final Runnable task = new Runnable() {
+                @Override
                 public void run() {
                     doOneSecurityEditorOperationCycle(id, editor, machine);
                 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/LiveTestEntity.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/LiveTestEntity.java b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/LiveTestEntity.java
index 68c631f..fb50d6a 100644
--- a/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/LiveTestEntity.java
+++ b/locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/LiveTestEntity.java
@@ -77,10 +77,12 @@ public interface LiveTestEntity extends TestEntity {
             sensors().set(SERVICE_STATE, Lifecycle.STOPPED);
         }
 
+        @Override
         public MachineProvisioningLocation<?> getProvisioningLocation() {
             return provisioningLocation;
         }
 
+        @Override
         public JcloudsSshMachineLocation getObtainedLocation() {
             return obtainedLocation;
         }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/policy/src/main/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicy.java
----------------------------------------------------------------------
diff --git a/policy/src/main/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicy.java b/policy/src/main/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicy.java
index 87c67e9..2dcffea 100644
--- a/policy/src/main/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicy.java
+++ b/policy/src/main/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicy.java
@@ -360,6 +360,7 @@ public class AutoScalerPolicy extends AbstractPolicy {
     public static final ConfigKey<ResizeOperator> RESIZE_OPERATOR = BasicConfigKey.builder(ResizeOperator.class)
             .name("autoscaler.resizeOperator")
             .defaultValue(new ResizeOperator() {
+                    @Override
                     public Integer resize(Entity entity, Integer desiredSize) {
                         return ((Resizable)entity).resize(desiredSize);
                     }})
@@ -370,6 +371,7 @@ public class AutoScalerPolicy extends AbstractPolicy {
     public static final ConfigKey<Function<Entity,Integer>> CURRENT_SIZE_OPERATOR = BasicConfigKey.builder(new TypeToken<Function<Entity,Integer>>() {})
             .name("autoscaler.currentSizeOperator")
             .defaultValue(new Function<Entity,Integer>() {
+                    @Override
                     public Integer apply(Entity entity) {
                         return ((Resizable)entity).getCurrentSize();
                     }})
@@ -426,6 +428,7 @@ public class AutoScalerPolicy extends AbstractPolicy {
     private long maxReachedLastNotifiedTime;
     
     private final SensorEventListener<Map> utilizationEventHandler = new SensorEventListener<Map>() {
+        @Override
         public void onEvent(SensorEvent<Map> event) {
             Map<String, ?> properties = (Map<String, ?>) event.getValue();
             Sensor<?> sensor = event.getSensor();
@@ -443,6 +446,7 @@ public class AutoScalerPolicy extends AbstractPolicy {
     };
 
     private final SensorEventListener<Number> metricEventHandler = new SensorEventListener<Number>() {
+        @Override
         public void onEvent(SensorEvent<Number> event) {
             assert event.getSensor().equals(getMetric());
             onMetricChanged(event.getValue());

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/policy/src/main/java/org/apache/brooklyn/policy/followthesun/DefaultFollowTheSunModel.java
----------------------------------------------------------------------
diff --git a/policy/src/main/java/org/apache/brooklyn/policy/followthesun/DefaultFollowTheSunModel.java b/policy/src/main/java/org/apache/brooklyn/policy/followthesun/DefaultFollowTheSunModel.java
index 3a70fe4..8231385 100644
--- a/policy/src/main/java/org/apache/brooklyn/policy/followthesun/DefaultFollowTheSunModel.java
+++ b/policy/src/main/java/org/apache/brooklyn/policy/followthesun/DefaultFollowTheSunModel.java
@@ -170,6 +170,7 @@ public class DefaultFollowTheSunModel<ContainerType, ItemType> implements Follow
         containerToLocation.remove(container);
     }
     
+    @Override
     public void onContainerLocationUpdated(ContainerType container, Location location) {
         if (!containers.contains(container)) {
             // unknown container; probably just stopped? 

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/policy/src/main/java/org/apache/brooklyn/policy/followthesun/FollowTheSunPolicy.java
----------------------------------------------------------------------
diff --git a/policy/src/main/java/org/apache/brooklyn/policy/followthesun/FollowTheSunPolicy.java b/policy/src/main/java/org/apache/brooklyn/policy/followthesun/FollowTheSunPolicy.java
index 3062c17..6d062c0 100644
--- a/policy/src/main/java/org/apache/brooklyn/policy/followthesun/FollowTheSunPolicy.java
+++ b/policy/src/main/java/org/apache/brooklyn/policy/followthesun/FollowTheSunPolicy.java
@@ -81,6 +81,7 @@ public class FollowTheSunPolicy extends AbstractPolicy {
     private boolean loggedConstraintsIgnored = false;
     
     private final Function<Entity, Location> defaultLocationFinder = new Function<Entity, Location>() {
+        @Override
         public Location apply(Entity e) {
             Collection<Location> locs = e.getLocations();
             if (locs.isEmpty()) return null;
@@ -190,6 +191,7 @@ public class FollowTheSunPolicy extends AbstractPolicy {
             long delay = Math.max(0, (executorTime + minPeriodBetweenExecs) - now);
             
             executor.schedule(new Runnable() {
+                @Override
                 public void run() {
                     try {
                         executorTime = System.currentTimeMillis();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/policy/src/main/java/org/apache/brooklyn/policy/followthesun/WeightedObject.java
----------------------------------------------------------------------
diff --git a/policy/src/main/java/org/apache/brooklyn/policy/followthesun/WeightedObject.java b/policy/src/main/java/org/apache/brooklyn/policy/followthesun/WeightedObject.java
index e1caf1f..dd2e14e 100644
--- a/policy/src/main/java/org/apache/brooklyn/policy/followthesun/WeightedObject.java
+++ b/policy/src/main/java/org/apache/brooklyn/policy/followthesun/WeightedObject.java
@@ -40,6 +40,7 @@ public class WeightedObject<T> implements Comparable<WeightedObject<T>>{
      * Note that equals and compareTo are not consistent: x.compareTo(y)==0 iff x.equals(y) is 
      * highly recommended in Java, but is not required. This can make TreeSet etc behave poorly...
      */
+    @Override
     public int compareTo(WeightedObject<T> o) {
         double diff = o.getWeight() - weight;
         if (diff>0.0000000000000001) return -1;

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/policy/src/main/java/org/apache/brooklyn/policy/loadbalancing/LoadBalancingPolicy.java
----------------------------------------------------------------------
diff --git a/policy/src/main/java/org/apache/brooklyn/policy/loadbalancing/LoadBalancingPolicy.java b/policy/src/main/java/org/apache/brooklyn/policy/loadbalancing/LoadBalancingPolicy.java
index f0e94ba..dc1ad79 100644
--- a/policy/src/main/java/org/apache/brooklyn/policy/loadbalancing/LoadBalancingPolicy.java
+++ b/policy/src/main/java/org/apache/brooklyn/policy/loadbalancing/LoadBalancingPolicy.java
@@ -96,6 +96,7 @@ public class LoadBalancingPolicy<NodeType extends Entity, ItemType extends Movab
     private TemperatureStates lastEmittedPoolTemperature = null; // "cold" or "hot"
     
     private final SensorEventListener<Object> eventHandler = new SensorEventListener<Object>() {
+        @Override
         @SuppressWarnings({ "rawtypes", "unchecked" })
         public void onEvent(SensorEvent<Object> event) {
             if (LOG.isTraceEnabled()) LOG.trace("{} received event {}", LoadBalancingPolicy.this, event);
@@ -198,6 +199,7 @@ public class LoadBalancingPolicy<NodeType extends Entity, ItemType extends Movab
             long delay = Math.max(0, (executorTime + minPeriodBetweenExecs) - now);
             
             executor.schedule(new Runnable() {
+                @Override
                 public void run() {
                     runWithRetries(3);
                 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/policy/src/test/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicyMetricTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicyMetricTest.java b/policy/src/test/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicyMetricTest.java
index ad67b75..a5f1601 100644
--- a/policy/src/test/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicyMetricTest.java
+++ b/policy/src/test/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicyMetricTest.java
@@ -176,6 +176,7 @@ public class AutoScalerPolicyMetricTest {
         
         // Assert our listener gets notified (once)
         Asserts.succeedsEventually(new Runnable() {
+            @Override
             public void run() {
                 assertEquals(maxReachedEvents.size(), 1);
                 assertEquals(maxReachedEvents.get(0).getMaxAllowed(), 6);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/policy/src/test/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicyTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicyTest.java b/policy/src/test/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicyTest.java
index c324dbe..bdeaf17 100644
--- a/policy/src/test/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicyTest.java
+++ b/policy/src/test/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicyTest.java
@@ -330,6 +330,7 @@ public class AutoScalerPolicyTest {
         resizable.sensors().emit(AutoScalerPolicy.DEFAULT_POOL_HOT_SENSOR, message(1, 21L, 1*10L, 1*20L)); // grow to 2
         
         Asserts.succeedsEventually(MutableMap.of("timeout",TIMEOUT_MS), new Runnable() {
+                @Override
                 public void run() {
                     assertTrue(counter.get() >= 1, "cccounter="+counter);
                 }});
@@ -432,6 +433,7 @@ public class AutoScalerPolicyTest {
         // TODO This is time sensitive, and sometimes fails in CI with size=4 if we wait for currentSize==2 (presumably GC kicking in?)
         //      Therefore do strong assertion of currentSize==2 later, so can write out times if it goes wrong.
         Asserts.succeedsEventually(MutableMap.of("period", 1, "timeout", TIMEOUT_MS), new Runnable() {
+            @Override
             public void run() {
                 assertTrue(resizable.getCurrentSize() >= 2, "currentSize="+resizable.getCurrentSize());
             }});
@@ -472,6 +474,7 @@ public class AutoScalerPolicyTest {
         final AtomicInteger emitCount = new AtomicInteger(0);
         
         Asserts.succeedsEventually(MutableMap.of("timeout", TIMEOUT_MS), new Runnable() {
+            @Override
             public void run() {
                 if (System.currentTimeMillis() - emitTime > (2+emitCount.get())*resizeUpStabilizationDelay) {
                     //first one may not have been received, in a registration race 
@@ -505,6 +508,7 @@ public class AutoScalerPolicyTest {
         
         assertEquals(resizable.getCurrentSize(), (Integer)2);
         Asserts.succeedsContinually(MutableMap.of("duration", 2000L), new Runnable() {
+                @Override
                 public void run() {
                     assertEquals(resizable.sizes, ImmutableList.of(2));
                 }});
@@ -551,6 +555,7 @@ public class AutoScalerPolicyTest {
         // TODO This is time sensitive, and sometimes fails in CI with size=1 if we wait for currentSize==2 (presumably GC kicking in?)
         //      Therefore do strong assertion of currentSize==2 later, so can write out times if it goes wrong.
         Asserts.succeedsEventually(MutableMap.of("period", 1, "timeout", TIMEOUT_MS), new Runnable() {
+                @Override
                 public void run() {
                     assertTrue(resizable.getCurrentSize() <= 2, "currentSize="+resizable.getCurrentSize());
                 }});
@@ -592,6 +597,7 @@ public class AutoScalerPolicyTest {
         final AtomicInteger emitCount = new AtomicInteger(0);
         
         Asserts.succeedsEventually(MutableMap.of("timeout", TIMEOUT_MS), new Runnable() {
+                @Override
                 public void run() {
                     if (System.currentTimeMillis() - emitTime > (2+emitCount.get())*resizeDownStabilizationDelay) {
                         //first one may not have been received, in a registration race
@@ -618,6 +624,7 @@ public class AutoScalerPolicyTest {
     
     public static Runnable currentSizeAsserter(final Resizable resizable, final Integer desired) {
         return new Runnable() {
+            @Override
             public void run() {
                 assertEquals(resizable.getCurrentSize(), desired);
             }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/policy/src/test/java/org/apache/brooklyn/policy/enricher/RebindEnricherTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/org/apache/brooklyn/policy/enricher/RebindEnricherTest.java b/policy/src/test/java/org/apache/brooklyn/policy/enricher/RebindEnricherTest.java
index 4722439..f717dad 100644
--- a/policy/src/test/java/org/apache/brooklyn/policy/enricher/RebindEnricherTest.java
+++ b/policy/src/test/java/org/apache/brooklyn/policy/enricher/RebindEnricherTest.java
@@ -123,6 +123,7 @@ public class RebindEnricherTest extends RebindTestFixtureWithApp {
         // my hypothesis is that the two events had exactly the same timestamp.
         Asserts.succeedsEventually(new Runnable() {
             private int counter;
+            @Override
             public void run() {
                 newApp.sensors().set(INT_METRIC, counter++);
                 assertNotNull(newApp.getAttribute(DOUBLE_METRIC));
@@ -139,6 +140,7 @@ public class RebindEnricherTest extends RebindTestFixtureWithApp {
         // my hypothesis is that the two events had exactly the same timestamp.
         Asserts.succeedsEventually(new Runnable() {
             private int counter;
+            @Override
             public void run() {
                 newApp.sensors().set(INT_METRIC, counter++);
                 assertNotNull(newApp.getAttribute(DOUBLE_METRIC));

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/policy/src/test/java/org/apache/brooklyn/policy/followthesun/AbstractFollowTheSunPolicyTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/org/apache/brooklyn/policy/followthesun/AbstractFollowTheSunPolicyTest.java b/policy/src/test/java/org/apache/brooklyn/policy/followthesun/AbstractFollowTheSunPolicyTest.java
index bd1ef6f..85b8e59 100644
--- a/policy/src/test/java/org/apache/brooklyn/policy/followthesun/AbstractFollowTheSunPolicyTest.java
+++ b/policy/src/test/java/org/apache/brooklyn/policy/followthesun/AbstractFollowTheSunPolicyTest.java
@@ -121,6 +121,7 @@ public class AbstractFollowTheSunPolicyTest {
     protected void assertItemDistributionEventually(final Map<MockContainerEntity, ? extends Collection<MockItemEntity>> expected) {
         try {
             Asserts.succeedsEventually(MutableMap.of("timeout", TIMEOUT_MS), new Runnable() {
+                @Override
                 public void run() {
                     assertItemDistribution(expected);
                 }});
@@ -133,6 +134,7 @@ public class AbstractFollowTheSunPolicyTest {
     protected void assertItemDistributionContinually(final Map<MockContainerEntity, Collection<MockItemEntity>> expected) {
         try {
             Asserts.succeedsContinually(MutableMap.of("timeout", SHORT_WAIT_MS), new Runnable() {
+                @Override
                 public void run() {
                     assertItemDistribution(expected);
                 }});

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/policy/src/test/java/org/apache/brooklyn/policy/followthesun/FollowTheSunPolicySoakTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/org/apache/brooklyn/policy/followthesun/FollowTheSunPolicySoakTest.java b/policy/src/test/java/org/apache/brooklyn/policy/followthesun/FollowTheSunPolicySoakTest.java
index 9649193..eb43c2f 100644
--- a/policy/src/test/java/org/apache/brooklyn/policy/followthesun/FollowTheSunPolicySoakTest.java
+++ b/policy/src/test/java/org/apache/brooklyn/policy/followthesun/FollowTheSunPolicySoakTest.java
@@ -232,8 +232,10 @@ public class FollowTheSunPolicySoakTest extends AbstractFollowTheSunPolicyTest {
 
             // Assert that the items all end up in the location with maximum load-generation
             Asserts.succeedsEventually(MutableMap.of("timeout", timeout_ms), new Runnable() {
+                @Override
                 public void run() {
                     Iterable<Location> itemLocs = Iterables.transform(movableItems, new Function<MockItemEntity, Location>() {
+                        @Override
                         public Location apply(MockItemEntity input) {
                             BalanceableContainer<?> container = input.getAttribute(Movable.CONTAINER);
                             Collection<Location> locs = (container != null) ? container.getLocations(): null;
@@ -241,6 +243,7 @@ public class FollowTheSunPolicySoakTest extends AbstractFollowTheSunPolicyTest {
                         }});
                     
                     Iterable<String> itemLocNames = Iterables.transform(itemLocs, new Function<Location, String>() {
+                        @Override
                         public String apply(Location input) {
                             return (input != null) ? input.getDisplayName() : null;
                         }});

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/policy/src/test/java/org/apache/brooklyn/policy/loadbalancing/AbstractLoadBalancingPolicyTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/org/apache/brooklyn/policy/loadbalancing/AbstractLoadBalancingPolicyTest.java b/policy/src/test/java/org/apache/brooklyn/policy/loadbalancing/AbstractLoadBalancingPolicyTest.java
index f97cbf7..8b2c387 100644
--- a/policy/src/test/java/org/apache/brooklyn/policy/loadbalancing/AbstractLoadBalancingPolicyTest.java
+++ b/policy/src/test/java/org/apache/brooklyn/policy/loadbalancing/AbstractLoadBalancingPolicyTest.java
@@ -111,6 +111,7 @@ public class AbstractLoadBalancingPolicyTest {
     // Using this utility, as it gives more info about the workrates of all containers rather than just the one that differs    
     protected void assertWorkrates(Collection<MockContainerEntity> containers, Collection<Double> expectedC, double precision) {
         Iterable<Double> actual = Iterables.transform(containers, new Function<MockContainerEntity, Double>() {
+            @Override
             public Double apply(MockContainerEntity input) {
                 return getContainerWorkrate(input);
             }});
@@ -134,6 +135,7 @@ public class AbstractLoadBalancingPolicyTest {
     protected void assertWorkratesEventually(final Collection<MockContainerEntity> containers, final Iterable<? extends Movable> items, final Collection<Double> expected, final double precision) {
         try {
             Asserts.succeedsEventually(MutableMap.of("timeout", TIMEOUT_MS), new Runnable() {
+                @Override
                 public void run() {
                     assertWorkrates(containers, expected, precision);
                 }});
@@ -156,6 +158,7 @@ public class AbstractLoadBalancingPolicyTest {
     protected void assertWorkratesContinually(final List<MockContainerEntity> containers, Iterable<? extends Movable> items, final List<Double> expected, final double precision) {
         try {
             Asserts.succeedsContinually(MutableMap.of("timeout", SHORT_WAIT_MS), new Runnable() {
+                @Override
                 public void run() {
                     assertWorkrates(containers, expected, precision);
                 }});

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e61caea4/policy/src/test/java/org/apache/brooklyn/policy/loadbalancing/ItemsInContainersGroupTest.java
----------------------------------------------------------------------
diff --git a/policy/src/test/java/org/apache/brooklyn/policy/loadbalancing/ItemsInContainersGroupTest.java b/policy/src/test/java/org/apache/brooklyn/policy/loadbalancing/ItemsInContainersGroupTest.java
index 0be5fb7..973a1a3 100644
--- a/policy/src/test/java/org/apache/brooklyn/policy/loadbalancing/ItemsInContainersGroupTest.java
+++ b/policy/src/test/java/org/apache/brooklyn/policy/loadbalancing/ItemsInContainersGroupTest.java
@@ -56,6 +56,7 @@ public class ItemsInContainersGroupTest {
         containerGroup = app.createAndManageChild(EntitySpec.create(DynamicGroup.class)
                 .displayName("containerGroup")
                 .configure(DynamicGroup.ENTITY_FILTER, new Predicate<Entity>() {
+                    @Override
                     public boolean apply(Entity input) {
                         return input instanceof MockContainerEntity && 
                                 input.getConfig(MockContainerEntity.MOCK_MEMBERSHIP) == "ingroup";
@@ -89,6 +90,7 @@ public class ItemsInContainersGroupTest {
         itemGroup = app.createAndManageChild(EntitySpec.create(ItemsInContainersGroup.class)
                 .displayName("itemGroupWithDispName2")
                 .configure(ItemsInContainersGroup.ITEM_FILTER, new Predicate<Entity>() {
+                    @Override
                     public boolean apply(Entity input) {
                         return "2".equals(input.getDisplayName());
                     }}));
@@ -166,6 +168,7 @@ public class ItemsInContainersGroupTest {
 
     private void assertItemsEventually(final MockItemEntity... expected) {
         Asserts.succeedsEventually(MutableMap.of("timeout", TIMEOUT_MS), new Runnable() {
+            @Override
             public void run() {
                 assertEquals(ImmutableSet.copyOf(itemGroup.getMembers()), ImmutableSet.copyOf(expected));
             }});


Mime
View raw message