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

Reverts Java 15 features from a backport to 2.x #1121

Open
wants to merge 2 commits into
base: 2.x
Choose a base branch
from

Conversation

brianf-aws
Copy link
Contributor

2.x branch compiles Java 11 code thus any features subsequent of this version will have issues

Description

used string literals. And used get(0) instead of getFirst(). and on streams used .collect(Collectors.toList())

Testing

  • /gradlew test <-- where the issue could be found initially via the UT that had the Java 15 feature
  • ./gradlew spotlessApply

Related Issues

Resolves #1117

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

2.x branch compiles Java 11 code thus any features subsequent of this version will have issues

Signed-off-by: Brian Flores <[email protected]>
@ryanbogan
Copy link
Member

I think you need to add Locale.ROOT as the first argument in String.format to pass the forbidden APIs check.

i.e.
https://github.com/opensearch-project/neural-search/blob/main/src/main/java/org/opensearch/neuralsearch/search/query/HybridCollectorManager.java#L319-L323

@brianf-aws
Copy link
Contributor Author

I think you need to add Locale.ROOT as the first argument in String.format to pass the forbidden APIs check.

Hey @ryanbogan thanks for letting me know I guess I'm forming a bad habit of not running build and just checking whether it passes UT and compiles.

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.

3 participants