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

Fix some typos on code and javadoc on maven devtool project #36320

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

bmscomp
Copy link
Contributor

@bmscomp bmscomp commented Oct 5, 2023

This pull request is to fix some typos on java doc and java method name and some minor cleanup

  • fix typo on java doc
  • fix typo in java method getProjectDeployer
  • remove unnecessary final keyword on static method
  • favorite the usage of method reference over lambda expression

@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/maven labels Oct 5, 2023
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

Most of the changes are for the better, thanks! But I have a question on one of them.

.filter(n -> Arrays.stream(Deployer.values()).anyMatch(e -> e.equals(n)))
.filter(n -> Arrays.stream(Deployer.values()).anyMatch(e -> false))
Copy link
Member

Choose a reason for hiding this comment

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

Could you explain this particular change?

Copy link
Contributor Author

@bmscomp bmscomp Oct 6, 2023

Choose a reason for hiding this comment

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

Thanks so much @gsmet for the review, I can say that Result of 'e.equals(n)' is always 'false' for the reason that ‘equals' between objects of inconvertible types 'Deployer' and 'String’, So I made this shortcut

I think this class deserves to write a test for it’s own

Please let me know if I missed something with that, I can rollback this change the time to have some tests for Deployer enum

Copy link
Member

@gsmet gsmet Oct 6, 2023

Choose a reason for hiding this comment

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

Hum. This is a bug, and not a pretty one. I recommend you keep it the way it is for now (i.e. get back to the previous buggy behavior) and we will address it in a follow-up PR as we need to discuss it.

@iocanel I think you wanted to either compare with e.name() or e.extension. I'm not completely sure about the fix as I'm a bit unsure of how you handle knative. I don't see an extension for it so I suppose you would have kubernetes instead and that knative can't really be identified this way?

If so, it might be better to drop .map(d -> strip(d.getArtifactId())) entirely and compare on the extension rather than the name.

I will let you have a look.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gsmet, @iocanel I made a change on the last commit for this pull request on the related instruction, please let me know if you think it can be ok as a first try, I am ready to change it again to fit the desired solution, and on that topic I am in need of your help

.filter(n -> Arrays.stream(Deployer.values()).anyMatch(e -> e.extension.equals(n)))

Thanks

@gsmet gsmet changed the title MINOR: Fix some typos on code and javadoc on maven devtool project Fix some typos on code and javadoc on maven devtool project Oct 6, 2023
@@ -79,7 +79,7 @@ public static Set<String> getProjectDeployer(MavenProject project) {
return project.getDependencies().stream()
.filter(d -> QUARKUS_GROUP_ID.equals(d.getGroupId()))
.map(d -> strip(d.getArtifactId()))
.filter(n -> Arrays.stream(Deployer.values()).anyMatch(e -> false))
.filter(n -> Arrays.stream(Deployer.values()).anyMatch(e -> e.extension.equals(n)))
Copy link
Member

Choose a reason for hiding this comment

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

This is more complex than that. At the minimum, the .map(d -> strip(d.getArtifactId())) needs to be removed.

I created #36325 for @iocanel to have a closer look as I'm not entirely sure what's the right fix.

I would recommend to just revert the changes related to that so that we can get this merged as it might take some time for Ioannis to have a closer look at this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gsmet I made revert, to keep the existing behaviour on the last commit

@bmscomp bmscomp force-pushed the code/some_code_cleanups branch from 3c73d37 to e56277f Compare October 6, 2023 13:27
@gsmet gsmet force-pushed the code/some_code_cleanups branch from 7b0f6ce to 6a2c652 Compare October 16, 2023 14:59
@gsmet
Copy link
Member

gsmet commented Oct 16, 2023

Thanks! I adjusted one small thing and squashed the commits. Let's wait for CI and merge.

@quarkus-bot

This comment has been minimized.

@iocanel iocanel self-requested a review October 17, 2023 07:12
Copy link
Contributor

@iocanel iocanel left a comment

Choose a reason for hiding this comment

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

LGTM

@gsmet gsmet force-pushed the code/some_code_cleanups branch from 6a2c652 to 791b933 Compare June 10, 2024 07:55
Copy link

quarkus-bot bot commented Jun 10, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 791b933.

✅ 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

📦 integration-tests/reactive-messaging-kafka

io.quarkus.it.kafka.KafkaConnectorTest.testFruits - History

  • Assertion condition defined as a Lambda expression in io.quarkus.it.kafka.KafkaConnectorTest expected: <6> but was: <5> within 10 seconds. - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Assertion condition defined as a Lambda expression in io.quarkus.it.kafka.KafkaConnectorTest expected: <6> but was: <5> within 10 seconds.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1006)
	at org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:790)
	at io.quarkus.it.kafka.KafkaConnectorTest.testFruits(KafkaConnectorTest.java:63)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)

@gsmet gsmet merged commit 8e176a2 into quarkusio:main Jun 11, 2024
51 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.12 - main milestone Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/maven triage/flaky-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants