Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "bug 344 interpretation of slashes ('/') in URI"
[controller.git]
/
opendaylight
/
netconf
/
netconf-util
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
netconf
/
util
/
handler
/
ssh
/
virtualsocket
/
ChannelInputStream.java
diff --git
a/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/virtualsocket/ChannelInputStream.java
b/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/virtualsocket/ChannelInputStream.java
index 07c81b0ccb7127aad1a5ffc14a3e6d6412dd1446..313ea932413b63b36c5d20cc6cb1a9570205ab2a 100644
(file)
--- a/
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/virtualsocket/ChannelInputStream.java
+++ b/
opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/ssh/virtualsocket/ChannelInputStream.java
@@
-39,7
+39,9
@@
public class ChannelInputStream extends InputStream implements ChannelInboundHan
b[off] = (byte)c;
b[off] = (byte)c;
- if(this.bb.readableBytes() == 0) return bytesRead;
+ if(this.bb.readableBytes() == 0) {
+ return bytesRead;
+ }
int ltr = len-1;
ltr = (ltr <= bb.readableBytes()) ? ltr : bb.readableBytes();
int ltr = len-1;
ltr = (ltr <= bb.readableBytes()) ? ltr : bb.readableBytes();
@@
-57,6
+59,7
@@
public class ChannelInputStream extends InputStream implements ChannelInboundHan
try {
lock.wait();
} catch (InterruptedException e) {
try {
lock.wait();
} catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
throw new RuntimeException(e);
}
}
throw new RuntimeException(e);
}
}
@@
-71,28
+74,23
@@
public class ChannelInputStream extends InputStream implements ChannelInboundHan
}
}
}
}
- public void channelRegistered(ChannelHandlerContext ctx)
- throws Exception {
+ public void channelRegistered(ChannelHandlerContext ctx) {
ctx.fireChannelRegistered();
}
ctx.fireChannelRegistered();
}
- public void channelUnregistered(ChannelHandlerContext ctx)
- throws Exception {
+ public void channelUnregistered(ChannelHandlerContext ctx) {
ctx.fireChannelUnregistered();
}
ctx.fireChannelUnregistered();
}
- public void channelActive(ChannelHandlerContext ctx)
- throws Exception {
+ public void channelActive(ChannelHandlerContext ctx) {
ctx.fireChannelActive();
}
ctx.fireChannelActive();
}
- public void channelInactive(ChannelHandlerContext ctx)
- throws Exception {
+ public void channelInactive(ChannelHandlerContext ctx) {
ctx.fireChannelInactive();
}
ctx.fireChannelInactive();
}
- public void channelRead(ChannelHandlerContext ctx, Object o)
- throws Exception {
+ public void channelRead(ChannelHandlerContext ctx, Object o) {
synchronized(lock) {
this.bb.discardReadBytes();
this.bb.writeBytes((ByteBuf) o);
synchronized(lock) {
this.bb.discardReadBytes();
this.bb.writeBytes((ByteBuf) o);
@@
-100,31
+98,25
@@
public class ChannelInputStream extends InputStream implements ChannelInboundHan
}
}
}
}
- public void channelReadComplete(ChannelHandlerContext ctx)
- throws Exception {
+ public void channelReadComplete(ChannelHandlerContext ctx) {
ctx.fireChannelReadComplete();
}
ctx.fireChannelReadComplete();
}
- public void userEventTriggered(ChannelHandlerContext ctx, Object o)
- throws Exception {
+ public void userEventTriggered(ChannelHandlerContext ctx, Object o) {
ctx.fireUserEventTriggered(o);
}
ctx.fireUserEventTriggered(o);
}
- public void channelWritabilityChanged(ChannelHandlerContext ctx)
- throws Exception {
+ public void channelWritabilityChanged(ChannelHandlerContext ctx) {
ctx.fireChannelWritabilityChanged();
}
ctx.fireChannelWritabilityChanged();
}
- public void handlerAdded(ChannelHandlerContext ctx)
- throws Exception {
+ public void handlerAdded(ChannelHandlerContext ctx) {
}
}
- public void handlerRemoved(ChannelHandlerContext ctx)
- throws Exception {
+ public void handlerRemoved(ChannelHandlerContext ctx) {
}
}
- public void exceptionCaught(ChannelHandlerContext ctx, Throwable throwable)
- throws Exception {
+ public void exceptionCaught(ChannelHandlerContext ctx, Throwable throwable) {
ctx.fireExceptionCaught(throwable);
}
}
ctx.fireExceptionCaught(throwable);
}
}