You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2011/11/09 19:35:54 UTC
svn commit: r1199912 - in
/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump:
Dirent.java DumpArchiveInputStream.java
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<Integer, DumpArchiveEntry> 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;
}