You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by "Bryant Luk (JIRA)" <ji...@apache.org> on 2009/09/18 20:53:16 UTC

[jira] Created: (WINK-202) Change XmlFormattingOptions to not do anything by default

Change XmlFormattingOptions to not do anything by default
---------------------------------------------------------

                 Key: WINK-202
                 URL: https://issues.apache.org/jira/browse/WINK-202
             Project: Wink
          Issue Type: Improvement
          Components: Common
    Affects Versions: 0.2
            Reporter: Bryant Luk
            Assignee: Bryant Luk
             Fix For: 0.2


Changing XmlFormattingOptions to not do anything by default to help improve minor compatibility and gain a "cheap" performance benefit (up to 2% overall).  While it's a nice feature to have, it may be unexpected for some clients to leave out the XML declaration.  Furthermore, while the indenting is beneficial for debugging, generally people will not be reading the XML.

The change should be relatively simple I think:

{code}
        if (formatingOptions != null) {
            JAXBUtils.setXmlFormattingOptions(marshaller, formatingOptions);
        } else {
            JAXBUtils.setXmlFormattingOptions(marshaller, XmlFormattingOptions
                .getDefaultXmlFormattingOptions());
        }
{code}

should get rid of the else statement.  This would allow the marshaller to do whatever the "natural" JDK defaults are automatically.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WINK-202) Change XmlFormattingOptions to not do anything by default

Posted by "Bryant Luk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12757394#action_12757394 ] 

Bryant Luk commented on WINK-202:
---------------------------------

I added a XmlDefaultOptionsContextResolver loaded by default for a few of the existing JAXB classes that had tests that explicitly wanted the fragment.  For performance purposes AtomFeed/AtomEntry should probably be removed eventually but wanted to make sure no one saw any issues first.

> Change XmlFormattingOptions to not do anything by default
> ---------------------------------------------------------
>
>                 Key: WINK-202
>                 URL: https://issues.apache.org/jira/browse/WINK-202
>             Project: Wink
>          Issue Type: Improvement
>          Components: Common
>    Affects Versions: 0.2
>            Reporter: Bryant Luk
>            Assignee: Bryant Luk
>             Fix For: 0.2
>
>
> Changing XmlFormattingOptions to not do anything by default to help improve minor compatibility and gain a "cheap" performance benefit (up to 2% overall).  While it's a nice feature to have, it may be unexpected for some clients to leave out the XML declaration.  Furthermore, while the indenting is beneficial for debugging, generally people will not be reading the XML.
> The change should be relatively simple I think:
> {code}
>         if (formatingOptions != null) {
>             JAXBUtils.setXmlFormattingOptions(marshaller, formatingOptions);
>         } else {
>             JAXBUtils.setXmlFormattingOptions(marshaller, XmlFormattingOptions
>                 .getDefaultXmlFormattingOptions());
>         }
> {code}
> should get rid of the else statement.  This would allow the marshaller to do whatever the "natural" JDK defaults are automatically.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WINK-202) Change XmlFormattingOptions to not do anything by default

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12757405#action_12757405 ] 

Hudson commented on WINK-202:
-----------------------------

Integrated in Wink-Trunk-JDK1.5 #163 (See [http://hudson.zones.apache.org/hudson/job/Wink-Trunk-JDK1.5/163/])
    XmlFormatting options should do nothing by default

See []


> Change XmlFormattingOptions to not do anything by default
> ---------------------------------------------------------
>
>                 Key: WINK-202
>                 URL: https://issues.apache.org/jira/browse/WINK-202
>             Project: Wink
>          Issue Type: Improvement
>          Components: Common
>    Affects Versions: 0.2
>            Reporter: Bryant Luk
>            Assignee: Bryant Luk
>             Fix For: 0.2
>
>
> Changing XmlFormattingOptions to not do anything by default to help improve minor compatibility and gain a "cheap" performance benefit (up to 2% overall).  While it's a nice feature to have, it may be unexpected for some clients to leave out the XML declaration.  Furthermore, while the indenting is beneficial for debugging, generally people will not be reading the XML.
> The change should be relatively simple I think:
> {code}
>         if (formatingOptions != null) {
>             JAXBUtils.setXmlFormattingOptions(marshaller, formatingOptions);
>         } else {
>             JAXBUtils.setXmlFormattingOptions(marshaller, XmlFormattingOptions
>                 .getDefaultXmlFormattingOptions());
>         }
> {code}
> should get rid of the else statement.  This would allow the marshaller to do whatever the "natural" JDK defaults are automatically.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WINK-202) Change XmlFormattingOptions to not do anything by default

Posted by "Bryant Luk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12758926#action_12758926 ] 

Bryant Luk commented on WINK-202:
---------------------------------

On some thought, I believe XmlFormattingOptions should just be a simple Properties like object so that any custom property can be set on the marshaller.

> Change XmlFormattingOptions to not do anything by default
> ---------------------------------------------------------
>
>                 Key: WINK-202
>                 URL: https://issues.apache.org/jira/browse/WINK-202
>             Project: Wink
>          Issue Type: Improvement
>          Components: Common
>    Affects Versions: 0.2
>            Reporter: Bryant Luk
>            Assignee: Bryant Luk
>             Fix For: 0.2
>
>
> Changing XmlFormattingOptions to not do anything by default to help improve minor compatibility and gain a "cheap" performance benefit (up to 2% overall).  While it's a nice feature to have, it may be unexpected for some clients to leave out the XML declaration.  Furthermore, while the indenting is beneficial for debugging, generally people will not be reading the XML.
> The change should be relatively simple I think:
> {code}
>         if (formatingOptions != null) {
>             JAXBUtils.setXmlFormattingOptions(marshaller, formatingOptions);
>         } else {
>             JAXBUtils.setXmlFormattingOptions(marshaller, XmlFormattingOptions
>                 .getDefaultXmlFormattingOptions());
>         }
> {code}
> should get rid of the else statement.  This would allow the marshaller to do whatever the "natural" JDK defaults are automatically.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (WINK-202) Change XmlFormattingOptions to not do anything by default

Posted by "Bryant Luk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WINK-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryant Luk closed WINK-202.
---------------------------


> Change XmlFormattingOptions to not do anything by default
> ---------------------------------------------------------
>
>                 Key: WINK-202
>                 URL: https://issues.apache.org/jira/browse/WINK-202
>             Project: Wink
>          Issue Type: Improvement
>          Components: Common
>    Affects Versions: 0.2
>            Reporter: Bryant Luk
>            Assignee: Bryant Luk
>             Fix For: 0.2
>
>
> Changing XmlFormattingOptions to not do anything by default to help improve minor compatibility and gain a "cheap" performance benefit (up to 2% overall).  While it's a nice feature to have, it may be unexpected for some clients to leave out the XML declaration.  Furthermore, while the indenting is beneficial for debugging, generally people will not be reading the XML.
> The change should be relatively simple I think:
> {code}
>         if (formatingOptions != null) {
>             JAXBUtils.setXmlFormattingOptions(marshaller, formatingOptions);
>         } else {
>             JAXBUtils.setXmlFormattingOptions(marshaller, XmlFormattingOptions
>                 .getDefaultXmlFormattingOptions());
>         }
> {code}
> should get rid of the else statement.  This would allow the marshaller to do whatever the "natural" JDK defaults are automatically.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (WINK-202) Change XmlFormattingOptions to not do anything by default

Posted by "Bryant Luk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WINK-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12758926#action_12758926 ] 

Bryant Luk edited comment on WINK-202 at 9/23/09 4:24 PM:
----------------------------------------------------------

On some thought, I believe XmlFormattingOptions should just be a simple Properties like object so that any custom property can be set on the marshaller.

I'll make the change for this as well as hopefully move out the XmlFormattingOptions for ATOM.

      was (Author: bluk):
    On some thought, I believe XmlFormattingOptions should just be a simple Properties like object so that any custom property can be set on the marshaller.
  
> Change XmlFormattingOptions to not do anything by default
> ---------------------------------------------------------
>
>                 Key: WINK-202
>                 URL: https://issues.apache.org/jira/browse/WINK-202
>             Project: Wink
>          Issue Type: Improvement
>          Components: Common
>    Affects Versions: 0.2
>            Reporter: Bryant Luk
>            Assignee: Bryant Luk
>             Fix For: 0.2
>
>
> Changing XmlFormattingOptions to not do anything by default to help improve minor compatibility and gain a "cheap" performance benefit (up to 2% overall).  While it's a nice feature to have, it may be unexpected for some clients to leave out the XML declaration.  Furthermore, while the indenting is beneficial for debugging, generally people will not be reading the XML.
> The change should be relatively simple I think:
> {code}
>         if (formatingOptions != null) {
>             JAXBUtils.setXmlFormattingOptions(marshaller, formatingOptions);
>         } else {
>             JAXBUtils.setXmlFormattingOptions(marshaller, XmlFormattingOptions
>                 .getDefaultXmlFormattingOptions());
>         }
> {code}
> should get rid of the else statement.  This would allow the marshaller to do whatever the "natural" JDK defaults are automatically.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WINK-202) Change XmlFormattingOptions to not do anything by default

Posted by "Bryant Luk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WINK-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryant Luk resolved WINK-202.
-----------------------------

    Resolution: Fixed

I've fixed the main path for the XmlFormattingOptions and allowed a general properties to be set.  XmlFormattingOptions are still used in a a few of the default public static Marshaller getMarshaller() methods but I don't think that's a problem at this time.

> Change XmlFormattingOptions to not do anything by default
> ---------------------------------------------------------
>
>                 Key: WINK-202
>                 URL: https://issues.apache.org/jira/browse/WINK-202
>             Project: Wink
>          Issue Type: Improvement
>          Components: Common
>    Affects Versions: 0.2
>            Reporter: Bryant Luk
>            Assignee: Bryant Luk
>             Fix For: 0.2
>
>
> Changing XmlFormattingOptions to not do anything by default to help improve minor compatibility and gain a "cheap" performance benefit (up to 2% overall).  While it's a nice feature to have, it may be unexpected for some clients to leave out the XML declaration.  Furthermore, while the indenting is beneficial for debugging, generally people will not be reading the XML.
> The change should be relatively simple I think:
> {code}
>         if (formatingOptions != null) {
>             JAXBUtils.setXmlFormattingOptions(marshaller, formatingOptions);
>         } else {
>             JAXBUtils.setXmlFormattingOptions(marshaller, XmlFormattingOptions
>                 .getDefaultXmlFormattingOptions());
>         }
> {code}
> should get rid of the else statement.  This would allow the marshaller to do whatever the "natural" JDK defaults are automatically.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.