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

Datajck4 #89

Merged
merged 6 commits into from
Sep 10, 2018
Merged

Datajck4 #89

merged 6 commits into from
Sep 10, 2018

Conversation

clicman
Copy link
Member

@clicman clicman commented Sep 8, 2018

  • Update to datajack-4.0.2
  • Do not fetch all providers by default. Add dependency to the final project only.

Copy link

@sbtqasonar sbtqasonar left a comment

Choose a reason for hiding this comment

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

SonarQube analysis found issues:
Bug Bugs: 1
Vulnerability Vulnerabilities: 0
Code Smell Code Smells: 2

See all issues in SonarCloud

Copy link

@sbtqasonar sbtqasonar left a comment

Choose a reason for hiding this comment

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

SonarQube analysis found issues:
Bug Bugs: 1
Vulnerability Vulnerabilities: 0
Code Smell Code Smells: 1

See all issues in SonarCloud

try {
return (List<Tag>) FieldUtils.readField(scenarioDefinition, "tags", true);
} catch (IllegalArgumentException | IllegalAccessException e) {
return new ArrayList<>();

Choose a reason for hiding this comment

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

R we gonna mutate this one? If no I suggest to use Collections.EMPTY_LIST to avoid memory allocation

String parsedValue = DataFactory.getInstance().get(dataPath).getValue();
replacedStep = replacedStep.replace(stepDataMatcher.start(3) - 1 + offset, stepDataMatcher.end(3) + offset, parsedValue);
offset += parsedValue.length() - 1 - value.length();
String builtPath = collection == null ? "$" + value : "$" + collection + value;

Choose a reason for hiding this comment

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

"$" + (collection == null ? "" : collection) + value

@sbtqa sbtqa deleted a comment from clicman Sep 10, 2018
@sbtqa sbtqa deleted a comment from clicman Sep 10, 2018
Copy link

@sbtqasonar sbtqasonar left a comment

Choose a reason for hiding this comment

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

SonarQube analysis found issues:
Bug Bugs: 1
Vulnerability Vulnerabilities: 0
Code Smell Code Smells: 2

See all issues in SonarCloud

dataFolder,
initialCollection
);
break;
case "mongo":
testDataProvider = initProvider(PROVIDERS.MONGO_DATA_PROVIDER,
new MongoClient(new MongoClientURI(Props.get("data.uri"))).getDB("data.db"),

Choose a reason for hiding this comment

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

Code Smell Code Smell: Remove this use of "getDB"; it is deprecated. (squid:CallToDeprecatedMethod)

See it in SonarCloud

try {
return (List<Tag>) FieldUtils.readField(scenarioDefinition, "tags", true);
} catch (IllegalArgumentException | IllegalAccessException e) {
return Collections.EMPTY_LIST;

Choose a reason for hiding this comment

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

Code Smell Code Smell: Replace "Collections.EMPTY_LIST" by "Collections.emptyList()". (squid:S1596)

See it in SonarCloud

dataFolder,
initialCollection
);
break;
case "mongo":
testDataProvider = initProvider(PROVIDERS.MONGO_DATA_PROVIDER,
new MongoClient(new MongoClientURI(Props.get("data.uri"))).getDB("data.db"),

Choose a reason for hiding this comment

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

Bug Bug: Use try-with-resources or close this "MongoClient" in a "finally" clause. (squid:S2095)

See it in SonarCloud

@clicman clicman merged commit 2c568ab into master Sep 10, 2018
@clicman clicman deleted the datajck4 branch September 10, 2018 04:14
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

3 participants