Skip to content

Casting error in 7.4.1 when processing nonProxyHosts configuration #297

@cula011

Description

@cula011

Still having an issue with proxy settings, now in 7.4.1. It looks to be getting further since #291 was resolved, but now it is failing with the following:

Execution failed for task ':service:dependencyCheckAnalyze'.
> Cannot cast object 'localhost|127.0.0.1' with class 'java.lang.String' to class 'java.util.List'`

Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'localhost|127.0.0.1|192.168.1.1' with class 'java.lang.String' to class 'java.util.List'
        at org.owasp.dependencycheck.gradle.extension.ProxyExtension.setProperty(ProxyExtension.groovy)
        at org.owasp.dependencycheck.gradle.tasks.ConfiguredTask.configureProxy(ConfiguredTask.groovy:204)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

It seems it is trying to assign a String to a List<String>:

See target:

Looking at the history, it was previously fetching the nonProxyHosts differently, which was returning a List<Pattern>:

Now, It is simply fetching a single String:

String nonProxyHosts = System.getProperty("https.nonProxyHosts", System.getProperty("http.nonProxyHosts"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions