diff options
author | Robin Rosenberg <robin.rosenberg@dewire.com> | 2012-11-25 17:17:20 +0100 |
---|---|---|
committer | Robin Rosenberg <robin.rosenberg@dewire.com> | 2012-12-27 16:57:38 +0100 |
commit | c310fa0c802f40a774edb58641de3ac5bfad0e2c (patch) | |
tree | 28dc002136ce8a2c122e2cb012a317aa7d8a0efa /org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java | |
parent | 03d50dc50b584caf2826f7db8a4748435b610f63 (diff) | |
download | jgit-c310fa0c802f40a774edb58641de3ac5bfad0e2c.tar.gz jgit-c310fa0c802f40a774edb58641de3ac5bfad0e2c.zip |
Mark non-externalizable strings as such
A few classes such as Constanrs are marked with @SuppressWarnings, as are
toString() methods with many liternal, but otherwise $NLS-n$ is used for
string containing text that should not be translated. A few literals may
fall into the gray zone, but mostly I've tried to only tag the obvious
ones.
Change-Id: I22e50a77e2bf9e0b842a66bdf674e8fa1692f590
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java index 5030ed142c..e1769f84ed 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java @@ -102,22 +102,22 @@ public class PacketLineIn { final String line = readString(); if (line.length() == 0) throw new PackProtocolException(JGitText.get().expectedACKNAKFoundEOF); - if ("NAK".equals(line)) + if ("NAK".equals(line)) //$NON-NLS-1$ return AckNackResult.NAK; - if (line.startsWith("ACK ")) { + if (line.startsWith("ACK ")) { //$NON-NLS-1$ returnedId.fromString(line.substring(4, 44)); if (line.length() == 44) return AckNackResult.ACK; final String arg = line.substring(44); - if (arg.equals(" continue")) + if (arg.equals(" continue")) //$NON-NLS-1$ return AckNackResult.ACK_CONTINUE; - else if (arg.equals(" common")) + else if (arg.equals(" common")) //$NON-NLS-1$ return AckNackResult.ACK_COMMON; - else if (arg.equals(" ready")) + else if (arg.equals(" ready")) //$NON-NLS-1$ return AckNackResult.ACK_READY; } - if (line.startsWith("ERR ")) + if (line.startsWith("ERR ")) //$NON-NLS-1$ throw new PackProtocolException(line.substring(4)); throw new PackProtocolException(MessageFormat.format(JGitText.get().expectedACKNAKGot, line)); } @@ -141,7 +141,7 @@ public class PacketLineIn { len -= 4; // length header (4 bytes) if (len == 0) - return ""; + return ""; //$NON-NLS-1$ byte[] raw; if (len <= lineBuffer.length) @@ -191,7 +191,7 @@ public class PacketLineIn { return len; } catch (ArrayIndexOutOfBoundsException err) { throw new IOException(MessageFormat.format(JGitText.get().invalidPacketLineHeader, - "" + (char) lineBuffer[0] + (char) lineBuffer[1] + "" + (char) lineBuffer[0] + (char) lineBuffer[1] //$NON-NLS-1$ + (char) lineBuffer[2] + (char) lineBuffer[3])); } } |