Hi, about 2.0.0-SNAPSHOT I was setting version on an existing document and
I noticed the version was set on the Catalog but not in the header so I
took a look at the code and I think there's something odd there (or I'm
missing something).
It first makes sure we are not downgrading the version and then we have the
following code (see my comment):
if (newVersion >= 1.4f)
{
getDocumentCatalog().setVersion(Float.toString(newVersion));
//isn't this always false? We already know newVersion is greater...
if (getDocument().getVersion() > newVersion)
{
getDocument().setVersion(newVersion);
}
}
else
{
// versions < 1.4f have a version header only
getDocument().setVersion(newVersion);
}
I'm not fully sure what's the expected behaviour but I guess it's something
like "if newVer is less then 1.4 then set the header else set both header
and catalog so something like:
if (newVersion >= 1.4f)
{
getDocumentCatalog().setVersion(Float.toString(newVersion));
}
getDocument().setVersion(newVersion);
Am I missing something?