Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in ContentValuesUtil #230

Open
elincognito opened this issue Mar 7, 2014 · 0 comments
Open

Bug in ContentValuesUtil #230

elincognito opened this issue Mar 7, 2014 · 0 comments

Comments

@elincognito
Copy link

public static void putMapped(String key, Map<String, String> map, ContentValues values, String value) {
if(map == null || !map.containsKey(key)) {
values.put(key, value);
}

    String alias = map.get(key);

    if(alias != null) {
        values.put(alias, value);
    }
}

if map is null then a return is required otherwise
String alias = map.get(key);

will throw a NullPointerException

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

No branches or pull requests

2 participants