cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject [34/50] [abbrv] git commit: updated refs/heads/feature/vpc-ipv6 to 6140db5
Date Mon, 08 Jun 2015 09:45:55 GMT
Formatting the code - Adding final modifier and indenting the code

Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/abe09902
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/abe09902
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/abe09902

Branch: refs/heads/feature/vpc-ipv6
Commit: abe09902591cd33490685a02a9320340fcadb79c
Parents: fe78c76
Author: wilderrodrigues <wrodrigues@schubergphilis.com>
Authored: Thu Jun 4 08:14:07 2015 +0200
Committer: Daan Hoogland <daan.hoogland@gmail.com>
Committed: Thu Jun 4 12:34:04 2015 +0200

----------------------------------------------------------------------
 .../com/cloud/upgrade/dao/VersionDaoImpl.java   | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/abe09902/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java b/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java
index 3be101b..653124f 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java
@@ -64,8 +64,8 @@ public class VersionDaoImpl extends GenericDaoBase<VersionVO, Long>
implements V
     }
 
     @Override
-    public VersionVO findByVersion(String version, Step step) {
-        SearchCriteria<VersionVO> sc = AllFieldsSearch.create();
+    public VersionVO findByVersion(final String version, final Step step) {
+        final SearchCriteria<VersionVO> sc = AllFieldsSearch.create();
         sc.setParameters("version", version);
         sc.setParameters("step", step);
 
@@ -96,7 +96,7 @@ public class VersionDaoImpl extends GenericDaoBase<VersionVO, Long>
implements V
                     try {
                         pstmt.executeQuery();
                         return "2.1.8";
-                    } catch (SQLException e) {
+                    } catch (final SQLException e) {
                         s_logger.debug("Assuming the exception means domain_id is not there.");
                         s_logger.debug("No version table and no nics table, returning 2.1.7");
                         return "2.1.7";
@@ -110,7 +110,7 @@ public class VersionDaoImpl extends GenericDaoBase<VersionVO, Long>
implements V
                         pstmt = conn.prepareStatement("SELECT is_static_nat from firewall_rules");
                         pstmt.executeQuery();
                         return "2.2.1";
-                    } catch (SQLException e) {
+                    } catch (final SQLException e) {
                         s_logger.debug("Assuming the exception means static_nat field doesn't
exist in firewall_rules table, returning version 2.2.2");
                         return "2.2.2";
                     } finally {
@@ -124,14 +124,14 @@ public class VersionDaoImpl extends GenericDaoBase<VersionVO, Long>
implements V
 
             sc.setParameters("step", Step.Complete);
             Filter filter = new Filter(VersionVO.class, "id", false, 0l, 1l);
-            List<String> upgradedVersions = customSearch(sc, filter);
+            final List<String> upgradedVersions = customSearch(sc, filter);
 
             if (upgradedVersions.isEmpty()) {
 
                 // Check if there are records in Version table
                 filter = new Filter(VersionVO.class, "id", false, 0l, 1l);
                 sc = CurrentVersionSearch.create();
-                List<String> vers = customSearch(sc, filter);
+                final List<String> vers = customSearch(sc, filter);
                 if (!vers.isEmpty()) {
                     throw new CloudRuntimeException("Version table contains records for which
upgrade wasn't completed");
                 }
@@ -147,9 +147,9 @@ public class VersionDaoImpl extends GenericDaoBase<VersionVO, Long>
implements V
                         pstmt = conn.prepareStatement("SELECT is_static_nat from firewall_rules");
                         pstmt.executeQuery();
                         throw new CloudRuntimeException("Unable to determine the current
version, version table exists and empty, " +
-                            "nics table doesn't exist, is_static_nat field exists in firewall_rules
table");
+                                "nics table doesn't exist, is_static_nat field exists in
firewall_rules table");
                     }
-                } catch (SQLException e) {
+                } catch (final SQLException e) {
                     s_logger.debug("Assuming the exception means static_nat field doesn't
exist in firewall_rules table, returning version 2.2.2");
                     return "2.2.2";
                 } finally {
@@ -160,12 +160,12 @@ public class VersionDaoImpl extends GenericDaoBase<VersionVO, Long>
implements V
                 return upgradedVersions.get(0);
             }
 
-        } catch (SQLException e) {
+        } catch (final SQLException e) {
             throw new CloudRuntimeException("Unable to get the current version", e);
         } finally {
             try {
                 conn.close();
-            } catch (SQLException e) {
+            } catch (final SQLException e) {
             }
         }
 


Mime
View raw message