mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-04 00:02:37 +01:00
From Alex - assertion fix
This commit is contained in:
parent
0c53bddb16
commit
3d41105e1b
@ -25,14 +25,12 @@ import java.util.Set;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.api.ApiConstants;
|
||||
import com.cloud.api.BaseCmd;
|
||||
import com.cloud.api.BaseListCmd;
|
||||
import com.cloud.api.Implementation;
|
||||
import com.cloud.api.Parameter;
|
||||
import com.cloud.api.response.ListResponse;
|
||||
import com.cloud.api.response.TemplateResponse;
|
||||
import com.cloud.async.AsyncJob;
|
||||
import com.cloud.template.VirtualMachineTemplate;
|
||||
import com.cloud.template.VirtualMachineTemplate.TemplateFilter;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.user.UserContext;
|
||||
|
||||
@ -126,13 +126,13 @@ public class Transaction {
|
||||
// the existing DAO features
|
||||
//
|
||||
public void transitToUserManagedConnection(Connection conn) {
|
||||
assert(_conn == null && _stack.size() <= 1) : "Can't change to a user managed connection unless the stack is empty and the db connection is null: " + toString();
|
||||
assert(_conn == null /*&& _stack.size() <= 1*/) : "Can't change to a user managed connection unless the stack is empty and the db connection is null: " + toString();
|
||||
_conn = conn;
|
||||
_dbId = CONNECTED_DB;
|
||||
}
|
||||
|
||||
public void transitToAutoManagedConnection(short dbId) {
|
||||
assert(_stack.size() <= 1) : "Can't change to auto managed connection unless your stack is empty";
|
||||
// assert(_stack.size() <= 1) : "Can't change to auto managed connection unless your stack is empty";
|
||||
_dbId = dbId;
|
||||
_conn = null;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user