Skip to content

Commit

Permalink
suppress warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
andot committed May 8, 2016
1 parent 74e4801 commit 82c96d6
Show file tree
Hide file tree
Showing 13 changed files with 11 additions and 0 deletions.
Binary file modified dist/hprose_client_for_java_5.jar
Binary file not shown.
Binary file modified dist/hprose_client_for_java_6.jar
Binary file not shown.
Binary file modified dist/hprose_client_for_java_7.jar
Binary file not shown.
Binary file modified dist/hprose_client_for_java_8.jar
Binary file not shown.
Binary file modified dist/hprose_for_java_5.jar
Binary file not shown.
Binary file modified dist/hprose_for_java_6.jar
Binary file not shown.
Binary file modified dist/hprose_for_java_7.jar
Binary file not shown.
Binary file modified dist/hprose_for_java_8.jar
Binary file not shown.
3 changes: 3 additions & 0 deletions src/main/java/hprose/client/HproseClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,7 @@ public final <T> void subscribe(String name, Integer id, Action<T> callback, Typ
subscribe(name, id, callback, type, timeout);
}

@SuppressWarnings("unchecked")
public final <T> void subscribe(final String name, final Integer id, Action<T> callback, final Type type, int timeout) {
Topic<T> topic = (Topic<T>)getTopic(name, id, true);
if (topic == null) {
Expand Down Expand Up @@ -946,6 +947,8 @@ else if (!topic.callbacks.contains(callback)) {
topic.callbacks.offer(callback);
}
}

@SuppressWarnings("unchecked")
private <T> void delTopic(ConcurrentHashMap<Integer, Topic<?>> topics, Integer id, Action<T> callback) {
if (topics != null && topics.size() > 0) {
if (callback != null) {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/hprose/server/HproseHttpService.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ else if (method.equals("POST")) {
}
}

@SuppressWarnings("unchecked")
private void asyncHandle(final HttpContext httpContext, final HproseHttpMethods methods) {
final AsyncContext async = httpContext.getRequest().startAsync();
async.setTimeout(getTimeout());
Expand Down Expand Up @@ -277,6 +278,7 @@ public void call(Object o) throws Throwable {
});
}

@SuppressWarnings("unchecked")
private void syncHandle(final HttpContext httpContext, HproseHttpMethods methods) {
ByteBufferStream istream = null;
Object response;
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/hprose/server/HproseService.java
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,7 @@ private Object invokeHandler(String name, Object[] args, ServiceContext context)
}
}

@SuppressWarnings("unchecked")
private Object invoke(final String name, final Object[] args, final ServiceContext context) throws Throwable {
Object result =invokeHandler.handle(name, args, context);
if (result instanceof Promise) {
Expand Down Expand Up @@ -782,6 +783,7 @@ else if (remoteMethod.mode == HproseResultMode.Raw) {
return data.buffer;
}

@SuppressWarnings("unchecked")
protected Promise<ByteBuffer> doInvoke(ByteBufferStream stream, ServiceContext context) throws Throwable {
HproseMethods methods = context.getMethods();
Reader reader = new Reader(stream.getInputStream(), mode);
Expand Down Expand Up @@ -893,6 +895,7 @@ private Object afterFilter(ByteBuffer request, ServiceContext context) throws Th
}
}

@SuppressWarnings("unchecked")
private Object beforeFilter(ByteBuffer request, final ServiceContext context) throws Throwable {
Object response;
try {
Expand Down Expand Up @@ -1184,6 +1187,7 @@ public void call(Integer[] value) throws Throwable {
return detector;
}

@SuppressWarnings("unchecked")
public final Promise<Boolean> push(String topic, Integer id, Object result) throws HproseException {
final ConcurrentHashMap<Integer, Topic> topics = getTopics(topic);
if (topics == null) throw new HproseException("Topic " + topic + " is not published.");
Expand Down
1 change: 1 addition & 0 deletions src/main/java/hprose/server/HproseTcpServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public ServerHandler(Connection conn, ByteBuffer data, Integer id) {
this.id = id;
}

@SuppressWarnings("unchecked")
public final void run() {
TcpContext context = new TcpContext(HproseTcpServer.this, conn.socketChannel());
currentContext.set(context);
Expand Down
1 change: 1 addition & 0 deletions src/main/java/hprose/server/HproseWebSocketService.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public void setConfig(EndpointConfig config) {
this.config = config;
}

@SuppressWarnings("unchecked")
public void handle(ByteBuffer buf, Session session) throws Throwable {
WebSocketContext context = new WebSocketContext(this, session, config);
int id;
Expand Down

0 comments on commit 82c96d6

Please sign in to comment.