Skip to content

fixing issues found with spotbugs#47

Merged
SomkaPe merged 12 commits intodevfrom
somkape/codeCleaning
Jun 5, 2019
Merged

fixing issues found with spotbugs#47
SomkaPe merged 12 commits intodevfrom
somkape/codeCleaning

Conversation

@SomkaPe
Copy link
Copy Markdown
Contributor

@SomkaPe SomkaPe commented Jun 1, 2019

pom.xml - removing unused dependencies, adding scope "test" to test dependencies, removing profiles,
changing find bugs plugin to spot bugs (find bugs is not maintained any more), formatting

fixing some issues found with spot bugs:

  • exposure of mutable fields in immutable objects
  • relaying of default encoding - specifying UTF-8 explicitly
  • having reference to non Serializable object in Serializable one (AuthenticationResult)
  • fixing bug with incorrect calculation of base64EncodedSha256Hash in hashPii function
  • fixing integration tests config
  • fixing compliance warning

@SomkaPe SomkaPe requested review from henrik-me and sangonzal June 1, 2019 00:58
</executions>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
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.

com.github.spotbugs [](start = 25, length = 19)

did you validate that we can use this? Also assuming there is automatic component governance setup for this project? Otherwise pls. ensure this component is properly registered and removed components are de-registered.

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.

it is plugin - dev tool, yes automatic governance is set up

@NonNull
private char[] password;

public char[] password(){
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.

password [](start = 18, length = 8)

ClonePassword?

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.

to keep it immutable we should not expose internal representation which is array, so mutable

Copy link
Copy Markdown
Contributor

@sangonzal sangonzal left a comment

Choose a reason for hiding this comment

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

Good improvements. Current PR is set to be merged to Master branch - should be Dev instead

<version>3.5</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
Copy link
Copy Markdown
Contributor

@sangonzal sangonzal Jun 3, 2019

Choose a reason for hiding this comment

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

Guava was added because of the selenium tests: SeleniumHQ/selenium#3880. Please make sure integration tests still work both locally and on Azure Devops

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.

i have fixed some issued with integ tests, like usage of wrong redirect url(wrong port) and test with device code flow, but one test failing - acquireTokenWithAuthorizationCode_B2C_Google - it was never successfully executed on azure devops

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.

The B2C_Google test failing on Azure Devops is probably due to Google flagging the test account for "suspicious activity" since the request is coming from completely different place/different IP. When this happens, they ask you to change the password. I'm not sure if there is much that we can do there.

@SomkaPe SomkaPe changed the base branch from master to dev June 3, 2019 23:07
Copy link
Copy Markdown
Contributor

@sangonzal sangonzal left a comment

Choose a reason for hiding this comment

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

:shipit:

throw new RuntimeException("Could not start TCP listener");
}
runSeleniumAutomatedLogin(labUserData, authorityType);
String page = seleniumDriver.getPageSource();
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.

Doesn't seem to be used anywhere.

@SomkaPe SomkaPe merged commit d29955e into dev Jun 5, 2019
@SomkaPe SomkaPe deleted the somkape/codeCleaning branch June 6, 2019 01:42
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