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

PM-837 env variables grouped in single string #116

Draft
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

andrearovere
Copy link
Contributor

List of Changes

Environment variables for clients grouped in a single string

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Link to story

@andrearovere andrearovere requested review from a team July 27, 2022 09:42
Copy link
Contributor

@alessandrodossi alessandrodossi left a comment

Choose a reason for hiding this comment

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

@andrearovere maven build of this branch fails: JUnit tests should be updated too

configsMap.put(TAG, listConfig.get(2));
configsMap.put(TOKEN, listConfig.get(3));

configValues = configsMap;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why 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.

Init of the Map

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I meant:
if (!MapUtils.isEmpty(configValues)) { return; }
this fragment evaluates private Map<String, String> configValues; which is a private local variable and is always empty before evaluation, since you are using this method as first statement in each callers.
Thus, your code should always hit that "return:" and skip the instantiation.

Anyway, I don't get this statement either:
configValues = configsMap;
why should it be needed?

configsMap.put(TAG, listConfig.get(2));
configsMap.put(TOKEN, listConfig.get(3));

configValues = configsMap;
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I meant:
if (!MapUtils.isEmpty(configValues)) { return; }
this fragment evaluates private Map<String, String> configValues; which is a private local variable and is always empty before evaluation, since you are using this method as first statement in each callers.
Thus, your code should always hit that "return:" and skip the instantiation.

Anyway, I don't get this statement either:
configValues = configsMap;
why should it be needed?

andrearovere and others added 3 commits July 29, 2022 11:52
…hub.com/pagopa/pagopa-payment-transactions-gateway into PM-837-environment-variables-retrieving

# Conflicts:
#	src/main/java/it/pagopa/pm/gateway/client/bpay/BancomatPayClient.java
#	src/test/java/it/pagopa/pm/gateway/client/BPayClientTests.java
@alessandrodossi
Copy link
Contributor

These changes need to be tested in local environment before deploying them in SIT

@alessandrodossi alessandrodossi marked this pull request as draft July 29, 2022 15:52
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