mirror of https://github.com/apache/cloudstack.git
Limit the ID valid range to be either numeric -1L for special usage or in range that it hits a DB record
This commit is contained in:
parent
be87e3214e
commit
a7ac3d577a
|
|
@ -75,7 +75,7 @@ public class IdentityDaoImpl extends GenericDaoBase<IdentityVO, Long> implements
|
|||
if(rs.next()) {
|
||||
return rs.getLong(1);
|
||||
} else {
|
||||
if(id != 0)
|
||||
if(id == -1L)
|
||||
return id;
|
||||
|
||||
throw new InvalidParameterValueException("Object " + tableName + "(uuid: " + identityString + ") does not exist.");
|
||||
|
|
|
|||
Loading…
Reference in New Issue