File tree Expand file tree Collapse file tree
engine/schema/src/com/cloud/upgrade/dao Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828import com .cloud .utils .exception .CloudRuntimeException ;
2929import com .cloud .utils .script .Script ;
3030
31- public class Upgrade306to307 extends Upgrade30xBase implements DbUpgrade {
31+ public class Upgrade306to307 extends Upgrade30xBase {
3232 final static Logger s_logger = Logger .getLogger (Upgrade306to307 .class );
3333
3434 @ Override
@@ -97,6 +97,7 @@ protected void updateConcurrentConnectionsInNetworkOfferings(Connection conn) {
9797 pstmt = conn .prepareStatement ("drop table `cloud`.`network_details`" );
9898 pstmt .executeUpdate ();
9999 } catch (SQLException e ) {
100+ s_logger .info ("[ignored] error during network offering update:" + e .getLocalizedMessage (), e );
100101 } finally {
101102 closeAutoCloseable (rs );
102103 closeAutoCloseable (rs1 );
Original file line number Diff line number Diff line change 2828import com .cloud .utils .exception .CloudRuntimeException ;
2929import com .cloud .utils .script .Script ;
3030
31- public class Upgrade30to301 implements DbUpgrade {
31+ public class Upgrade30to301 extends LegacyDbUpgrade {
3232 final static Logger s_logger = Logger .getLogger (Upgrade30to301 .class );
3333
3434 @ Override
@@ -100,20 +100,9 @@ protected void udpateAccountNetworkResourceCount(Connection conn) {
100100 } catch (SQLException e ) {
101101 throw new CloudRuntimeException ("Unable to update network resource count for account id=" + accountId , e );
102102 } finally {
103- try {
104- if (rs != null ) {
105- rs .close ();
106- }
107-
108- if (rs1 != null ) {
109- rs1 .close ();
110- }
111-
112- if (pstmt != null ) {
113- pstmt .close ();
114- }
115- } catch (SQLException e ) {
116- }
103+ closeAutoCloseable (rs );
104+ closeAutoCloseable (rs1 );
105+ closeAutoCloseable (pstmt );
117106 }
118107 }
119108
You can’t perform that action at this time.
0 commit comments