Skip to content

Commit

Permalink
GEODE-4391: Add @Override where missing. (apache#3069)
Browse files Browse the repository at this point in the history
* GEODE-4391: Add `@Override` where missing.

* Restart Concourse, I think that was flaky.
  • Loading branch information
galen-pivotal authored and kirklund committed Jan 11, 2019
1 parent 1909935 commit 9d737c9
Show file tree
Hide file tree
Showing 1,582 changed files with 11,827 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,12 @@ public DockerizedExecHandle(DockerizedTestExtension testExtension, String displa
broadcast.addAll(listeners);
}

@Override
public File getDirectory() {
return directory;
}

@Override
public String getCommand() {
return command;
}
Expand All @@ -187,14 +189,17 @@ public String toString() {
return displayName;
}

@Override
public List<String> getArguments() {
return Collections.unmodifiableList(arguments);
}

@Override
public Map<String, String> getEnvironment() {
return Collections.unmodifiableMap(environment);
}

@Override
public ExecHandleState getState() {
lock.lock();
try {
Expand Down Expand Up @@ -271,6 +276,7 @@ private String failureMessageFor(ExecHandleState currentState) {
: format("A problem occurred waiting for process '%s' to complete.", displayName);
}

@Override
public ExecHandle start() {
LOGGER.info("Starting process '{}'. Working directory: {} Command: {}",
displayName, directory, command + ' ' + Joiner.on(' ').useForNull("null").join(arguments));
Expand Down Expand Up @@ -312,6 +318,7 @@ public ExecHandle start() {
return this;
}

@Override
public void abort() {
lock.lock();
try {
Expand All @@ -330,6 +337,7 @@ public void abort() {
}
}

@Override
public ExecResult waitForFinish() {
lock.lock();
try {
Expand Down Expand Up @@ -393,10 +401,12 @@ void failed(Throwable failureCause) {
setEndStateInfo(ExecHandleState.FAILED, -1, failureCause);
}

@Override
public void addListener(ExecHandleListener listener) {
broadcast.add(listener);
}

@Override
public void removeListener(ExecHandleListener listener) {
broadcast.remove(listener);
}
Expand All @@ -405,6 +415,7 @@ public String getDisplayName() {
return displayName;
}

@Override
public boolean getRedirectErrorStream() {
return redirectErrorStream;
}
Expand Down Expand Up @@ -502,10 +513,12 @@ private static class ExecResultImpl implements ExecResult {
this.displayName = displayName;
}

@Override
public int getExitValue() {
return exitValue;
}

@Override
public ExecResult assertNormalExitValue() throws ExecException {
// all exit values are ok
// if (exitValue != 0) {
Expand All @@ -514,6 +527,7 @@ public ExecResult assertNormalExitValue() throws ExecException {
return this;
}

@Override
public ExecResult rethrowFailure() throws ExecException {
if (failure != null) {
throw failure;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public void abortProcess() {
}
}

@Override
public void run() {
try {
process = execHandle.runContainer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,15 @@ public void execute(final JvmTestExecutionSpec testExecutionSpec,
final WorkerTestClassProcessorFactory testInstanceFactory = testFramework.getProcessorFactory();
final Set<File> classpath = ImmutableSet.copyOf(testExecutionSpec.getClasspath());
final Factory<TestClassProcessor> forkingProcessorFactory = new Factory<TestClassProcessor>() {
@Override
public TestClassProcessor create() {
return new ForkingTestClassProcessor(workerFactory, testInstanceFactory,
testExecutionSpec.getJavaForkOptions(),
classpath, testFramework.getWorkerConfigurationAction(), moduleRegistry);
}
};
Factory<TestClassProcessor> reforkingProcessorFactory = new Factory<TestClassProcessor>() {
@Override
public TestClassProcessor create() {
return new RestartEveryNTestClassProcessor(forkingProcessorFactory,
testExecutionSpec.getForkEvery());
Expand Down Expand Up @@ -108,6 +110,7 @@ public TestClassProcessor create() {
.run();
}

@Override
public void stopNow() {
if (processor != null) {
processor.stopNow();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,14 @@ public void execute(final JvmTestExecutionSpec testExecutionSpec, TestResultProc
final WorkerLeaseRegistry.WorkerLease currentWorkerLease = workerLeaseRegistry.getCurrentWorkerLease();
final Set<File> classpath = ImmutableSet.copyOf(testExecutionSpec.getClasspath());
final Factory<TestClassProcessor> forkingProcessorFactory = new Factory<TestClassProcessor>() {
@Override
public TestClassProcessor create() {
return new ForkingTestClassProcessor(currentWorkerLease, workerFactory, testInstanceFactory, testExecutionSpec.getJavaForkOptions(),
classpath, testFramework.getWorkerConfigurationAction(), moduleRegistry, documentationRegistry);
}
};
final Factory<TestClassProcessor> reforkingProcessorFactory = new Factory<TestClassProcessor>() {
@Override
public TestClassProcessor create() {
return new RestartEveryNTestClassProcessor(forkingProcessorFactory, testExecutionSpec.getForkEvery());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,12 @@ public void destroySession(String id) {
sessions.remove(id);
}

@Override
public String getSessionCookieName() {
return "JSESSIONID";
}

@Override
public String getJvmId() {
return "jvm-id";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,12 @@ public ClassLoader getReferenceClassLoader() {
return referenceClassLoader;
}

@Override
public String getSessionCookieName() {
return sessionCookieName;
}

@Override
public String getJvmId() {
return jvmId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@
*/
public class MyServletTester extends ServletTester {

@Override
public boolean isStarted() {
// return _server.isStarted();
return false;
}

@Override
public boolean isStopped() {
// return _server.isStopped();
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,19 @@
public class ServletRequestAttributeListenerImpl extends AbstractListener
implements ServletRequestAttributeListener {

@Override
public synchronized void attributeAdded(ServletRequestAttributeEvent srae) {
events.add(ListenerEventType.SERVLET_REQUEST_ATTRIBUTE_ADDED);
latch.countDown();
}

@Override
public synchronized void attributeRemoved(ServletRequestAttributeEvent srae) {
events.add(ListenerEventType.SERVLET_REQUEST_ATTRIBUTE_REMOVED);
latch.countDown();
}

@Override
public synchronized void attributeReplaced(ServletRequestAttributeEvent srae) {
events.add(ListenerEventType.SERVLET_REQUEST_ATTRIBUTE_REPLACED);
latch.countDown();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@

public class ServletRequestListenerImpl extends AbstractListener implements ServletRequestListener {

@Override
public synchronized void requestDestroyed(ServletRequestEvent sre) {
events.add(ListenerEventType.SERVLET_REQUEST_DESTROYED);
latch.countDown();
}

@Override
public synchronized void requestInitialized(ServletRequestEvent sre) {
events.add(ListenerEventType.SERVLET_REQUEST_INITIALIZED);
latch.countDown();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
@Category({SessionTest.class})
public class SessionReplicationJUnitTest extends CommonTests {

@Override
@Before
public void setUp() throws Exception {
super.setUp();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
@Category({SessionTest.class})
public class SessionReplicationLocalCacheJUnitTest extends CommonTests {

@Override
@Before
public void setUp() throws Exception {
super.setUp();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ public class SessionListener implements HttpSessionListener {

private static final Logger LOG = LoggerFactory.getLogger(SessionListener.class.getName());

@Override
public void sessionCreated(HttpSessionEvent httpSessionEvent) {}

/**
* This will receive events from the container using the native sessions.
*/
@Override
public void sessionDestroyed(HttpSessionEvent event) {
// No op
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class URLArgumentHandler implements ArgumentHandler {
* @param parameters parameters supplied
* @throws UsageException when file not found or not a workable URL
*/
@Override
public void handleArgument(final Argument arg, final String form, final String[] parameters)
throws UsageException {
final File file = new File(parameters[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ public void removeLifecycleListener(LifecycleListener listener) {
this.lifecycle.removeLifecycleListener(listener);
}

@Override
protected StandardSession getNewSession() {
return new DeltaSession7(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ public Region getRegion(Cache cache) {
return cache.getRegion(this.regionName);
}

@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
this.regionName = DataSerializer.readString(in);
this.key = DataSerializer.readString(in);
}

@Override
public void toData(DataOutput out) throws IOException {
DataSerializer.writeString(this.regionName, out);
DataSerializer.writeString(this.key, out);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public byte[] getGatewayDelta() {
return this.gatewayDelta;
}

@Override
public void apply(Cache cache) {
Region<String, CachedDeserializable> region = getRegion(cache);
region.put(this.key,
Expand All @@ -53,11 +54,13 @@ public void apply(Cache cache) {
}
}

@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
super.fromData(in);
this.gatewayDelta = DataSerializer.readByteArray(in);
}

@Override
public void toData(DataOutput out) throws IOException {
super.toData(out);
DataSerializer.writeByteArray(this.gatewayDelta, out);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public GatewayDeltaDestroyEvent(String regionName, String key) {
super(regionName, key);
}

@Override
public void apply(Cache cache) {
Region<String, DeltaSessionInterface> region = getRegion(cache);
try {
Expand All @@ -48,10 +49,12 @@ public void apply(Cache cache) {
}
}

@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
super.fromData(in);
}

@Override
public void toData(DataOutput out) throws IOException {
super.toData(out);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public GatewayDeltaEventApplicationCacheListener() {
this.cache = CacheFactory.getAnyInstance();
}

@Override
public void afterCreate(EntryEvent<String, GatewayDeltaEvent> event) {
System.out.println("GatewayDeltaApplierCacheListener event: " + event);
EntryEventImpl eventImpl = (EntryEventImpl) event;
Expand All @@ -58,5 +59,6 @@ public void afterCreate(EntryEvent<String, GatewayDeltaEvent> event) {
}
}

@Override
public void init(Properties p) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public GatewayDeltaForwarderCacheListener(Cache cache) {
this.cache = cache;
}

@Override
@SuppressWarnings("unchecked")
public void afterCreate(EntryEvent<String, GatewayDelta> event) {
// If the event is from the local site, create a 'create' event and send it to the
Expand Down Expand Up @@ -81,6 +82,7 @@ public void afterCreate(EntryEvent<String, GatewayDelta> event) {
}
}

@Override
public void afterUpdate(EntryEvent<String, GatewayDelta> event) {
// If the event is from the local site, create an 'update' event and send it to the
// gateway delta region
Expand Down Expand Up @@ -110,6 +112,7 @@ public void afterUpdate(EntryEvent<String, GatewayDelta> event) {
}
}

@Override
public void afterDestroy(EntryEvent<String, GatewayDelta> event) {
// If the event is from the local site, create a 'destroy' event and send it to the
// gateway delta region
Expand Down Expand Up @@ -137,6 +140,7 @@ public void afterDestroy(EntryEvent<String, GatewayDelta> event) {
}
}

@Override
public void init(Properties p) {}

private LocalRegion getGatewayDeltaRegion() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ protected SessionManager getSessionManager() {
return this.sessionManager;
}

@Override
public Region<String, HttpSession> getSessionRegion() {
return this.sessionRegion;
}

@Override
public Region<String, HttpSession> getOperatingRegion() {
return this.operatingRegion;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ public boolean isBackingCacheAvailable() {
return true;
}

@Override
public GemFireCache getCache() {
return this.cache;
}
Expand Down
Loading

0 comments on commit 9d737c9

Please sign in to comment.