Fix Eclipse warnings
Change-Id: I0ed9daf49894b96831811eec46ba019df0173784
diff --git a/src/main/java/com/googlesource/gerrit/plugins/verifystatus/VerifyStatusQueryShell.java b/src/main/java/com/googlesource/gerrit/plugins/verifystatus/VerifyStatusQueryShell.java
index 980e754..41edad9 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/verifystatus/VerifyStatusQueryShell.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/verifystatus/VerifyStatusQueryShell.java
@@ -454,6 +454,7 @@
case JSON_SINGLE:
collector.add(row);
break;
+ case PRETTY:
default:
final JsonObject obj = new JsonObject();
obj.addProperty("type", "error");
@@ -486,6 +487,7 @@
}
println(collector.toString());
break;
+ case PRETTY:
default:
final JsonObject obj = new JsonObject();
obj.addProperty("type", "error");
diff --git a/src/main/java/com/googlesource/gerrit/plugins/verifystatus/server/schema/CiDataSourceProvider.java b/src/main/java/com/googlesource/gerrit/plugins/verifystatus/server/schema/CiDataSourceProvider.java
index 8af154c..dffbbb4 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/verifystatus/server/schema/CiDataSourceProvider.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/verifystatus/server/schema/CiDataSourceProvider.java
@@ -153,23 +153,21 @@
ds.setInitialSize(ds.getMinIdle());
exportPoolMetrics(ds);
return intercept(interceptor, ds);
- } else {
- // Don't use the connection pool.
- //
- try {
- Properties p = new Properties();
- p.setProperty("driver", driver);
- p.setProperty("url", url);
- if (username != null) {
- p.setProperty("user", username);
- }
- if (password != null) {
- p.setProperty("password", password);
- }
- return intercept(interceptor, new SimpleDataSource(p));
- } catch (SQLException se) {
- throw new ProvisionException("Database unavailable", se);
+ }
+ // Don't use the connection pool.
+ try {
+ Properties p = new Properties();
+ p.setProperty("driver", driver);
+ p.setProperty("url", url);
+ if (username != null) {
+ p.setProperty("user", username);
}
+ if (password != null) {
+ p.setProperty("password", password);
+ }
+ return intercept(interceptor, new SimpleDataSource(p));
+ } catch (SQLException se) {
+ throw new ProvisionException("Database unavailable", se);
}
}