Thanks a lot! I really didn't get the sense of [L But still, I think it's very counterintuitive, I'd expect cast org.freedesktop.dbus.Message$StringMethodArgument to org.freedesktop.dbus.Message$MethodArgument[] error message (at least) or something more verbose than chars "[L"
пятница, 18 июля 2014 г., 2:02:43 UTC+7 пользователь Sean Corfield написал: > > On Jul 17, 2014, at 11:18 AM, Vladimir Bokov <bokov...@gmail.com > <javascript:>> wrote: > > I'm trying to communicate with DBus via https://github.com/cathive/fx-dbus > java lib, but > passing an object which extends java abstract generic inner class > complains, that it cannot be cast > to parent class: > > ClassCastException Cannot cast > org.freedesktop.dbus.Message$StringMethodArgument to > [Lorg.freedesktop.dbus.Message$MethodArgument; java.lang.Class.cast > (Class.java:3258) > > > This says it is expecting an array (that's what the 'L' signifies). Java > variadic functions like this: > > public void addArguments(final MethodArgument... arguments) { > > need an array passed in. > > You'll need something like (into-array > org.freedesktop.dbus.Message$MethodArgument [app-name]) instead of just > app-name in your .addArgument call. > > Sean Corfield -- (904) 302-SEAN > An Architect's View -- http://corfield.org/ > > "Perfection is the enemy of the good." > -- Gustave Flaubert, French realist novelist (1821-1880) > > > > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.