Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix extension file cache lookup #934

Merged
merged 3 commits into from
Feb 12, 2024

Conversation

tzjan
Copy link
Contributor

@tzjan tzjan commented Feb 9, 2024

Try to fix extension file cache lookup in issue #932

tzjan and others added 3 commits February 9, 2024 07:56
a version. Otherwise the extension JNLP will be downloaded a 2nd time and
a second entry will be created:
::i=0\13::l=http://localhost/myapp/jnlp.extension/common.jnlp::a=1706698483984::
::i=0\0::l=http://localhost/myapp/jnlp.extension/common.jnlp::v=6.2.3::a=1706698483198::

Because the cache lookup is called twice on extensions. The second time without the version
so the versioned entry is not used. Instead a new entry i=0\13 without a version is created.

This works fine as long as not a new version of common.jnlp::v=6.2.4 is lookuped.
Then the sorting in line 246 of net/adoptopenjdk/icedteaweb/resources/cache/CacheImpl.java
fails withe a NPE, because it's missing the version.
in this context. This fixes a NPE on loading the cache which contains versioned and
unversioned entries of a file looking up a new version eg. 6.2.4

::i=0\13::l=http://localhost/myapp/jnlp.extension/common.jnlp::a=1706711261663::
::i=0\0::l=http://localhost/myapp/jnlp.extension/common.jnlp::v=6.2.3::a=1706710902351::
@janakmulani janakmulani merged commit 7a8acf1 into AdoptOpenJDK:master Feb 12, 2024
5 checks passed
@tzjan tzjan deleted the FixExtensionFileCacheLookup branch February 13, 2024 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants