You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2015/08/04 16:57:48 UTC
[12/13] olingo-odata4 git commit: [OLINGO-659] Remove JavaDoc Warnings
[OLINGO-659] Remove JavaDoc Warnings
Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/10fb60ff
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/10fb60ff
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/10fb60ff
Branch: refs/heads/master
Commit: 10fb60ff900bd81d6ebaabde4f73c5dd746973d9
Parents: 9558233
Author: Christian Amend <ch...@sap.com>
Authored: Tue Aug 4 16:49:03 2015 +0200
Committer: Christian Amend <ch...@sap.com>
Committed: Tue Aug 4 16:49:03 2015 +0200
----------------------------------------------------------------------
.../olingo/ext/proxy/api/ComplexCollection.java | 2 +-
.../olingo/ext/proxy/api/ComplexType.java | 2 +-
.../olingo/ext/proxy/api/EntityCollection.java | 2 +-
.../apache/olingo/ext/proxy/api/EntityType.java | 2 +-
.../ext/proxy/api/StructuredCollection.java | 2 +-
.../proxy/api/StructuredComposableInvoker.java | 2 +-
.../olingo/ext/proxy/api/StructuredInvoker.java | 2 +-
.../EntityContainerInvocationHandler.java | 2 +-
.../TransactionalPersistenceManagerImpl.java | 6 +--
.../fit/tecsvc/client/AsyncSupportITCase.java | 2 +-
.../request/AsyncRequestWrapperImpl.java | 2 +-
.../server/core/ServiceDispatcherTest.java | 8 ++--
.../json/ODataJsonDeserializer.java | 41 ++++++++++++--------
.../server/tecsvc/async/AsyncProcessor.java | 2 +-
.../tecsvc/async/TechnicalAsyncService.java | 16 ++++----
15 files changed, 50 insertions(+), 43 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/10fb60ff/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ComplexCollection.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ComplexCollection.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ComplexCollection.java
index a5ef9a1..e318491 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ComplexCollection.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ComplexCollection.java
@@ -21,7 +21,7 @@ package org.apache.olingo.ext.proxy.api;
import java.util.Collection;
public interface ComplexCollection<
- T extends StructuredType, EC extends Collection<T>, CT extends StructuredCollection<T, EC, ?>>
+ T extends StructuredType<?>, EC extends Collection<T>, CT extends StructuredCollection<T, EC, ?>>
extends StructuredCollection<T, EC, CT> {
//No additional methods needed for now.
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/10fb60ff/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ComplexType.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ComplexType.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ComplexType.java
index a60d0dd..ff38aa3 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ComplexType.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/ComplexType.java
@@ -18,6 +18,6 @@
*/
package org.apache.olingo.ext.proxy.api;
-public interface ComplexType<T extends StructuredType> extends StructuredType<T> {
+public interface ComplexType<T extends StructuredType<?>> extends StructuredType<T> {
//No additional methods needed for now.
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/10fb60ff/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/EntityCollection.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/EntityCollection.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/EntityCollection.java
index 6c74c4c..9ff7fe5 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/EntityCollection.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/EntityCollection.java
@@ -21,7 +21,7 @@ package org.apache.olingo.ext.proxy.api;
import java.util.Collection;
public interface EntityCollection<
- T extends StructuredType, EC extends Collection<T>, CT extends StructuredCollection<T, EC, ?>>
+ T extends StructuredType<?>, EC extends Collection<T>, CT extends StructuredCollection<T, EC, ?>>
extends StructuredCollection<T, EC, CT> {
/**
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/10fb60ff/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/EntityType.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/EntityType.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/EntityType.java
index f0e3c5e..e68eab9 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/EntityType.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/EntityType.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.ext.proxy.api;
-public interface EntityType<T extends StructuredType> extends StructuredType<T> {
+public interface EntityType<T extends StructuredType<?>> extends StructuredType<T> {
/**
* Appends ref segment to the URI.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/10fb60ff/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/StructuredCollection.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/StructuredCollection.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/StructuredCollection.java
index 06322d2..236a388 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/StructuredCollection.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/StructuredCollection.java
@@ -24,7 +24,7 @@ import java.util.Collection;
* Marker interface for Entity and complex type.
*/
public interface StructuredCollection<
- T extends StructuredType, EC extends Collection<T>, CT extends StructuredCollection<T, EC, ?>>
+ T extends StructuredType<?>, EC extends Collection<T>, CT extends StructuredCollection<T, EC, ?>>
extends GenericCollection<T, EC> {
/**
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/10fb60ff/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/StructuredComposableInvoker.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/StructuredComposableInvoker.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/StructuredComposableInvoker.java
index c14c4ce..3c7a3a2 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/StructuredComposableInvoker.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/StructuredComposableInvoker.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.ext.proxy.api;
-public interface StructuredComposableInvoker<T extends StructuredType, O extends Operations>
+public interface StructuredComposableInvoker<T extends StructuredType<?>, O extends Operations>
extends StructuredInvoker<T>, ComposableInvoker<T, O> {
//No additional methods needed for now.
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/10fb60ff/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/StructuredInvoker.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/StructuredInvoker.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/StructuredInvoker.java
index 75423e7..30a7d88 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/StructuredInvoker.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/StructuredInvoker.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.ext.proxy.api;
-public interface StructuredInvoker<T extends StructuredType>
+public interface StructuredInvoker<T extends StructuredType<?>>
extends StructuredQuery<StructuredInvoker<T>>, Invoker<T> {
//No additional methods needed for now.
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/10fb60ff/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityContainerInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityContainerInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityContainerInvocationHandler.java
index f3f1b4d..cb72126 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityContainerInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityContainerInvocationHandler.java
@@ -137,7 +137,7 @@ public final class EntityContainerInvocationHandler extends AbstractInvocationHa
}
@SuppressWarnings("unchecked")
- public <NE extends EntityType> NE newEntityInstance(final Class<NE> ref) {
+ public <NE extends EntityType<?>> NE newEntityInstance(final Class<NE> ref) {
final EntityInvocationHandler handler = EntityInvocationHandler.getInstance(ref, getService());
return (NE) Proxy.newProxyInstance(
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/10fb60ff/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/TransactionalPersistenceManagerImpl.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/TransactionalPersistenceManagerImpl.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/TransactionalPersistenceManagerImpl.java
index 5f42127..e43a4e1 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/TransactionalPersistenceManagerImpl.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/TransactionalPersistenceManagerImpl.java
@@ -64,7 +64,7 @@ public class TransactionalPersistenceManagerImpl extends AbstractPersistenceMana
((ODataRequest) request).setAccept(
service.getClient().getConfiguration().getDefaultBatchAcceptFormat().toContentTypeString());
- final BatchManager batchManager = (BatchManager) ((ODataStreamedRequest) request).payloadManager();
+ final BatchManager batchManager = (BatchManager) ((ODataStreamedRequest<?,?>) request).payloadManager();
final List<ODataRequest> requests = new ArrayList<ODataRequest>(changes.getChanges().size());
final ODataChangeset changeset = batchManager.addChangeset();
@@ -117,10 +117,10 @@ public class TransactionalPersistenceManagerImpl extends AbstractPersistenceMana
if (handler != null) {
if (res instanceof ODataEntityCreateResponse && res.getStatusCode() == 201) {
- handler.setEntity(((ODataEntityCreateResponse) res).getBody());
+ handler.setEntity(((ODataEntityCreateResponse<?>) res).getBody());
LOG.debug("Upgrade created object '{}'", handler);
} else if (res instanceof ODataEntityUpdateResponse && res.getStatusCode() == 200) {
- handler.setEntity(((ODataEntityUpdateResponse) res).getBody());
+ handler.setEntity(((ODataEntityUpdateResponse<?>) res).getBody());
LOG.debug("Upgrade updated object '{}'", handler);
}
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/10fb60ff/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/AsyncSupportITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/AsyncSupportITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/AsyncSupportITCase.java
index b99317d..4736df6 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/AsyncSupportITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/AsyncSupportITCase.java
@@ -315,7 +315,7 @@ public final class AsyncSupportITCase extends AbstractBaseTestITCase {
"' and value '" + value + "' not found in entitySet '" + entitySet + "'");
}
- private void waitTillDone(AsyncResponseWrapper async, int maxWaitInSeconds) throws InterruptedException {
+ private void waitTillDone(AsyncResponseWrapper<?> async, int maxWaitInSeconds) throws InterruptedException {
int waitCounter = maxWaitInSeconds * 1000;
while(!async.isDone() && waitCounter > 0) {
TimeUnit.MILLISECONDS.sleep(SLEEP_TIMEOUT_IN_MS);
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/10fb60ff/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncRequestWrapperImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncRequestWrapperImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncRequestWrapperImpl.java
index 2e93a4e..20a645c 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncRequestWrapperImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncRequestWrapperImpl.java
@@ -96,7 +96,7 @@ public class AsyncRequestWrapperImpl<R extends ODataResponse> extends AbstractRe
if(request instanceof HttpEntityEnclosingRequestBase) {
if(odataRequest instanceof AbstractODataBasicRequest) {
- AbstractODataBasicRequest br = (AbstractODataBasicRequest) odataRequest;
+ AbstractODataBasicRequest<?> br = (AbstractODataBasicRequest<?>) odataRequest;
HttpEntityEnclosingRequestBase httpRequest = ((HttpEntityEnclosingRequestBase) request);
httpRequest.setEntity(new InputStreamEntity(br.getPayload(), -1));
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/10fb60ff/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/ServiceDispatcherTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/ServiceDispatcherTest.java b/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/ServiceDispatcherTest.java
index 62f91fb..0d0c6ad 100644
--- a/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/ServiceDispatcherTest.java
+++ b/lib/server-core-ext/src/test/java/org/apache/olingo/server/core/ServiceDispatcherTest.java
@@ -69,6 +69,7 @@ public class ServiceDispatcherTest {
private Tomcat tomcat = new Tomcat();
public class SampleODataServlet extends HttpServlet {
+ private static final long serialVersionUID = 1L;
private final ServiceHandler handler; // must be stateless
private final CsdlEdmProvider provider; // must be stateless
@@ -158,7 +159,7 @@ public class ServiceDispatcherTest {
request = delete;
}
request.setHeader("Content-Type", "application/json;odata.metadata=minimal");
- HttpResponse response = http.execute(getLocalhost(), request);
+ http.execute(getLocalhost(), request);
validator.validate();
afterTest();
@@ -325,7 +326,7 @@ public class ServiceDispatcherTest {
ArgumentCaptor<HttpMethod> arg2 = ArgumentCaptor.forClass(HttpMethod.class);
Mockito.verify(handler).invoke(arg1.capture(), arg2.capture(), arg3.capture());
- FunctionRequest request = arg1.getValue();
+ arg1.getValue();
}
});
}
@@ -340,7 +341,7 @@ public class ServiceDispatcherTest {
ArgumentCaptor<NoContentResponse> arg2 = ArgumentCaptor.forClass(NoContentResponse.class);
Mockito.verify(handler).invoke(arg1.capture(), Mockito.anyString(), arg2.capture());
- ActionRequest request = arg1.getValue();
+ arg1.getValue();
}
});
}
@@ -403,7 +404,6 @@ public class ServiceDispatcherTest {
final ServiceHandler handler = Mockito.mock(ServiceHandler.class);
helpTest(handler, "trippin/People('russelwhyte')/Friends/$ref", "POST", payload,
new TestResult() {
- @SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public void validate() throws Exception {
ArgumentCaptor<DataRequest> arg1 = ArgumentCaptor.forClass(DataRequest.class);
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/10fb60ff/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.java
index 9c6798d..abcb958 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.java
@@ -220,7 +220,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
// remove here to avoid iterator issues.
tree.remove(toRemove);
assertJsonNodeIsEmpty(tree);
- return DeserializerResultImpl.with().actionParameters(parameters).build();
+ return DeserializerResultImpl.with().actionParameters(parameters).build();
}
return DeserializerResultImpl.with().build();
@@ -243,7 +243,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
return parser.getCodec().readTree(parser);
}
- private Map<String, Parameter> consumeParameters(final EdmAction edmAction, final ObjectNode node)
+ private Map<String, Parameter> consumeParameters(final EdmAction edmAction, final ObjectNode node)
throws DeserializerException {
List<String> parameterNames = edmAction.getParameterNames();
if (edmAction.isBound()) {
@@ -754,7 +754,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
private void checkJsonTypeBasedOnPrimitiveType(final String propertyName, final String edmPrimitiveTypeName,
final JsonNode jsonNode)
- throws DeserializerException {
+ throws DeserializerException {
EdmPrimitiveTypeKind primKind;
try {
@@ -769,38 +769,41 @@ public class ODataJsonDeserializer implements ODataDeserializer {
valid |= matchBooleanCase(jsonNode, primKind);
valid |= matchIEEENumberCase(jsonNode, primKind);
- if(!valid) {
+ if (!valid) {
throw new DeserializerException("Invalid json type: " + jsonNode.getNodeType() + " for edm " + primKind
+ " property: " + propertyName, DeserializerException.MessageKeys.INVALID_VALUE_FOR_PROPERTY, propertyName);
}
}
private boolean matchIEEENumberCase(JsonNode node, EdmPrimitiveTypeKind primKind) {
- switch (primKind) {
- case Int64:
- case Decimal:
- // Numbers (either numbers or string)
- if (isIEEE754Compatible) {
- return node.isTextual();
- } else {
- return node.isNumber();
- }
+ switch (primKind) {
+ case Int64:
+ case Decimal:
+ // Numbers (either numbers or string)
+ if (isIEEE754Compatible) {
+ return node.isTextual();
+ } else {
+ return node.isNumber();
}
- return false;
+ default:
+ return false;
+ }
}
private boolean matchBooleanCase(JsonNode node, EdmPrimitiveTypeKind primKind) {
- if(node.isBoolean()) {
+ if (node.isBoolean()) {
switch (primKind) {
case Boolean:
return true;
+ default:
+ return false;
}
}
return false;
}
private boolean matchNumberCase(JsonNode node, EdmPrimitiveTypeKind primKind) {
- if(node.isNumber()) {
+ if (node.isNumber()) {
switch (primKind) {
// Numbers (must be numbers)
case Int16:
@@ -810,13 +813,15 @@ public class ODataJsonDeserializer implements ODataDeserializer {
case Single:
case Double:
return true;
+ default:
+ return false;
}
}
return false;
}
private boolean matchTextualCase(JsonNode node, EdmPrimitiveTypeKind primKind) {
- if(node.isTextual()) {
+ if (node.isTextual()) {
switch (primKind) {
case String:
case Binary:
@@ -826,6 +831,8 @@ public class ODataJsonDeserializer implements ODataDeserializer {
case Guid:
case TimeOfDay:
return true;
+ default:
+ return false;
}
}
return false;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/10fb60ff/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/AsyncProcessor.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/AsyncProcessor.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/AsyncProcessor.java
index 0e65657..9f36e11 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/AsyncProcessor.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/AsyncProcessor.java
@@ -143,7 +143,7 @@ public class AsyncProcessor<T extends Processor> {
public AsyncProcessor(T processor, Class<T> processorInterface, TechnicalAsyncService service) {
Class<? extends Processor> aClass = processor.getClass();
- Class[] interfaces = aClass.getInterfaces();
+ Class<?>[] interfaces = aClass.getInterfaces();
handler = new ProcessorInvocationHandler(processor);
Object proxyInstance = Proxy.newProxyInstance(aClass.getClassLoader(), interfaces, handler);
proxyProcessor = processorInterface.cast(proxyInstance);
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/10fb60ff/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/TechnicalAsyncService.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/TechnicalAsyncService.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/TechnicalAsyncService.java
index f471929..857a45f 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/TechnicalAsyncService.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/async/TechnicalAsyncService.java
@@ -115,7 +115,7 @@ public class TechnicalAsyncService {
return request.getRequestURL() != null && request.getRequestURL().toString().contains(STATUS_MONITOR_TOKEN);
}
- String processAsynchronous(AsyncProcessor dispatchedProcessor)
+ String processAsynchronous(AsyncProcessor<?> dispatchedProcessor)
throws ODataApplicationException, ODataLibraryException {
// use executor thread pool
String location = createNewAsyncLocation(dispatchedProcessor.getRequest());
@@ -149,7 +149,7 @@ public class TechnicalAsyncService {
StringBuilder sb = new StringBuilder();
sb.append("<html><header/><body><h1>Queued requests</h1><ul>");
for (Map.Entry<String, AsyncRunner> entry : LOCATION_2_ASYNC_RUNNER.entrySet()) {
- AsyncProcessor asyncProcessor = entry.getValue().getDispatched();
+ AsyncProcessor<?> asyncProcessor = entry.getValue().getDispatched();
sb.append("<li><b>ID: </b>").append(entry.getKey()).append("<br/>")
.append("<b>Location: </b><a href=\"")
.append(asyncProcessor.getLocation()).append("\">")
@@ -240,17 +240,17 @@ public class TechnicalAsyncService {
/**
* Runnable for the AsyncProcessor.
*/
- private static class AsyncRunner implements Runnable {
- private final AsyncProcessor dispatched;
+ static class AsyncRunner implements Runnable {
+ private final AsyncProcessor<?> dispatched;
private int defaultSleepTimeInSeconds = 0;
private Exception exception;
boolean finished = false;
- public AsyncRunner(AsyncProcessor wrap) {
+ public AsyncRunner(AsyncProcessor<?> wrap) {
this(wrap, 0);
}
- public AsyncRunner(AsyncProcessor wrap, int defaultSleepTimeInSeconds) {
+ public AsyncRunner(AsyncProcessor<?> wrap, int defaultSleepTimeInSeconds) {
this.dispatched = wrap;
if(defaultSleepTimeInSeconds > 0) {
this.defaultSleepTimeInSeconds = defaultSleepTimeInSeconds;
@@ -269,7 +269,7 @@ public class TechnicalAsyncService {
finished = true;
}
- private int getSleepTime(AsyncProcessor wrap) {
+ private int getSleepTime(AsyncProcessor<?> wrap) {
String preferHeader = wrap.getPreferHeader();
Matcher matcher = Pattern.compile("(" + TEC_ASYNC_SLEEP +
"=)(\\d*)").matcher(preferHeader);
@@ -288,7 +288,7 @@ public class TechnicalAsyncService {
return finished;
}
- public AsyncProcessor getDispatched() {
+ public AsyncProcessor<?> getDispatched() {
return dispatched;
}
}