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

TASK-944 #60

Merged
merged 4 commits into from
Jun 15, 2022
Merged

TASK-944 #60

merged 4 commits into from
Jun 15, 2022

Conversation

juanfeSanahuja
Copy link
Member

TASK-950

@juanfeSanahuja
Copy link
Member Author

Task linked: TASK-944 Create a new Meta web service

@sonarcloud
Copy link

sonarcloud bot commented Jun 2, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell B 14 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link
Member

@pfurio pfurio left a comment

Choose a reason for hiding this comment

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

I would remove the org.json dependency. I don't think it is necessary.

@@ -62,5 +62,11 @@
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need this dependency, do we?

Assert.assertTrue(isJSONValid(dataFieldDocJSON));
}

public boolean isJSONValid(String test) {
Copy link
Member

Choose a reason for hiding this comment

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

This could be checked using ObjectMapper library instead. Something like:
ObjectMapper objectMapper = new ObjectMapper(); Map map = objectMapper.readValue(test, Map.class);
If the parsing works, the json is valid.

PRIMITIVE_VALUES.put(int.class, "0");
PRIMITIVE_VALUES.put(long.class, "0.0");
PRIMITIVE_VALUES.put(short.class, "0");

Copy link
Member

Choose a reason for hiding this comment

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

Remove empty lines

@imedina imedina merged commit 67e04e7 into develop Jun 15, 2022
@imedina imedina deleted the TASK-944 branch June 15, 2022 00:26
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