jaxb
  1. jaxb
  2. JAXB-905

Add ability to configure IMPROVED_XSI_TYPE_HANDLING outside of JAXBContext

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.5
    • Fix Version/s: 2.2.6
    • Component/s: runtime
    • Labels:
      None

      Description

      This is useful e.g. in JAX-WS usecase, where JAXBContext is not always accessible.

        Activity

        Hide
        Martin Grebac added a comment -

        Log Message:
        ------------
        JAXB-905 - Allow XSI Type handling configuration via system property as well

        Revisions:
        ----------
        3941

        Modified Paths:
        ---------------
        branches/jaxb-2_2-branch/jaxb-ri/runtime/src/com/sun/xml/bind/v2/ContextFactory.java

        Diffs:
        ------
        Index: branches/jaxb-2_2-branch/jaxb-ri/runtime/src/com/sun/xml/bind/v2/ContextFactory.java
        ===================================================================
        — branches/jaxb-2_2-branch/jaxb-ri/runtime/src/com/sun/xml/bind/v2/ContextFactory.java (revision 3940)
        +++ branches/jaxb-2_2-branch/jaxb-ri/runtime/src/com/sun/xml/bind/v2/ContextFactory.java (revision 3941)
        @@ -109,8 +109,14 @@
        supressAccessorWarnings = false;

        Boolean improvedXsiTypeHandling = getPropertyValue(properties, JAXBRIContext.IMPROVED_XSI_TYPE_HANDLING, Boolean.class);

        • if(improvedXsiTypeHandling == null)
        • improvedXsiTypeHandling = true;
          + if (improvedXsiTypeHandling == null)
          Unknown macro: {+ String improvedXsiSystemProperty = Util.getSystemProperty(JAXBRIContext.IMPROVED_XSI_TYPE_HANDLING);+ if (improvedXsiSystemProperty == null) { + improvedXsiTypeHandling = true; + } else { + improvedXsiTypeHandling = Boolean.valueOf(improvedXsiSystemProperty); + }+ }

        Boolean xmlAccessorFactorySupport = getPropertyValue(properties,
        JAXBRIContext.XMLACCESSORFACTORY_SUPPORT,Boolean.class);

        Show
        Martin Grebac added a comment - Log Message: ------------ JAXB-905 - Allow XSI Type handling configuration via system property as well Revisions: ---------- 3941 Modified Paths: --------------- branches/jaxb-2_2-branch/jaxb-ri/runtime/src/com/sun/xml/bind/v2/ContextFactory.java Diffs: ------ Index: branches/jaxb-2_2-branch/jaxb-ri/runtime/src/com/sun/xml/bind/v2/ContextFactory.java =================================================================== — branches/jaxb-2_2-branch/jaxb-ri/runtime/src/com/sun/xml/bind/v2/ContextFactory.java (revision 3940) +++ branches/jaxb-2_2-branch/jaxb-ri/runtime/src/com/sun/xml/bind/v2/ContextFactory.java (revision 3941) @@ -109,8 +109,14 @@ supressAccessorWarnings = false; Boolean improvedXsiTypeHandling = getPropertyValue(properties, JAXBRIContext.IMPROVED_XSI_TYPE_HANDLING, Boolean.class); if(improvedXsiTypeHandling == null) improvedXsiTypeHandling = true; + if (improvedXsiTypeHandling == null) Unknown macro: {+ String improvedXsiSystemProperty = Util.getSystemProperty(JAXBRIContext.IMPROVED_XSI_TYPE_HANDLING);+ if (improvedXsiSystemProperty == null) { + improvedXsiTypeHandling = true; + } else { + improvedXsiTypeHandling = Boolean.valueOf(improvedXsiSystemProperty); + }+ } Boolean xmlAccessorFactorySupport = getPropertyValue(properties, JAXBRIContext.XMLACCESSORFACTORY_SUPPORT,Boolean.class);

          People

          • Assignee:
            Martin Grebac
            Reporter:
            Martin Grebac
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: