Backward compatibility fix for resource-labels #437
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix #434
Upgrade to 1102 erased all resource labels when the user use .xml config file. It does not happens in case of CaC.
The magic is done by using of readResolve() method and 'repairing' the labels property.
To explain. Before the release 1102 are labels stored in String property. This was changed to List to improve performance, otherwise is necessary to split the String property every time, when you works with labels. On instances with many resources, where each use many of labels is the performance much better.
Why happens this issue? There are no tests to use .xml files. Only for JCaC. And I use only JCaC. That the reason, why I forgot to test the changes for classic .xml configurations.
Testing done
Tested manually:
I checked the labels for every step as well and it looks good.
Proposed upgrade guidelines
N/A
Localizations
N/A
Submitter checklist
@NoExternalUse
. In case it is used by non java code theUsed by {@code <panel>.jelly}
Javadocs are annotated.[ ] New or substantially changed JavaScript is not defined inline and does not calleval
to ease the future introduction of Content Security Policy (CSP) directives (see documentation).[ ] For dependency updates, there are links to external changelogs and, if possible, full differentials.[ ] For new APIs and extension points, there is a link to at least one consumer.[ ] Any localizations are transferred to *.properties files.[ ] Changes in the interface are documented also as examples.Maintainer checklist
Before the changes are marked as
ready-for-merge
:upgrade-guide-needed
label is set and there is a Proposed upgrade guidelines section in the pull request title (see example).