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

701: Java quickstarts cleanup: #702

Merged
merged 2 commits into from
Jul 12, 2022
Merged

701: Java quickstarts cleanup: #702

merged 2 commits into from
Jul 12, 2022

Conversation

bibryam
Copy link
Contributor

@bibryam bibryam commented Jul 8, 2022

Signed-off-by: Bilgin Ibryam bibryam@gmail.com

Description

  • Removed unused imports
  • Code style: add space after statements
  • Removed unused test code
  • Moved Dapr client creation outside of loops
  • Update dapr-sdk versions to 1.5
  • Added Maven artifact name and description where missing
  • Aligned Maven artifact names to camel case

Issue reference

#701

Please reference the issue this PR will close: #[701]

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • The quickstart code compiles correctly
  • You've tested new builds of the quickstart if you changed quickstart code
  • You've updated the quickstart's README if necessary
  • If you have changed the steps for a quickstart be sure that you have updated the automated validation accordingly. All of our quickstarts have annotations that allow them to be executed automatically as code. For more information see mechanical-markdown. For user guide with examples see Examples.

- Removed unused imports
- Code style: add space after statements
- Removed unused test code
- Moved Dapr client creation outside of loops
- Update dapr-sdk versions to 1.5
- Added Maven artifact name and description where missing
- Aligned Maven artifact names to camel case

Signed-off-by: Bilgin Ibryam <bibryam@gmail.com>
@bibryam
Copy link
Contributor Author

bibryam commented Jul 10, 2022

These code changes also require changes in the docs. The corresponding PR in the docs is here docs/pull/2639

Copy link
Contributor

@paulyuk paulyuk left a comment

Choose a reason for hiding this comment

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

Thank you much @bibryam -- this brings good idiomatic changes for Java. There's just one minor change suggested and then I'll take it.

<name>OrderProcessingService</name>
<description>Demo for Dapr pubsub component</description>
<name>BatchProcessingService</name>
<description>Quickstart for Dapr Bingings building block</description>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<description>Quickstart for Dapr Bingings building block</description>
<description>Quickstart for Dapr Bindings building block</description>

Copy link
Contributor

Choose a reason for hiding this comment

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

minor typo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, this is fixed now. Notice also the related quickstart docs PR in the docs project :)

"}");

return mapper.readValue(json, Orders.class);
try (InputStream is = getClass().getClassLoader().getResourceAsStream(path)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

removing mock is ok. I agree with this.

@@ -14,11 +14,11 @@ public class CheckoutServiceApplication {
public static void main(String[] args) throws InterruptedException{
String TOPIC_NAME = "orders";
String PUBSUB_NAME = "orderpubsub";
DaprClient client = new DaprClientBuilder().build();
Copy link
Contributor

Choose a reason for hiding this comment

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

good catch. thank you.

Signed-off-by: Bilgin Ibryam <bibryam@gmail.com>
Copy link
Contributor

@paulyuk paulyuk left a comment

Choose a reason for hiding this comment

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

LGTM. thank you for this @bibryam !

@paulyuk paulyuk merged commit f80a675 into dapr:master Jul 12, 2022
@bibryam bibryam deleted the cleanup-java branch July 13, 2022 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants