Github user DaanHoogland commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1532#discussion_r62482644
  
    --- Diff: framework/db/src/com/cloud/utils/db/GenericDaoBase.java ---
    @@ -942,12 +942,18 @@ public T findOneBy(final SearchCriteria<T> sc) {
         @DB()
         @SuppressWarnings("unchecked")
         public T findById(final ID id) {
    +        T result = null;
             if (_cache != null) {
                 final Element element = _cache.get(id);
    -            return element == null ? lockRow(id, null) : 
(T)element.getObjectValue();
    +            if (element == null) {
    +                result = lockRow(id, null);
    +            } else {
    +                result = (T)element.getObjectValue();
    +            }
             } else {
    -            return lockRow(id, null);
    +            result = lockRow(id, null);
             }
    +        return result
    --- End diff --
    
    a ';' missing :(


---
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