Skip to content

NPE From some Storage methods #174

Description

@simon-temple

For example the following calls when listing a bucket that is empty or getting an item from a bucket that exists but the item does not:

    storage.list( bucketName )
    storage.get( bucketName, itemName )

The NPE is generated from the Preconditions class called via transform() in the Iterables class:

public static <T> T checkNotNull(T reference) {
        if(reference == null) {
            throw new NullPointerException();
        } else {
            return reference;
        }
    }

It would be nicer to return a null to the caller perhaps. wdyt?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🚨 criticalP0 critical issue. Requires immediate fixapi: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions