Skip to content

Example has a typo... #22

@stuckj

Description

@stuckj

Just a simple issue. Your example for IterableCursorWrapper in README.md uses getLong for getting CULOUMN_USER_BIO, but you assign it to a string. It's good to show both getString and getLong so I'd just change the example to get something that makes sense as a long value instead of bio and have it return a long.

This is the snippet in error. I've commented the erroneous line...

public class UserCursor extends IterableCursorWrapper<User> {

    public UserCursor(Cursor c) {
        super(c);
    }

    public User peek() {
        String name = getString(COLUMN_USER_NAME, "Default Name");
        // getLong returns a long, not a String. Should update the example with something that's a long value...
//        String bio = getLong(COLUMN_USER_BIO, "No bio yet");
        return new User(name, bio);
    }

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions