Recent

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

Manlio

  • Full Member
  • ***
  • Posts: 162
  • Pascal dev
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.
manlio mazzon gmail

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
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

 

TinyPortal © 2005-2018