cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaanHoogland <...@git.apache.org>
Subject [GitHub] cloudstack pull request: Quota: findbug fixes
Date Mon, 28 Dec 2015 12:11:59 GMT
Github user DaanHoogland commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1289#discussion_r48476072
  
    --- Diff: framework/quota/src/org/apache/cloudstack/quota/vo/ServiceOfferingVO.java ---
    @@ -310,14 +269,12 @@ public String getDeploymentPlanner() {
         }
     
         public String getDetail(String name) {
    -        assert (details != null) : "Did you forget to load the details?";
    -
    -        return details != null ? details.get(name) : null;
    +        if (details == null) throw new IllegalStateException("Cannot set value as details
is null");
    +        return details.get(name);
         }
     
         public void setDetail(String name, String value) {
    -        assert (details != null) : "Did you forget to load the details?";
    -
    +        if (details == null) throw new IllegalStateException("Cannot set value as details
is null");
    --- End diff --
    
    good solution :+1: 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message