summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2023-11-29 00:18:29 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2023-11-29 00:18:29 +0100
commit29ad7d56e8fa59fcdafd362876098aedb8730d4c (patch)
treee4068b0671f6b1a37819e62c60639b1b25f9e20b
parente4abd0123bb982dc74432190445d2e53933a27e4 (diff)
downloadjgit-29ad7d56e8fa59fcdafd362876098aedb8730d4c.tar.gz
jgit-29ad7d56e8fa59fcdafd362876098aedb8730d4c.zip
Fix warnings about empty control flow statements
Change-Id: If1595ac148edf88a18efdd90c4f40d0ac719caab
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FooterLine.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FooterLine.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FooterLine.java
index f4f4764739..f58eb82fc8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FooterLine.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FooterLine.java
@@ -76,7 +76,10 @@ public final class FooterLine {
byte[] raw) {
// Find the end of the last paragraph.
int parEnd = raw.length;
- for (; parEnd > 0 && (raw[parEnd - 1] == '\n' || raw[parEnd - 1] == ' '); --parEnd);
+ for (; parEnd > 0 && (raw[parEnd - 1] == '\n'
+ || raw[parEnd - 1] == ' '); --parEnd) {
+ // empty
+ }
int msgB = RawParseUtils.commitMessage(raw, 0);
ArrayList<FooterLine> r = new ArrayList<>(4);
@@ -84,7 +87,9 @@ public final class FooterLine {
// Search for the beginning of last paragraph
int parStart = parEnd;
- for (; parStart > msgB && (raw[parStart - 1] != '\n' || raw[parStart - 2] != '\n'); --parStart);
+ for (; parStart > msgB && (raw[parStart - 1] != '\n' || raw[parStart - 2] != '\n'); --parStart) {
+ // empty
+ }
for (int ptr = parStart; ptr < parEnd;) {
int keyStart = ptr;
@@ -97,7 +102,10 @@ public final class FooterLine {
// Skip over the ': *' at the end of the key before the value.
int valStart, valEnd;
- for (valStart = keyEnd + 1; valStart < raw.length && raw[valStart] == ' '; ++valStart);
+ for (valStart = keyEnd + 1; valStart < raw.length
+ && raw[valStart] == ' '; ++valStart) {
+ // empty
+ }
for(ptr = valStart;;) {
ptr = RawParseUtils.nextLF(raw, ptr);