brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Versioning catalog items (take 2)
Date Tue, 11 Nov 2014 08:00:58 GMT
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/312#discussion_r20136332
  
    --- Diff: core/src/main/java/brooklyn/catalog/internal/CatalogItemDtoAbstract.java ---
    @@ -104,18 +107,35 @@ public String getIconUrl() {
         }
     
         @Override
    -    public String getVersion() {
    -        return version;
    +    public String getSymbolicName() {
    +        if (symbolicName != null) return symbolicName;
    +        if (registeredTypeName != null) return registeredTypeName;
    +        return getJavaType();
         }
     
    -    @Nonnull
         @Override
    -    public CatalogItemLibraries getLibraries() {
    -        return getLibrariesDto();
    +    public String getVersion() {
    +        //xstream doesn't call constructors
    --- End diff --
    
    The property is set to NO_VERSION when the object is initialized so it's not supposed
to be null ever. But xstream doesn't call constructors when reading from the catalog.xml file
which results in null value for the version property. That's why we have to fix it in the
getter.


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