瀏覽代碼

HADOOP-10542 Potential null pointer dereference in Jets3tFileSystemStore retrieveBlock(). (Ted Yu via stevel)

Steve Loughran 10 年之前
父節點
當前提交
ed2f8a1ba0

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -360,6 +360,9 @@ Release 2.7.0 - UNRELEASED
     HADOOP-11350. The size of header buffer of HttpServer is too small when
     HADOOP-11350. The size of header buffer of HttpServer is too small when
     HTTPS is enabled. (Benoy Antony via wheat9)
     HTTPS is enabled. (Benoy Antony via wheat9)
 
 
+    HADOOP-10542 Potential null pointer dereference in Jets3tFileSystemStore
+    retrieveBlock(). (Ted Yu via stevel)	
+
 Release 2.6.0 - 2014-11-18
 Release 2.6.0 - 2014-11-18
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 1 - 1
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3/Jets3tFileSystemStore.java

@@ -167,7 +167,7 @@ class Jets3tFileSystemStore implements FileSystemStore {
       return object.getDataInputStream();
       return object.getDataInputStream();
     } catch (S3ServiceException e) {
     } catch (S3ServiceException e) {
       if ("NoSuchKey".equals(e.getS3ErrorCode())) {
       if ("NoSuchKey".equals(e.getS3ErrorCode())) {
-        return null;
+        throw new IOException(key + " doesn't exist");
       }
       }
       if (e.getCause() instanceof IOException) {
       if (e.getCause() instanceof IOException) {
         throw (IOException) e.getCause();
         throw (IOException) e.getCause();