openmicroscopy/bioformats — pull request #617 by melissalinkert (2013-07-24 01:38:07+00:00)
Title: Override getValue() in OriginalMetadataAnnotation

This prevents getValue() from returning null, as it previously delegated
to the implementation in XMLAnnotation, which returns XMLAnnotation's
internal 'value'.

Noticed by Stéphane Dallongeville.

This test code demonstrates the issue:

```
ImageReader reader = new ImageReader();
reader.setOriginalMetadataPopulated(true);
reader.setMetadataStore(new OMEXMLMetadataImpl());
reader.setId(filename);

OMEXMLMetadataImpl meta = (OMEXMLMetadataImpl) reader.getMetadataStore();
OME root = (OME) meta.getRoot();
StructuredAnnotations struct = root.getStructuredAnnotations();

System.out.println(struct.getXMLAnnotation(0).getValue());

reader.close();
```

Without this PR, ```null``` should be printed for any file. For the same file with this PR, a non-null value matching the ```Value``` of the first ```OriginalMetadata``` annotation should be printed.

/cc @Stephane-D