Doron Fediuck has posted comments on this change.
Change subject: core: avoid NPE in rollback quota (#846777)
......................................................................
Patch Set 1: I would prefer that you didn't submit this
(2 inline comments)
General Exception is not good in general, and in this case as well.
We should handle places where quota was not used, but for other cases we need
to know what went wrong.
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
Line 309: try {
Line 310: if (this instanceof Quotable) {
Line 311: ((Quotable) this).rollbackQuota();
Line 312: }
Line 313: } catch (Exception e) {
Please catch NPE.
If we have something else we should know that.
Line 314: log.debug("RollbackQuota: failed (may be because quota is
disabled)", e);
Line 315: }
Line 316: TransactionSupport.executeInNewTransaction(new
TransactionMethod<Object>() {
Line 317: @Override
Line 1139: try {
Line 1140: if (this instanceof Quotable) {
Line 1141: ((Quotable) this).rollbackQuota();
Line 1142: }
Line 1143: } catch (Exception e) {
Same- catch NPE.
Line 1144: log.debug("RollbackQuota: failed (may be because quota
is disabled)", e);
Line 1145: }
Line 1146: cancelTasks();
Line 1147: }
--
To view, visit http://gerrit.ovirt.org/7632
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I688ef23e96c94e34852c02682d0bca243718cdbb
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: ofri masad <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches