1

Potential bug in the Java binding

asked 2014-04-02 06:17:40 -0800

PierreR gravatar image

In ProxyBusObject.java, the constructor is looking for a busConnectionLost method :

    try {
        busConnectionLost = 
            getClass().getDeclaredMethod("busConnectionLost", String.class);
        busConnectionLost.setAccessible(true);
    } catch (NoSuchMethodException ex) {
        /* This will not happen */
    }

I'm quite confused by this code : there is no busConnectionLost in the ProxyBusObject and we clearly go (silently !) in the catch block (I've tested it). On the other hand, there is a busConnectionLostfield, which does not seem to be used. Is that an error or am I missing some subtle implementation trick ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2014-04-02 14:03:17 -0800

This code predates sessions in AllJoyn. It looks like it failed to get removed when we added the APIs for sessions to the Java binding. So no subtle imlementation trick, just dead code that should've been removed a long time ago.

edit flag offensive delete publish link more

Comments

1

ok, that's what I thought, just wanted to be sure. So the BusConnectionLost field is useless as well ? Should I submit a bug in JIRA ? Actually I don't really see a buggy behavior but I'm wondering how the conection lost event is notified then.

PierreR ( 2014-04-03 00:27:55 -0800 )edit

Yep, feel free to submit a bug or a patch.

tmalsbar ( 2014-04-03 09:19:29 -0800 )edit

@PierreR if you feel this answered you question please remember to mark it a correct so @tmalsbar will get karma for helping you out.

georgen ( 2014-04-04 08:41:43 -0800 )edit

yes sure, sorry I forgot it. I'll probably also enventually submit a patch but with my work on a dynamic binding, my source tree is not in a good state for that now.

PierreR ( 2014-04-04 23:30:27 -0800 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2014-04-02 06:17:40 -0800

Seen: 103 times

Last updated: Apr 02 '14