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

Register sun.security.provider.NativePRNG#<init> for reflection #42099

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

zakkak
Copy link
Contributor

@zakkak zakkak commented Jul 24, 2024

When instantiating a SecureRandom the constructor reflectively looks for
the NativePRNG constructor and invokes it
.

Although the lookup succeeds without the explicit registration, it's
better to explicitly request it. This also prevents getting a
MissingRegistrationError when using
-H:+ThrowMissingRegistrationErrors or --exact-reachability-metadata.

Relates to #41995

@quarkus-bot

This comment has been minimized.

When instantiating a SecureRandom the constructor reflectively looks for
the NativePRNG constructor and invokes it.

Although the lookup succeeds without the explicit registration, it's
better to explicitly request it. This also prevents getting a
`MissingRegistrationError` when using
`-H:+ThrowMissingRegistrationErrors` or `--exact-reachability-metadata`.

Relates to quarkusio#41995
@zakkak zakkak force-pushed the 2024-07-24-fix-secureRandom-init branch from a22461c to 0e8f9cd Compare July 24, 2024 10:14
@zakkak zakkak added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jul 24, 2024
@zakkak zakkak force-pushed the 2024-07-24-fix-secureRandom-init branch from acc264f to 0e8f9cd Compare July 24, 2024 12:03
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 24, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 0e8f9cd.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ JVM Tests - JDK 21

📦 extensions/smallrye-reactive-messaging/deployment

io.quarkus.smallrye.reactivemessaging.hotreload.ConnectorChangeTest.testUpdatingConnector - History

  • Expecting actual: ["-4","-5","-6","-7","-8","-9","-10","-11"] to start with: ["-3", "-4", "-5", "-6"] - java.lang.AssertionError
java.lang.AssertionError: 

Expecting actual:
  ["-4","-5","-6","-7","-8","-9","-10","-11"]
to start with:
  ["-3", "-4", "-5", "-6"]

	at io.quarkus.smallrye.reactivemessaging.hotreload.ConnectorChangeTest.testUpdatingConnector(ConnectorChangeTest.java:36)
  • Expecting actual: ["-3","-5","-6","-7","-8","-9","-10","-11"] to start with: ["-3", "-4", "-5", "-6"] - java.lang.AssertionError
java.lang.AssertionError: 

Expecting actual:
  ["-3","-5","-6","-7","-8","-9","-10","-11"]
to start with:
  ["-3", "-4", "-5", "-6"]

	at io.quarkus.smallrye.reactivemessaging.hotreload.ConnectorChangeTest.testUpdatingConnector(ConnectorChangeTest.java:36)

⚙️ Native Tests - HTTP

📦 integration-tests/rest-client-reactive

io.quarkus.it.rest.client.BasicTestIT.shouldCreateClientSpans - History

  • expected: <1> but was: <2> - org.opentest4j.AssertionFailedError
org.opentest4j.AssertionFailedError: expected: <1> but was: <2>
	at io.quarkus.it.rest.client.BasicTest.shouldCreateClientSpans(BasicTest.java:216)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestMethod(QuarkusTestExtension.java:812)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

@gsmet gsmet merged commit 8a19237 into quarkusio:main Jul 25, 2024
98 of 101 checks passed
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jul 25, 2024
@quarkus-bot quarkus-bot bot added this to the 3.14 - main milestone Jul 25, 2024
@zakkak zakkak deleted the 2024-07-24-fix-secureRandom-init branch July 25, 2024 07:00
@gsmet gsmet modified the milestones: 3.14 - main, 3.13.1 Aug 1, 2024
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