sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1486850 - /sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/storage/ChannelDataInput.java
Date Tue, 28 May 2013 10:08:22 GMT
Author: desruisseaux
Date: Tue May 28 10:08:22 2013
New Revision: 1486850

URL: http://svn.apache.org/r1486850
Log:
Allows InterruptedException to stop the reading process.

Modified:
    sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/storage/ChannelDataInput.java

Modified: sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/storage/ChannelDataInput.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/storage/ChannelDataInput.java?rev=1486850&r1=1486849&r2=1486850&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/storage/ChannelDataInput.java
[UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-netcdf/src/main/java/org/apache/sis/internal/storage/ChannelDataInput.java
[UTF-8] Tue May 28 10:08:22 2013
@@ -142,7 +142,13 @@ public class ChannelDataInput {
         try {
             Thread.sleep(200);
         } catch (InterruptedException e) {
-            // Someone doesn't want to let us sleep. Go back to work.
+            /*
+             * Someone doesn't want to let us sleep. Stop the reading process. We don't try
to go back to work,
+             * because the waiting time was short and this method is invoked in loops. Consequently
if the user
+             * interrupted us, it is probably because he waited for a long time and we still
have not received
+             * any new data.
+             */
+            throw new IOException(e);
         }
     }
 



Mime
View raw message