cs-couchbase/src/main/java/io/cloudslang/content/couchbase/utils/InputsUtil.java
Method getHttpClientInputs
has 17 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static HttpClientInputs getHttpClientInputs(String username, String password, String proxyHost, String proxyPort,
String proxyUsername, String proxyPassword, String trustAllRoots,
String x509HostnameVerifier, String trustKeystore, String trustPassword,
String keystore, String keystorePassword, String connectTimeout,
String socketTimeout, String useCookies, String keepAlive, String method) {
Method getHttpClientInputs
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static HttpClientInputs getHttpClientInputs(String username, String password, String proxyHost, String proxyPort,
String proxyUsername, String proxyPassword, String trustAllRoots,
String x509HostnameVerifier, String trustKeystore, String trustPassword,
String keystore, String keystorePassword, String connectTimeout,
String socketTimeout, String useCookies, String keepAlive, String method) {
Method getEnumValidValuesString
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
public static <T extends Enum<T>> String getEnumValidValuesString(Class<T> inputEnum) {
StringBuilder sb = new StringBuilder();
for (T enumValue : inputEnum.getEnumConstants()) {
if (AuthType.class.getCanonicalName().equalsIgnoreCase(enumValue.getClass().getCanonicalName())) {
sb.append(((AuthType) enumValue).getValue()).append(COMMA).append(BLANK_SPACE);
- 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 getHttpClientInputs
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
public static HttpClientInputs getHttpClientInputs(String username, String password, String proxyHost, String proxyPort,
String proxyUsername, String proxyPassword, String trustAllRoots,
String x509HostnameVerifier, String trustKeystore, String trustPassword,
String keystore, String keystorePassword, String connectTimeout,
String socketTimeout, String useCookies, String keepAlive, String method) {
- 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"