You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by tr...@apache.org on 2008/04/20 07:17:17 UTC
svn commit: r649888 -
/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/NioProcessor.java
Author: trustin
Date: Sat Apr 19 22:17:16 2008
New Revision: 649888
URL: http://svn.apache.org/viewvc?rev=649888&view=rev
Log:
Fixed issue: DIRMINA-570 - NullPointerException in NioProcessor.transferFile
* Made sure to ignore a null exception message
Modified:
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/NioProcessor.java
Modified: mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/NioProcessor.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/NioProcessor.java?rev=649888&r1=649887&r2=649888&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/NioProcessor.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/NioProcessor.java Sat Apr 19 22:17:16 2008
@@ -52,7 +52,7 @@
public NioProcessor(Executor executor) {
super(executor);
- this.selector = newSelector();
+ selector = newSelector();
}
@Override
@@ -191,8 +191,10 @@
try {
return (int) region.getFileChannel().transferTo(region.getPosition(), length, session.getChannel());
} catch (IOException e) {
- // Check to see if the IOException is being thrown due to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5103988
- if (e.getMessage().contains("Resource temporarily unavailable")) {
+ // Check to see if the IOException is being thrown due to
+ // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5103988
+ String message = e.getMessage();
+ if (message != null && message.contains("temporarily unavailable")) {
return 0;
} else {
throw e;