Skip to content

missing null check during TestUtils initialization #3863

@rabbah

Description

@rabbah

in this method https://github.com/apache/incubator-openwhisk/blob/37ce9b86048dafb0f369a5a5b05caa0136a26ef4/tests/src/test/scala/common/WhiskProperties.java#L297 there's a missing null check:

public static File getVCAPServicesFile() {
        String vcapServices = whiskProperties.getProperty("vcap.services.file");
        if (vcapServices.startsWith(File.separator)) {
            return new File(vcapServices);
        } else {
            return WhiskProperties.getFileRelativeToWhiskHome(vcapServices);
        }
    }

@jasonpet the vcap property does not appear to be used anymore in this repo:

https://github.com/apache/incubator-openwhisk/blob/9e5cec1f0e4b98c59e584d453b06a741be4a8c3b/tests/src/test/scala/common/TestUtils.java#L79

(per git blame f9b4f48) is this used in the providers only now - if so i'm wondering if we can move it this code out.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions