Skip to content

Mediator. Minor changes; Strategy. Major changes #6

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

Merged
merged 4 commits into from
Jun 14, 2018

Conversation

oleh-liskovych
Copy link
Contributor

No description provided.

@@ -35,7 +35,7 @@ public void collectPaymentDetails() {
System.out.print("Enter password: ");
password = READER.readLine();
if (verify()) {
System.out.println("Data verification was successful");
System.out.println("Data verification has succeeded");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

to match success message in Demo class

Copy link
Contributor

@neochief neochief Jun 14, 2018

Choose a reason for hiding this comment

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

Then it should be "has been". Can you please fix it there too?

UPD: Nevermind, I'll do it myself.

@@ -59,7 +59,7 @@ public static void main(String[] args) throws IOException {
// пользовательских данных, конфигурации и прочих параметров.
if (paymentMethod.equals("1")) {
strategy = new PayByPayPal();
} else if (paymentMethod.equals("2")) {
} else {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

to prevent null pointer exception if value is not 1 or 2

@@ -71,20 +71,20 @@ public static void main(String[] args) throws IOException {
// т.к. только стратегии знают какие данные им нужны для приёма
// оплаты.
order.processOrder(strategy);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved this code inside while loop

@oleh-liskovych oleh-liskovych changed the title Mediator. Minor changes Mediator. Minor changes; Strategy. Major changes Jun 13, 2018
@@ -35,7 +35,7 @@ public void collectPaymentDetails() {
System.out.print("Enter password: ");
password = READER.readLine();
if (verify()) {
System.out.println("Data verification was successful");
System.out.println("Data verification has succeeded");
Copy link
Contributor

@neochief neochief Jun 14, 2018

Choose a reason for hiding this comment

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

Then it should be "has been". Can you please fix it there too?

UPD: Nevermind, I'll do it myself.

@neochief neochief merged commit e4ae2d7 into RefactoringGuru:master Jun 14, 2018
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.

2 participants