Github user sateesh-chodapuneedi commented on the pull request:

    https://github.com/apache/cloudstack/pull/1532#issuecomment-217814496
  
    
    
    @DaanHoogland I agree that's the best practice though there is a glitch 
here. Following code returns null if _cache is not null but element is null,
    ```java
        T result = null
        if (_cache != null) {
            final Element element = _cache.get(id);
            if (element != null) {
                result = (T)element.getObjectValue();
            }
        } else {
            result =findById(id, true, null);
        }
        return result;
    ```



---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to