Changeset 7013


Ignore:
Timestamp:
09/30/10 04:52:31 (9 years ago)
Author:
callan
Message:

Resolving issues with Reference instances (with their referrer ID) ending up in the model object hash; includes test case. (Fixes #571)

Location:
trunk/components
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/test/loci/formats/utests/testng.xml

    r6876 r7013  
    8080        <class name="loci.formats.utests.BaseModelReaderTest"/> 
    8181        <class name="loci.formats.utests.BaseModelNoBinDataReaderTest"/> 
     82        <class name="loci.formats.utests.PumpWithLightSourceSettingsTest"/> 
    8283      </classes> 
    8384    </test> 
  • trunk/components/ome-xml/src/ome/xml/model/OMEModel.java

    r6881 r7013  
    4242 
    4343  OMEModelObject getModelObject(String id); 
    44    
     44 
    4545  Map<String, OMEModelObject> getModelObjects(); 
    4646 
    4747  boolean addReference(OMEModelObject a, Reference b); 
    48    
     48 
    4949  Map<OMEModelObject, List<Reference>> getReferences(); 
    5050 
  • trunk/components/ome-xml/src/ome/xml/model/OMEModelImpl.java

    r6881 r7013  
    5959    return modelObjects.remove(id); 
    6060  } 
    61    
     61 
    6262  /* (non-Javadoc) 
    6363   * @see ome.xml.model.OMEModel#addModelObject(java.lang.String, ome.xml.model.OMEModelObject) 
    6464   */ 
    6565  public OMEModelObject addModelObject(String id, OMEModelObject object) { 
     66    if (Reference.class.isAssignableFrom(object.getClass())) { 
     67      return object; 
     68    } 
    6669    return modelObjects.put(id, object); 
    6770  } 
Note: See TracChangeset for help on using the changeset viewer.