Add @Nullable annotations where necessary.#185
Conversation
| ScaleType scaleType, | ||
| Config decodeConfig, | ||
| Response.ErrorListener errorListener) { | ||
| @Nullable Response.ErrorListener errorListener) { |
There was a problem hiding this comment.
should the listener arg be @nullable too? (here and throughout)
There was a problem hiding this comment.
The current API is listener cannot be null in the constructor (according to the docstring), but the member variable mListener can be set to null by cancel(). So the member is annotated, but the constructor arg is not.
jpd236
left a comment
There was a problem hiding this comment.
Build failed due to:
The following files are not formatted properly:
/home/travis/build/google/volley/src/main/java/com/android/volley/toolbox/JsonRequest.java
/home/travis/build/google/volley/src/main/java/com/android/volley/toolbox/StringRequest.java
/home/travis/build/google/volley/src/main/java/com/android/volley/toolbox/JsonArrayRequest.java
mind running ./gradlew googleJavaFormat and uploading a new commit to resolve this?
(see also https://github.com/google/volley/blob/master/CONTRIBUTING.md)
The docstring and code already behave like these params can be null.
The docstring and code already behave like these params can be null.