#vulnerable code 
                                @Override
    public InputStream getData(String resourceId) throws IOException {
        LoadableResource load = this.resources.get(resourceId);
        if (Objects.nonNull(load)) {
            load.getDataStream();
        }
        throw new IllegalArgumentException("No such resource: " + resourceId);
    } 
                            #location 5 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Override
    public InputStream getData(String resourceId) throws IOException {
        LoadableResource load = this.resources.get(resourceId);
        if (Objects.nonNull(load)) {
            return load.getDataStream();
        }
        throw new IllegalArgumentException("No such resource: " + resourceId);
    }