Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix warnings in netconf-api and netconf-util
[controller.git]
/
opendaylight
/
netconf
/
netconf-util
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
netconf
/
util
/
handler
/
ssh
/
virtualsocket
/
ChannelOutputStream.java
diff --git
a/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/virtualsocket/ChannelOutputStream.java
b/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/virtualsocket/ChannelOutputStream.java
index b1314a6eedfde68f71ccb26e27b0c6d73b8e51cd..cd7ec5439bc422e492b874b64e1be89211213d88 100644
(file)
--- a/
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/virtualsocket/ChannelOutputStream.java
+++ b/
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/virtualsocket/ChannelOutputStream.java
@@
-14,7
+14,6
@@
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelOutboundHandler;
import io.netty.channel.ChannelPromise;
import io.netty.channel.ChannelOutboundHandler;
import io.netty.channel.ChannelPromise;
-import java.io.IOException;
import java.io.OutputStream;
import java.net.SocketAddress;
import java.io.OutputStream;
import java.net.SocketAddress;
@@
-27,7
+26,7
@@
public class ChannelOutputStream extends OutputStream implements ChannelOutbound
private ChannelHandlerContext ctx;
@Override
private ChannelHandlerContext ctx;
@Override
- public void flush()
throws IOException
{
+ public void flush() {
synchronized(lock) {
ctx.writeAndFlush(buff).awaitUninterruptibly();
buff = Unpooled.buffer();
synchronized(lock) {
ctx.writeAndFlush(buff).awaitUninterruptibly();
buff = Unpooled.buffer();
@@
-35,51
+34,44
@@
public class ChannelOutputStream extends OutputStream implements ChannelOutbound
}
@Override
}
@Override
- public void write(int b)
throws IOException
{
+ public void write(int b) {
synchronized(lock) {
buff.writeByte(b);
}
}
public void bind(ChannelHandlerContext ctx, SocketAddress localAddress,
synchronized(lock) {
buff.writeByte(b);
}
}
public void bind(ChannelHandlerContext ctx, SocketAddress localAddress,
- ChannelPromise promise)
throws Exception
{
+ ChannelPromise promise) {
ctx.bind(localAddress, promise);
}
public void connect(ChannelHandlerContext ctx, SocketAddress remoteAddress,
ctx.bind(localAddress, promise);
}
public void connect(ChannelHandlerContext ctx, SocketAddress remoteAddress,
- SocketAddress localAddress, ChannelPromise promise)
- throws Exception {
+ SocketAddress localAddress, ChannelPromise promise) {
this.ctx = ctx;
ctx.connect(remoteAddress, localAddress, promise);
}
this.ctx = ctx;
ctx.connect(remoteAddress, localAddress, promise);
}
- public void disconnect(ChannelHandlerContext ctx, ChannelPromise promise)
- throws Exception {
+ public void disconnect(ChannelHandlerContext ctx, ChannelPromise promise) {
ctx.disconnect(promise);
}
ctx.disconnect(promise);
}
- public void close(ChannelHandlerContext ctx, ChannelPromise promise)
- throws Exception {
+ public void close(ChannelHandlerContext ctx, ChannelPromise promise) {
ctx.close(promise);
}
ctx.close(promise);
}
- public void deregister(ChannelHandlerContext ctx, ChannelPromise channelPromise)
- throws Exception {
+ public void deregister(ChannelHandlerContext ctx, ChannelPromise channelPromise) {
ctx.deregister(channelPromise);
}
ctx.deregister(channelPromise);
}
- public void read(ChannelHandlerContext ctx)
- throws Exception {
+ public void read(ChannelHandlerContext ctx) {
ctx.read();
}
ctx.read();
}
- public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise)
- throws Exception {
+ public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) {
// pass
}
// pass
}
- public void flush(ChannelHandlerContext ctx)
- throws Exception {
+ public void flush(ChannelHandlerContext ctx) {
// pass
}
// pass
}
@@
-91,8
+83,7
@@
public class ChannelOutputStream extends OutputStream implements ChannelOutbound
throws Exception {
}
throws Exception {
}
- public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause)
- throws Exception {
+ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
ctx.fireExceptionCaught(cause);
}
}
ctx.fireExceptionCaught(cause);
}
}