Permalink
Browse files

Removed useless else statement

  • Loading branch information...
1 parent 9adedaa commit 8c08e7f7f906a3c19b678ffb40491381a5bd291f @pauloricardomg pauloricardomg committed with timf May 6, 2010
@@ -251,16 +251,12 @@ protected static void authorizeDuration(VirtualMachine vm,
final int requestedSecs = dep.getMinDuration();
if (requestedSecs == VirtualMachineDeployment.NOTSET) {
dep.setMinDuration(defaultSecs);
- } else {
- if (requestedSecs > maxSecs) {
+ } else if (requestedSecs > maxSecs) {
// client visible message:
throw new ResourceRequestDeniedException(
"request duration (" + requestedSecs + " seconds)" +
" exceeds the maximum allowed (" + maxSecs +
" seconds)");
- } else {
- dep.setMinDuration(requestedSecs);
- }
}
}

0 comments on commit 8c08e7f

Please sign in to comment.