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

Remove usage and add some legacy java.util classes to forbiddenapis (Stack, Hashtable, Vector) #12404

Merged
merged 5 commits into from
Jun 29, 2023

Conversation

uschindler
Copy link
Contributor

I noticed on some other PR that some classes (especially java.util.Stack) are used in Lucene code although they are really legacy from Java 1.0. The problem with them is that they are synchronized. Stack is used in some preformance critical code.

This PR adds them to forbiddenapis and fixes usage.

There is a small problem with forbiddenapis, that it triggers on Hashtable for declarations of java.util.Properties (as this one extends from Hashtable as implementation detail. For now I commented the forbidden rule.

@uschindler uschindler added this to the 9.8.0 milestone Jun 29, 2023
@uschindler uschindler changed the title Remove and add some legacy java.util classes to forbiddenapis (Stack, Hashtable, Vector) Remove usage and add some legacy java.util classes to forbiddenapis (Stack, Hashtable, Vector) Jun 29, 2023
@uschindler uschindler merged commit e503805 into apache:main Jun 29, 2023
asfgit pushed a commit that referenced this pull request Jun 29, 2023
…Stack, Hashtable, Vector) (#12404)

# Conflicts:
#	lucene/facet/src/java/org/apache/lucene/facet/sortedset/DefaultSortedSetDocValuesReaderState.java
@uschindler uschindler deleted the dev/legacyJavaUtil branch June 29, 2023 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants