Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Version used: 1.0.0-alpha03
If I have an argument that is non-null, it is possible to construct a Args instance that still has that value as null by using:
Bundle bundle = new Bundle();
bundle.putString("value", null);
Since the fromBundle() method just checks for the existence of the key and does not confirm that the value in that key is truly not null:
if (bundle.containsKey("value")) {
result.value = bundle.getString("value");
} else {
throw new IllegalArgumentException("Required argument \"value\" is missing and does not have an android:defaultValue");
}
It should throw an IllegalArgumentException if bundle.getString("value") in my example is null. The error message could read something like "Argument \"value\" is marked as non-null but was passed a null value"