Recent

Author Topic: LAMW NullPointerException in jDownloadService  (Read 154 times)

Manlio

  • New member
  • *
  • Posts: 14
LAMW NullPointerException in jDownloadService
« on: April 23, 2019, 11:42:35 am »
I'm getting multiple instances of this error report from app testers:

java.lang.NullPointerException:
 
  at com.betaapps.myapp.jDownloadService.onHandleIntent (jDownloadService.java:111)

I believe line 111 is this (inside protected void onHandleIntent(Intent intent)

            fos.close();

Does that mean that fos = NULL when close is called?

So perhaps, if fos can be NULL (because of an exception just before it, although no other exception was reported to me) then to reduce the number of exceptions logged, there should be a check like:  if fos != NULL {fos.close()}

BTW I'm very new at all this, so please forgive me if the above doesn't make too much sense... :)

Thanks for the great work.

jmpessoa

  • Hero Member
  • *****
  • Posts: 1317
Re: LAMW NullPointerException in jDownloadService
« Reply #1 on: April 24, 2019, 02:47:12 am »

I just commited your suggestion!!!

Thank you!!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard