Browse Source

Revert "[findBugs] Silence DM_STRING_CTOR on PacketLineIn"

This reverts commit 1e510ec20e.

Instead work around the warning by defining our constant by
constructing it through a StringBuilder.

Change-Id: If139509e769d649609c62eff359ebaea5dd286b2
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
CC: Matthias Sohn <matthias.sohn@sap.com>
CC: Chris Aniszczyk <caniszczyk@gmail.com>
tags/v0.10.1
Shawn O. Pearce 13 years ago
parent
commit
08a9682e32

+ 0
- 8
org.eclipse.jgit/findBugs/FindBugsExcludeFilter.xml View File

<Class name="org.eclipse.jgit.util.TemporaryBuffer$BlockInputStream" /> <Class name="org.eclipse.jgit.util.TemporaryBuffer$BlockInputStream" />
<Bug pattern="UR_UNINIT_READ" /> <Bug pattern="UR_UNINIT_READ" />
</Match> </Match>

<!-- Silence invoke inefficient String constructor, we do not want to pool
here -->
<Match>
<Class name="org.eclipse.jgit.transport.PacketLineIn" />
<Method name="&lt;clinit&gt;" />
<Bug pattern="DM_STRING_CTOR" />
</Match>
</FindBugsFilter> </FindBugsFilter>

+ 2
- 1
org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java View File

import org.eclipse.jgit.util.RawParseUtils; import org.eclipse.jgit.util.RawParseUtils;


class PacketLineIn { class PacketLineIn {
static final String END = new String("") /* must not string pool */;
/* must not string pool */
static final String END = new StringBuilder(0).toString();


static enum AckNackResult { static enum AckNackResult {
/** NAK */ /** NAK */

Loading…
Cancel
Save