[Libreoffice-bugs] [Bug 111393] New: Demuddle googleApiClient in CommunicationServiceWear ( findbugs Medium issue)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Aug 5 10:14:10 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=111393

            Bug ID: 111393
           Summary: Demuddle googleApiClient in CommunicationServiceWear
                    (findbugs Medium issue)
           Product: Impress Remote
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Android app
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: andrzej at ahunt.org

We have a static GoogleApiClient living in CommunicationServiceWear. However
its actually treated as a member variable (i.e. should be specific to the
instance of CommunicationServiceWear that is being used).

Findbugs rightly complains - I'm planning to suppress that warning for now, but
we should somehow unmuddle this:

>Write to static field org.libreoffice.impressremote.communication.CommunicationServiceWear.googleApiClient from instance method org.libreoffice.impressremote.communication.CommunicationServiceWear.onCreate()
> Bug type ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD (click for details)
> In class org.libreoffice.impressremote.communication.CommunicationServiceWear
> In method org.libreoffice.impressremote.communication.CommunicationServiceWear.onCreate()
> Field org.libreoffice.impressremote.communication.CommunicationServiceWear.googleApiClient
> At CommunicationServiceWear.java:[line 61]

googleApiClient needs to (at this time) be static since its used by the
(static) presentationPaused()/presentationResumed() implementations. Those in
turn are called by SlideShowActivity. It might be simplest for
SlideShowActivity to simply have its own googleApiClient which it can use to
communicate the pausing/unpausing of the presentation, and then
CommunicationServiceWear can de-staticify its own googleApiClient.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170805/2babff6e/attachment-0001.html>


More information about the Libreoffice-bugs mailing list