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

Improve BytecodeRecorderImpl error message #17317

Merged
merged 1 commit into from
May 18, 2021

Conversation

gsmet
Copy link
Member

@gsmet gsmet commented May 18, 2021

When getter type and setter type do not match, provide a better error
message with as much information as possible.

This is related to #16954 .

@gsmet gsmet requested a review from geoand May 18, 2021 11:28
@gsmet gsmet added the triage/waiting-for-ci Ready to merge when CI successfully finishes label May 18, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented May 18, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 89cef88

Status Name Step Test failures Logs Raw logs
JVM Tests - JDK 11 Build Test failures Logs Raw logs
JVM Tests - JDK 11 Windows Build Test failures Logs Raw logs
JVM Tests - JDK 16 Build Test failures Logs Raw logs
Maven Tests - JDK 11 Build Test failures Logs Raw logs
Maven Tests - JDK 11 Windows Build Test failures Logs Raw logs

Full information is available in the Build summary check run.

Test Failures

⚙️ JVM Tests - JDK 11 #

📦 core/deployment

io.quarkus.deployment.recording.BytecodeRecorderTestCase.testRecordableConstructor line 288 - More details - Source on GitHub


⚙️ JVM Tests - JDK 11 Windows #

📦 core/deployment

io.quarkus.deployment.recording.BytecodeRecorderTestCase.testRecordableConstructor line 288 - More details - Source on GitHub


⚙️ JVM Tests - JDK 16 #

📦 core/deployment

io.quarkus.deployment.recording.BytecodeRecorderTestCase.testRecordableConstructor line 288 - More details - Source on GitHub


⚙️ Maven Tests - JDK 11 #

📦 integration-tests/maven

io.quarkus.maven.it.FastJarQuarkusIntegrationTestIT.testFastJar - More details - Source on GitHub

io.quarkus.maven.it.LegacyJarQuarkusIntegrationTestIT.testFastJar - More details - Source on GitHub

io.quarkus.maven.it.UberJarQuarkusIntegrationTestIT.testFastJar - More details - Source on GitHub

📦 integration-tests/maven/target/test-classes/projects/qit-fast-jar

org.acme.reactive.routes.RouteTest.testDeclarativeRoutes - More details - Source on GitHub

📦 integration-tests/maven/target/test-classes/projects/qit-legacy-jar

org.acme.reactive.routes.RouteTest.testDeclarativeRoutes - More details - Source on GitHub

📦 integration-tests/maven/target/test-classes/projects/qit-uber-jar

org.acme.reactive.routes.RouteTest.testDeclarativeRoutes - More details - Source on GitHub


⚙️ Maven Tests - JDK 11 Windows #

📦 integration-tests/maven

io.quarkus.maven.it.FastJarQuarkusIntegrationTestIT.testFastJar - More details - Source on GitHub

io.quarkus.maven.it.LegacyJarQuarkusIntegrationTestIT.testFastJar - More details - Source on GitHub

io.quarkus.maven.it.UberJarQuarkusIntegrationTestIT.testFastJar - More details - Source on GitHub

📦 integration-tests/maven/target/test-classes/projects/qit-fast-jar

org.acme.reactive.routes.RouteTest.testDeclarativeRoutes - More details - Source on GitHub

📦 integration-tests/maven/target/test-classes/projects/qit-legacy-jar

org.acme.reactive.routes.RouteTest.testDeclarativeRoutes - More details - Source on GitHub

📦 integration-tests/maven/target/test-classes/projects/qit-uber-jar

org.acme.reactive.routes.RouteTest.testDeclarativeRoutes - More details - Source on GitHub

if (ctorParamIndex == null
&& i.getReadMethod().getReturnType() != i.getWriteMethod().getParameterTypes()[0]) {
Class<?> getterReturnType = i.getReadMethod().getReturnType();
Class<?> setterParameterType = i.getWriteMethod().getParameterTypes()[0];
Copy link
Contributor

@geoand geoand May 18, 2021

Choose a reason for hiding this comment

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

CI seems to indicate that you need to be more defensive in these.
I am assuming it used to work because the expression was short-circuited by the first check in the if statement

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I'm already working on it.

When getter type and setter type do not match, provide a better error
message with as much information as possible.
@gsmet gsmet force-pushed the improve-bytecoderecorder-error-message branch from 89cef88 to ac5ea4e Compare May 18, 2021 12:47
@famod famod merged commit 7e70628 into quarkusio:main May 18, 2021
@quarkus-bot quarkus-bot bot added this to the 2.0 - main milestone May 18, 2021
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label May 18, 2021
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