Skip to content

clean up static Map/Set/etc to avoid races and leaks#198

Merged
svanteschubert merged 4 commits intomasterfrom
static-maps
Dec 19, 2022
Merged

clean up static Map/Set/etc to avoid races and leaks#198
svanteschubert merged 4 commits intomasterfrom
static-maps

Conversation

@mistmist
Copy link
Contributor

Hopefully the OdfNamespace one won't grow to any measurable size, otherwise will have to be moved somewhere non-static.

The "javax.activation" package was removed from JDK9, and is now
maintained by Eclipse, and is surely excessive for this functionality.

The fallback code here that is using a static map is mainly for file
types one would expect to be common on a 1990s Solaris workstation.

It turns out that there is a URLConnection.guessContentTypeFromName()
since forever so just use that.
mUrlToPrefix looks safe currently, might get inited twice but not a
problem.
Copy link
Contributor

@svanteschubert svanteschubert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Michael!

@svanteschubert svanteschubert merged commit 07eccbf into master Dec 19, 2022
@svanteschubert svanteschubert deleted the static-maps branch December 19, 2022 18:54
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.

2 participants