Sitelet https://github.com/corda/samples-java/pull/82
Skip to content

ENT-6871: Clean up & apply formatting to Java tutorial-applestamp - #82

Merged
r3hj merged 1 commit into
masterfrom
hjkim/ent-6871/clean-up-java-tutorial-applestamp
Jul 15, 2022
Merged

r3hj merged 1 commit into
masterfrom
hjkim/ent-6871/clean-up-java-tutorial-applestamp

Conversation

@r3hj

@r3hj r3hj commented Jul 14, 2022

Copy link
Copy Markdown
Contributor

Overview / Changes

Removed unused imports and applied formatting to tutorial-applestamp Java sample project.

This clean-up is done as part of improving Corda 4.9 tutorial document and its scope is limited to tutorial-applestamp.

Note: Intellij auto-formatting feature (both for imports and logic) is used. Though it doesn't always provide the best formatting, in most cases it gives a better and consistent formatting.

Test

No logic change. Ran ./gradlew build and verified it succeeded.

Removed unused imports and applied formatting.
@r3hj
r3hj requested review from adelel1 and peterli-r3 July 14, 2022 12:54
public interface Commands extends CommandData {
//In our hello-world app, We will have two commands.
class Issue implements AppleStampContract.Commands {}
class Issue implements AppleStampContract.Commands {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Though it's done by Intellij auto-formatting, {} looks good to me too. Please let me know if this shouldn't be changed. I'll revert it.

public interface Commands extends CommandData {
//In our hello-world app, We will only have one command.
class Send implements Commands {}
class Send implements Commands {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same here. If preferred the original format, I'll revert it.

import net.corda.core.transactions.LedgerTransaction;
import org.jetbrains.annotations.NotNull;

import static net.corda.core.contracts.ContractsDSL.requireThat; //Domain Specific Language

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If the comment is intended and might be useful, I'll add it back.

@adelel1 adelel1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@r3hj
r3hj merged commit cd2b41b into master Jul 15, 2022
@r3hj
r3hj deleted the hjkim/ent-6871/clean-up-java-tutorial-applestamp branch July 15, 2022 09:28
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.

3 participants