Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.0-RC1
-
None
Description
Depending on the order of the timestamp and buildnumber elements the fix done in IVY-501 does not work.
Here a possible fix
In IBiblioResolver.java line 171
XMLHelper.parse(metadataStream, null, new ContextualSAXHandler() { String buildNumber=""; boolean timestampFound; boolean buildNumberFound; public void endElement(String uri, String localName, String qName) throws SAXException { if ("metadata/versioning/snapshot/timestamp".equals(getContext())) { snapshotRev.append(getText()).append("-"); timestampFound=true; if(buildNumberFound){ snapshotRev.append(buildNumber); } } if ("metadata/versioning/snapshot/buildNumber" .equals(getContext())) { buildNumberFound=true; if(timestampFound){ snapshotRev.append(getText()); }else{ buildNumber=getText(); } } super.endElement(uri, localName, qName); } }, null);