Issue #297 has been reported by Philipp Buluschek. ---------------------------------------- Bug #297: Search for existing failed devices broken http://zb4o.aaloa.org/redmine/issues/297
Author: Philipp Buluschek Status: New Priority: Normal Assignee: Category: Target version: Has a patch: No Has license agreement signed: No In @DeviceBuilderThread.doCreateZigBeeDeviceService(ZigBeeNode, byte)@, if the simple descriptor request fails (in the constructor of @ZigBeeDeviceImpl@), a @ZigBeeBasedriverException@ is thrown. This will trigger to add the device in the @failedAttempts@ map for later retry. Here the code checks whether that particular device is already in the map with <pre> ZigBeeDeviceReference last = new ZigBeeDeviceReference(node, ep); if (!failedAttempts.containsKey(last)) ... </pre> As @containsKey()@ uses Java's @equals()@ method, but @ZigBeeDeviceReference@ has no @equals()@ defined, it falls back to @Object@'s version which will never find the existing reference in the map. To make it work correctly, @ZigBeeDeviceReference@ must define an @equals()@ and a @hashCode()@ method. It need to use both the node and the endpoint for correct behavior. </pre> -- DO NOT ANSWER TO THIS E-MAIL ADDRESS, NO ONE WILL READ IT. PLEASE WRITE TO [email protected] ZigBee 4 OSGi - Redmine E-Mail Notificatioon You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://zb4o.aaloa.org/redmine
_______________________________________________ Dev mailing list [email protected] http://zb4osgi.aaloa.org/mailman/listinfo/dev
