sdmxdatacube/src/java/org/datalift/sdmxdatacube/SDMXDataCubeController.java
Method validate
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
Open
private MessageTransporter validate(String project, String source,
String dest_graph_uri, String dest_title, boolean vizualisation) {
MessageTransporter transporter = new MessageTransporter();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method validate
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private MessageTransporter validate(String project, String source,
String dest_graph_uri, String dest_title, boolean vizualisation) {
MessageTransporter transporter = new MessageTransporter();
Method doSubmit
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@POST
@Path("/")
@Consumes(MediaTypes.APPLICATION_FORM_URLENCODED)
@Produces(MediaTypes.TEXT_PLAIN)
public Response doSubmit(@FormParam("project") String project,
Method doSubmit
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public Response doSubmit(@FormParam("project") String project,
@FormParam("source") String source,
@FormParam("dest_title") String dest_title,
@FormParam("dest_graph_uri") String dest_graph_uri,
@FormParam("vizualisation") boolean vizualisation)
Method validate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private MessageTransporter validate(String project, String source,
String dest_graph_uri, String dest_title, boolean vizualisation) {
Method doValidate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public Response doValidate(@FormParam("project") String project,
@FormParam("source") String source,
@FormParam("dest_title") String dest_title,
@FormParam("dest_graph_uri") String dest_graph_uri,
@FormParam("vizualisation") boolean vizualisation)