Skip to content

Commit 13a4c06

Browse files
author
Mice Xia
committed
CLOUDSTACK-1176 1) remove 'final' modifier from id attribute in SnapshotVO 2) make state setter method comply with convention
1 parent 7c00361 commit 13a4c06

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

core/src/com/cloud/storage/SnapshotVO.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class SnapshotVO implements Snapshot {
3131
@Id
3232
@GeneratedValue(strategy=GenerationType.IDENTITY)
3333
@Column(name="id")
34-
private final long id = -1;
34+
private long id;
3535

3636
@Column(name="data_center_id")
3737
long dataCenterId;
@@ -248,7 +248,7 @@ public State getState() {
248248
return state;
249249
}
250250

251-
public void setStatus(State state) {
251+
public void setState(State state) {
252252
this.state = state;
253253
}
254254

server/src/com/cloud/storage/dao/SnapshotDaoImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ public boolean updateState(State currentState, Event event, State nextState, Sna
328328
Transaction txn = Transaction.currentTxn();
329329
txn.start();
330330
SnapshotVO snapshotVO = (SnapshotVO)snapshot;
331-
snapshotVO.setStatus(nextState);
331+
snapshotVO.setState(nextState);
332332
super.update(snapshotVO.getId(), snapshotVO);
333333
txn.commit();
334334
return true;

0 commit comments

Comments
 (0)