Add Override annotations where appropriate

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2019-04-28 11:37:52 +10:00
parent d66310a2f1
commit 82854b7bd7
176 changed files with 503 additions and 0 deletions

View File

@ -44,6 +44,7 @@ public class LazyMetadataValueTest {
@Test(expected=MetadataEvaluationException.class)
public void testEvalException() {
subject = new LazyMetadataValue(plugin, LazyMetadataValue.CacheStrategy.CACHE_AFTER_FIRST_EVAL, new Callable<Object>() {
@Override
public Object call() throws Exception {
throw new RuntimeException("Gotcha!");
}
@ -56,6 +57,7 @@ public class LazyMetadataValueTest {
final Counter counter = new Counter();
final int value = 10;
subject = new LazyMetadataValue(plugin, LazyMetadataValue.CacheStrategy.CACHE_AFTER_FIRST_EVAL, new Callable<Object>() {
@Override
public Object call() throws Exception {
counter.increment();
return value;
@ -77,6 +79,7 @@ public class LazyMetadataValueTest {
final Counter counter = new Counter();
final int value = 10;
subject = new LazyMetadataValue(plugin, LazyMetadataValue.CacheStrategy.NEVER_CACHE, new Callable<Object>() {
@Override
public Object call() throws Exception {
counter.increment();
return value;
@ -94,6 +97,7 @@ public class LazyMetadataValueTest {
final Counter counter = new Counter();
final int value = 10;
subject = new LazyMetadataValue(plugin, LazyMetadataValue.CacheStrategy.CACHE_ETERNALLY, new Callable<Object>() {
@Override
public Object call() throws Exception {
counter.increment();
return value;
@ -113,6 +117,7 @@ public class LazyMetadataValueTest {
private LazyMetadataValue makeSimpleCallable(final Object value) {
return new LazyMetadataValue(plugin, new Callable<Object>() {
@Override
public Object call() throws Exception {
return value;
}