Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 259A0743E for ; Wed, 9 Nov 2011 18:36:16 +0000 (UTC) Received: (qmail 94433 invoked by uid 500); 9 Nov 2011 18:36:15 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 94336 invoked by uid 500); 9 Nov 2011 18:36:15 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 94285 invoked by uid 99); 9 Nov 2011 18:36:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Nov 2011 18:36:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Nov 2011 18:36:14 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 48AC323889E2 for ; Wed, 9 Nov 2011 18:35:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1199912 - in /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump: Dirent.java DumpArchiveInputStream.java Date: Wed, 09 Nov 2011 18:35:54 -0000 To: commits@commons.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111109183554.48AC323889E2@eris.apache.org> Author: sebb Date: Wed Nov 9 18:35:53 2011 New Revision: 1199912 URL: http://svn.apache.org/viewvc?rev=1199912&view=rev Log: Explicit boxing Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/Dirent.java commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/Dirent.java URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/Dirent.java?rev=1199912&r1=1199911&r2=1199912&view=diff ============================================================================== --- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/Dirent.java (original) +++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/Dirent.java Wed Nov 9 18:35:53 2011 @@ -79,6 +79,6 @@ class Dirent { */ @Override public String toString() { - return String.format("[%d]: %s", ino, name); + return String.format("[%d]: %s", Integer.valueOf(ino), name); } } Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java?rev=1199912&r1=1199911&r2=1199912&view=diff ============================================================================== --- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java (original) +++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java Wed Nov 9 18:35:53 2011 @@ -100,7 +100,7 @@ public class DumpArchiveInputStream exte // put in a dummy record for the root node. Dirent root = new Dirent(2, 2, 4, "."); - names.put(2, root); + names.put(Integer.valueOf(2), root); // use priority based on queue to ensure parent directories are // released first. @@ -281,7 +281,7 @@ public class DumpArchiveInputStream exte } entry.setName(path); - entry.setSimpleName(names.get(entry.getIno()).getName()); + entry.setSimpleName(names.get(Integer.valueOf(entry.getIno())).getName()); entry.setOffset(filepos); return entry; @@ -302,9 +302,9 @@ public class DumpArchiveInputStream exte raw.readRecord(); } - if (!names.containsKey(entry.getIno()) && + if (!names.containsKey(Integer.valueOf(entry.getIno())) && (DumpArchiveConstants.SEGMENT_TYPE.INODE == entry.getHeaderType())) { - pending.put(entry.getIno(), entry); + pending.put(Integer.valueOf(entry.getIno()), entry); } int datalen = DumpArchiveConstants.TP_SIZE * entry.getHeaderCount(); @@ -342,7 +342,7 @@ public class DumpArchiveInputStream exte } */ - names.put(ino, d); + names.put(Integer.valueOf(ino), d); // check whether this allows us to fill anything in the pending list. for (Map.Entry e : pending.entrySet()) { @@ -359,7 +359,7 @@ public class DumpArchiveInputStream exte // remove anything that we found. (We can't do it earlier // because of concurrent modification exceptions.) for (DumpArchiveEntry e : queue) { - pending.remove(e.getIno()); + pending.remove(Integer.valueOf(e.getIno())); } } @@ -388,12 +388,12 @@ public class DumpArchiveInputStream exte Dirent dirent = null; for (int i = entry.getIno();; i = dirent.getParentIno()) { - if (!names.containsKey(i)) { + if (!names.containsKey(Integer.valueOf(i))) { elements.clear(); break; } - dirent = names.get(i); + dirent = names.get(Integer.valueOf(i)); elements.push(dirent.getName()); if (dirent.getIno() == dirent.getParentIno()) { @@ -403,7 +403,7 @@ public class DumpArchiveInputStream exte // if an element is missing defer the work and read next entry. if (elements.isEmpty()) { - pending.put(entry.getIno(), entry); + pending.put(Integer.valueOf(entry.getIno()), entry); return null; }