dao.insert(newQualityGate);
return newQualityGate;
}
public QualityGateDto rename(long idToRename, String name) {
checkPermission(UserSession.get());
<BUG>QualityGateDto toRename = getNonNull(idToRename);
</BUG>
validateQualityGate(idToRename, name);
toRename.setName(name);
dao.update(toRename);

dao.insert(newQualityGate);
return newQualityGate;
}
public QualityGateDto rename(long idToRename, String name) {
checkPermission(UserSession.get());
QualityGateDto toRename = getNonNullQgate(idToRename);
validateQualityGate(idToRename, name);
toRename.setName(name);
dao.update(toRename);
