Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CC37011C5F for ; Fri, 5 Sep 2014 00:56:24 +0000 (UTC) Received: (qmail 44032 invoked by uid 500); 5 Sep 2014 00:56:24 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 43981 invoked by uid 500); 5 Sep 2014 00:56:24 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 43969 invoked by uid 99); 5 Sep 2014 00:56:24 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Sep 2014 00:56:24 +0000 Date: Fri, 5 Sep 2014 00:56:24 +0000 (UTC) From: "Yi Liu (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-11042) CryptoInputStream throwing wrong exception class on errors MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-11042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14122236#comment-14122236 ] Yi Liu commented on HADOOP-11042: --------------------------------- [~stevel@apache.org], could you help to take a look? Thanks. > CryptoInputStream throwing wrong exception class on errors > ---------------------------------------------------------- > > Key: HADOOP-11042 > URL: https://issues.apache.org/jira/browse/HADOOP-11042 > Project: Hadoop Common > Issue Type: Bug > Components: fs > Reporter: Steve Loughran > Assignee: Yi Liu > Attachments: HADOOP-11042.001.patch > > > Having had a quick look at the {{CryptoInputStream}} class, it's not in sync with all the other filesystem's exception logic, as specified in {{src/site/markdown/filesystem/fsdatainputstream.md}} > Operations MUST throw an {{IOException}} on out of bounds reads, ideally {{EOFException}} : > # {{read(byte[] b, int off, int len)}} > # {{seek(long pos) }} > # {{seekToNewSource}} > The tests you want to extend to verify expected behaviour are in {{AbstractContractOpenTest}} and {{AbstractContractSeekTest}} > also, the {{HasEnhancedByteBufferAccess}} implementations may want to think about using {{checkStream()}} before acting on a potentially closed stream. -- This message was sent by Atlassian JIRA (v6.3.4#6332)