Return-Path: X-Original-To: apmail-giraph-dev-archive@www.apache.org Delivered-To: apmail-giraph-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0D622100F2 for ; Wed, 15 Jan 2014 20:16:22 +0000 (UTC) Received: (qmail 34928 invoked by uid 500); 15 Jan 2014 20:16:21 -0000 Delivered-To: apmail-giraph-dev-archive@giraph.apache.org Received: (qmail 34809 invoked by uid 500); 15 Jan 2014 20:16:20 -0000 Mailing-List: contact dev-help@giraph.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@giraph.apache.org Delivered-To: mailing list dev@giraph.apache.org Received: (qmail 34801 invoked by uid 500); 15 Jan 2014 20:16:19 -0000 Delivered-To: apmail-incubator-giraph-dev@incubator.apache.org Received: (qmail 34797 invoked by uid 99); 15 Jan 2014 20:16:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jan 2014 20:16:19 +0000 Date: Wed, 15 Jan 2014 20:16:19 +0000 (UTC) From: "Maja Kabiljo (JIRA)" To: giraph-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GIRAPH-724) UnsafeByteArrayOutputStream.writeUTF should call ensureSize 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/GIRAPH-724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13872541#comment-13872541 ] Maja Kabiljo commented on GIRAPH-724: ------------------------------------- In writeBytes/writeChars/writeUTF, we can just call writeChar/writeByte/writeShort methods which already do it all (check the size, call unsafe, move position). > UnsafeByteArrayOutputStream.writeUTF should call ensureSize > ----------------------------------------------------------- > > Key: GIRAPH-724 > URL: https://issues.apache.org/jira/browse/GIRAPH-724 > Project: Giraph > Issue Type: Bug > Reporter: Maja Kabiljo > Attachments: GIRAPH-724.patch, GIRAPH-724.patch, GIRAPH-724.patch > > > UnsafeByteArrayOutputStream.writeUTF can throw an exception if the String doesn't fit in current byte array because ensureSize is not called. -- This message was sent by Atlassian JIRA (v6.1.5#6160)