Write groups under tag group instead of groupstree to enhance compatibility with previous versions#2704
Conversation
…tibility with previous versions
|
I wonder why JabRef does not simply ignore the groups Tree then and deletes it on save. |
group instead of groupstree to hence compatibility with previous versionsgroup instead of groupstree to enhence compatibility with previous versions
|
@tobiasdiez Even the old versions from 3.1 or 3.2 onward (not sure which) should not delete the new Anyway, I think this is a good compromise. Then people with older versions can still open the file and when they wonder that the groups tree is not correct (or gone), we can tell them to upgrade. I just think you should use |
group instead of groupstree to enhence compatibility with previous versionsgroup instead of groupstree to enhance compatibility with previous versions
|
Well, even 3.8.2 deletes the I could change |
|
I see, with metadata the serialization might be different. Hm, if it has been used before, we probably should not use |
|
Decision: Alternatives: |
Right now, files written with 4.0 cannot be opened in older versions. The new format of the groups leads to a NPE.
As a way out, I changed the tag for the groups tree from
groupstreetogroup(groupswas already used by previous version way back). Thus older versions completely ignore the group tree and no longer try to parse it, so no NPE is thrown. On the downside, however, the groups tree is deleted upon save in the older version. Still a bit better than a crashing Jabref in my opinion.gradle localizationUpdate?