Changeset 6774


Ignore:
Timestamp:
08/05/10 17:32:36 (9 years ago)
Author:
curtis
Message:

More robust behavior when ome-xml service is unavailable. But still broken.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/gui/ImageViewer.java

    r6769 r6774  
    7171import loci.formats.ImageWriter; 
    7272import loci.formats.MetadataTools; 
     73import loci.formats.meta.IMetadata; 
    7374import loci.formats.meta.MetadataRetrieve; 
    7475import loci.formats.meta.MetadataStore; 
     
    303304      //Location f = new Location(id); 
    304305      //id = f.getAbsolutePath(); 
    305       try { 
    306         myReader.setMetadataStore(omexmlService.createOMEXMLMetadata()); 
    307       } 
    308       catch (ServiceException exc) { 
    309         LOGGER.info("OME metadata unavailable", exc); 
     306      IMetadata meta = null; 
     307      if (omexmlService != null) { 
     308        try { 
     309          meta = omexmlService.createOMEXMLMetadata(); 
     310          myReader.setMetadataStore(meta); 
     311        } 
     312        catch (ServiceException exc) { 
     313          LOGGER.debug("Could not create OME-XML metadata", exc); 
     314        } 
     315      } 
     316      if (meta == null) { 
     317        LOGGER.info("OME metadata unavailable"); 
    310318      } 
    311319      myReader.setId(id); 
Note: See TracChangeset for help on using the changeset viewer.