That more or less defeats the purpose of using a StringBuilder.
Change-Id: I519f7bf1c9b6670e63c3714210f834ee845dc69f
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
shift += 7;
} while ((c & 0x80) != 0);
- if (includeHeader)
- r.append("DELTA( BASE=" + baseLen + " RESULT=" + resLen + " )\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (includeHeader) {
+ r.append("DELTA( BASE="); //$NON-NLS-1$
+ r.append(baseLen);
+ r.append(" RESULT="); //$NON-NLS-1$
+ r.append(resLen);
+ r.append(" )\n"); //$NON-NLS-1$
+ }
while (deltaPtr < delta.length) {
final int cmd = delta[deltaPtr++] & 0xff;
if (copySize == 0)
copySize = 0x10000;
- r.append(" COPY (" + copyOffset + ", " + copySize + ")\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
+ r.append(" COPY ("); //$NON-NLS-1$
+ r.append(copyOffset);
+ r.append(", "); //$NON-NLS-1$
+ r.append(copySize);
+ r.append(")\n"); //$NON-NLS-1$
} else if (cmd != 0) {
// Anything else the data is literal within the delta
// itself.
if (isEdge())
buf.append(" edge");
if (getDeltaDepth() > 0)
- buf.append(" depth=" + getDeltaDepth());
+ buf.append(" depth=").append(getDeltaDepth());
if (isDeltaRepresentation()) {
if (getDeltaBase() != null)
- buf.append(" base=inpack:" + getDeltaBase().name());
+ buf.append(" base=inpack:").append(getDeltaBase().name());
else
- buf.append(" base=edge:" + getDeltaBaseId().name());
+ buf.append(" base=edge:").append(getDeltaBaseId().name());
}
if (isWritten())
- buf.append(" offset=" + getOffset());
+ buf.append(" offset=").append(getOffset());
buf.append("]");
return buf.toString();
}
case REJECTED_MISSING_OBJECT:
if (cmd.getMessage() == null)
r.append("missing object(s)"); //$NON-NLS-1$
- else if (cmd.getMessage().length() == Constants.OBJECT_ID_STRING_LENGTH)
- r.append("object " + cmd.getMessage() + " missing"); //$NON-NLS-1$ //$NON-NLS-2$
- else
+ else if (cmd.getMessage().length() == Constants.OBJECT_ID_STRING_LENGTH) {
+ r.append("object "); //$NON-NLS-1$
+ r.append(cmd.getMessage());
+ r.append(" missing"); //$NON-NLS-1$
+ } else
r.append(cmd.getMessage());
break;