jnidzwetzki/bitfinex-v2-wss-api-java

View on GitHub

Showing 53 of 126 total issues

Avoid too many return statements within this method.
Open

        return true;

    Avoid too many return statements within this method.
    Open

                return false;

      Avoid too many return statements within this method.
      Open

                      return false;

        Avoid too many return statements within this method.
        Open

                        return false;

          Avoid too many return statements within this method.
          Open

                      return false;

            Avoid too many return statements within this method.
            Open

                            return false;

              Avoid too many return statements within this method.
              Open

                      return true;

                Avoid too many return statements within this method.
                Open

                                return false;

                  Avoid too many return statements within this method.
                  Open

                              return false;

                    Avoid too many return statements within this method.
                    Open

                            return true;

                      Method handleChannelData has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          @Override
                          public void handleChannelData(final String action, final JSONArray jsonArray) throws BitfinexClientException {
                              try {
                                  final List<BitfinexExecutedTrade> trades = new ArrayList<>();
                      
                      

                      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 acceptConnectionStateChange has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public void acceptConnectionStateChange(final BitfinexConnectionStateEnum event) {
                              connectionStateConsumers.forEach(consumer -> consumer.accept(event));
                              if (event == BitfinexConnectionStateEnum.CONNECTION_SUCCESS || event == BitfinexConnectionStateEnum.RECONNECTION_SUCCESS) {
                                  connectionSuccessConsumers.forEach(Runnable::run);
                              } else if (event == BitfinexConnectionStateEnum.CONNECTION_FAILED || event == BitfinexConnectionStateEnum.RECONNECTION_FAILED) {

                      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 equals has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          @Override
                          public boolean equals(Object o) {
                              if (this == o) return true;
                              if (o == null || getClass() != o.getClass()) return false;
                              BitfinexOrderBookSymbol that = (BitfinexOrderBookSymbol) o;

                      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

                      Severity
                      Category
                      Status
                      Source
                      Language