Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-14572

Fix bad jackson type modifier for RemoteThrowable object

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.8.0-HF16, 5.9.5
    • Component/s: Automation

      Description

      In org.nuxeo.ecm.automation.client.jaxrs.spi.JsonMarshalling.ThowrableTypeModifier:

      public static class ThowrableTypeModifier extends TypeModifier {
              @Override
              public JavaType modifyType(JavaType type, Type jdkType,
                      TypeBindings context, TypeFactory typeFactory) {
                  Class<?> raw = type.getRawClass();
                  if (raw.isAssignableFrom(Throwable.class)) {
                      return typeFactory.constructType(RemoteThrowable.class);
                  }
                  return type;
              }
          }
      

      the test includes Serializable and Object objects as it should not.

      It is a problem for business POJO including members like Object, breaking the automation deserialization

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                PagerDuty

                Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.