Related questions
Tools to detect duplicated code (Java)
I am in a project where previous programmers have been copy-pasting codes all over the place. These codes are actually identical (or very similar) and they could have been refactored into one.
I have spent countless hours refactoring these codes …
Either log or rethrow this exception
Possible duplicate of Sonar complaining about logging and rethrowing the exception.
This is my code in a class:
try
{
this.processDeepLinkData(data);
}
catch (final Exception e)
{
// Error while parsing data
// Nothing we can do
Logger.error(TAG, "Exception thrown on …
How to sanitize and validate user input to pass a Checkmarx scan
I have an endpoint that receives a String from the client as seen below:
@GET
@Path("/{x}")
public Response doSomething(@PathParam("x") String x) {
String y = myService.process(x);
return Response.status(OK).entity(y).build();
}
Checkmarx complains that this …