summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2012-06-06 02:28:06 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2012-06-06 09:44:39 +0200
commite2513558970ae47234298fdae892dc60cadb17e6 (patch)
tree6d9ca0bc96b11ed5587f89c2765d555dd8f04494
parent4e5944fbf8579fddc8b81ae11484b392cc6fc527 (diff)
downloadjgit-e2513558970ae47234298fdae892dc60cadb17e6.tar.gz
jgit-e2513558970ae47234298fdae892dc60cadb17e6.zip
Get rid of warnings about empty statments
In HtttpAuthMethod there were comments, but not in a style that Eclipse recognizes. Change-Id: I64f55b27143f8badcefbb419d3951f2a26b87d5f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java12
3 files changed, 14 insertions, 5 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
index f4a3a6289d..1afc6d808d 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
@@ -459,9 +459,13 @@ public class TestRepository<R extends Repository> {
*/
public <T extends AnyObjectId> T update(String ref, T obj) throws Exception {
if (Constants.HEAD.equals(ref)) {
+ // nothing
} else if ("FETCH_HEAD".equals(ref)) {
+ // nothing
} else if ("MERGE_HEAD".equals(ref)) {
+ // nothing
} else if (ref.startsWith(Constants.R_REFS)) {
+ // nothing
} else
ref = Constants.R_HEADS + ref;
@@ -537,7 +541,9 @@ public class TestRepository<R extends Repository> {
*/
public BranchBuilder branch(String ref) {
if (Constants.HEAD.equals(ref)) {
+ // nothing
} else if (ref.startsWith(Constants.R_REFS)) {
+ // nothing
} else
ref = Constants.R_HEADS + ref;
return new BranchBuilder(ref);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java
index 33c3623058..7273150473 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java
@@ -219,5 +219,6 @@ public abstract class RefDatabase {
* Implementors should overwrite this method if they use any kind of caches.
*/
public void refresh() {
+ // nothing
}
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java
index d9673f74e8..bcf0a8ba21 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java
@@ -277,12 +277,14 @@ abstract class HttpAuthMethod {
r.append("://");
r.append(u.getHost());
if (0 < u.getPort()) {
- if (u.getPort() == 80 && "http".equals(u.getProtocol()))
- /* nothing */;
- else if (u.getPort() == 443 && "https".equals(u.getProtocol()))
- /* nothing */;
- else
+ if (u.getPort() == 80 && "http".equals(u.getProtocol())) {
+ /* nothing */
+ } else if (u.getPort() == 443
+ && "https".equals(u.getProtocol())) {
+ /* nothing */
+ } else {
r.append(':').append(u.getPort());
+ }
}
r.append(u.getPath());
if (u.getQuery() != null)