-
Notifications
You must be signed in to change notification settings - Fork 6k
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
null pointer exception in networkResponse.statusCode #3628
Comments
@pradeepkumarreddyk thanks for reporting the issue. The address it, we need to do a null check for networkResponse before accessing the May I know if you've cycle to contribute the enhancement/bug fix? |
i did not understand. what is cycle to contribute the bug fix ? |
I mean do you have time to contribute the fix. |
yes, i have time to contribute the fix. what are the steps i should follow to contribute the fix. First i need to clone the code, then modify the code to fix the bug, then create a pull request. On Fri, Oct 14, 2016 at 7:55 AM, wing328 notifications@github.com wrote:
|
Yes, you're correct. The following file is a good starting point: swagger-codegen/modules/swagger-codegen/src/main/resources/android/libraries/volley/api.mustache Lines 112 to 134 in 1dd9ee3
Let us know if you need any help. |
i have cloned the swagger-codegen code, then i have executed the following grep -r volleyError.networkResponse * Output of the above command is as follows :-modules/swagger-codegen/src/main/resources/android/libraries/volley/api.mustache: => i did not find even a single instance where null check is not done. On Fri, Oct 14, 2016 at 2:44 PM, wing328 notifications@github.com wrote:
|
The following is the swagger generated code for android:-
In the above code, at the following line i'm getting null pointer exception, when there is no response from server:-
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
The text was updated successfully, but these errors were encountered: