-
Notifications
You must be signed in to change notification settings - Fork 26
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
Conversation
Task linked: TASK-944 Create a new Meta web service |
SonarCloud Quality Gate failed. |
There was a problem hiding this 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.
commons-lib/pom.xml
Outdated
@@ -62,5 +62,11 @@ | |||
<artifactId>slf4j-simple</artifactId> | |||
<scope>test</scope> | |||
</dependency> | |||
<dependency> |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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"); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove empty lines
TASK-950