Skip to content

CfService.getVolumes() is package private and not accessible outside of the io.pivotal.cfenv.core package. #286

@KaiHofstetter

Description

@KaiHofstetter

Describe the bug

I'm trying the read the volumes as described in the README:

CfEnv cfEnv = new CfEnv();
List<CfVolume> cfVolumes = cfEnv.findServiceByName("nfs1").getVolumes();
String path = cfVolumes.get(0).getPath();

Unfortunately, the CfService.getVolumes() method is package private and is not accessible outside of the io.pivotal.cfenv.core package.

public class CfService {
...
	List<CfVolume> getVolumes() {
		return cfVolumes;
	}
...
}

(see CfService)

I assume this is a bug.

Furthermore, the cfVolumes.get(0).getPath(); returns a Path object and not a String, as shown in the README example.

I would be happy to provide a PR to fix this.

Reproduction steps

Try to compile the example in the README:

CfEnv cfEnv = new CfEnv();
List<CfVolume> cfVolumes = cfEnv.findServiceByName("nfs1").getVolumes();
String path = cfVolumes.get(0).getPath();

Expected behavior

CfService.getVolumes() is public:

public class CfService {
...
	public List<CfVolume> getVolumes() {
		return cfVolumes;
	}
...
}

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions