GitHub user mike-jumper opened a pull request:
https://github.com/apache/incubator-guacamole-client/pull/28
GUACAMOLE-5: Fix regression introduced by recent refactor of the REST API
The recent refactor caused issues where actual type-specific
implementations were not provided for the REST resources. All REST resources
**MUST** be non-generic, thus `DirectoryResource` and `DirectoryObjectResource`
**MUST NOT** be used directly. Type parameters of generic classes will
otherwise be handled by Jersey as `Object` due to type erasure, resulting in
class cast exceptions due to received JSON being deserialized as a `Map`
instead of the intended type.
This change also updates the logging and error handling within
`RESTExceptionWrapper` such that this sort of thing will be easier to notice
going forward. Internal errors were not being properly logged, especially those
which were not subclasses of `GuacamoleException`.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mike-jumper/incubator-guacamole-client
subresource-regression
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-guacamole-client/pull/28.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #28
----
commit bd8c37c7375cc037254c2dec79b124baed9049dc
Author: Michael Jumper <[email protected]>
Date: 2016-07-14T20:28:45Z
GUACAMOLE-5: Ensure all exceptions from within REST make their way to a
JSON response, even if not a GuacamoleException.
commit cdd71411fb8f8e40109ca51f3136145ccd42136a
Author: Michael Jumper <[email protected]>
Date: 2016-07-14T21:37:33Z
GUACAMOLE-5: All REST resources MUST be non-generic. Type parameters of
generic classes will otherwise be handled as Object by Jersey due to type
erasure, resulting in class cast exceptions due to JSON being deserialized as a
Map instead of the intended type.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---