Browse Source

Fix the parameters to an exception

A parenthesis was in the wrong place passing arguments to the wrong
format call. Also fix formatting of enclosing switch statement.

Change-Id: I4cb9642f08b58c39033c3a81dab4bd56bebf4fd2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-3.0
Robin Rosenberg 12 years ago committed by Matthias Sohn
parent
commit
a62770a3dd
  1. 14
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java

14
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java

@ -626,13 +626,12 @@ public class GC {
continue; continue;
default: default:
throw new IOException(MessageFormat.format( throw new IOException(MessageFormat.format(
JGitText.get().corruptObjectInvalidMode3, String JGitText.get().corruptObjectInvalidMode3,
.format("%o", Integer.valueOf(treeWalk //$NON-NLS-1$ String.format("%o", //$NON-NLS-1$
.getRawMode(0)), Integer.valueOf(treeWalk.getRawMode(0))),
(objectId == null) ? "null" //$NON-NLS-1$ (objectId == null) ? "null" : objectId.name(), //$NON-NLS-1$
: objectId.name(), treeWalk treeWalk.getPathString(), //
.getPathString(), repo repo.getIndexFile()));
.getIndexFile())));
} }
} }
return ret; return ret;
@ -703,7 +702,6 @@ public class GC {
} }
// write the packindex // write the packindex
@SuppressWarnings("resource")
FileChannel idxChannel = new FileOutputStream(tmpIdx).getChannel(); FileChannel idxChannel = new FileOutputStream(tmpIdx).getChannel();
OutputStream idxStream = Channels.newOutputStream(idxChannel); OutputStream idxStream = Channels.newOutputStream(idxChannel);
try { try {

Loading…
Cancel
Save