Smarteon / loxone-java

Java implementation of the Loxone™ communication protocol (Web Socket)
BSD 3-Clause "New" or "Revised" License
15 stars 10 forks source link

Failed HTTP get for typed command can lead to ClassCastException #182

Open jimirocks opened 1 year ago

jimirocks commented 1 year ago

For instance DEV_SYS_CPU command should carry PercentValue however in case of failure (i.e. unsufficient permissions) the JsonValue is returned instead. Since LoxoneHttp.get() is type parametrized, the ClassCastException happens later when trying to access returned LoxoneMessage.value