Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WINDUPRULE-314, WINDUPRULE--315,WINDUPRULE-316 Resteasy new rules #282

Merged
merged 4 commits into from Oct 13, 2017

Conversation

mareknovotny
Copy link
Contributor

@mareknovotny mareknovotny changed the title WINDUPRULE-314 and WINDUPRULE-316 Resteasy new rules WINDUPRULE-314, WINDUPRULE--315,WINDUPRULE-316 Resteasy new rules Oct 9, 2017
mrizzi
mrizzi previously requested changes Oct 11, 2017
Copy link
Member

@mrizzi mrizzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One URL for documentation needs to be fixed and maybe also a rule condition.

If you do not want RESTEasy to add `charset=UTF-8` to the returned content-type header when the resource method returns a `text/*` or `application/xml*` media type without an explicit charset.
</message>
<link title="RESTEasy Default Charset UTF-8 in Content-Type Header"
href="https://doc-stage.usersys.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.1/html-single/migration_guide/#migrate_resteasy_default_charset_utf8_in_content_type_header"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better replace this URL to not use stages servers ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, i will paste there 7.1Beta doc link instead.

<hint title="RESTEasy Text default charset response changed" effort="1" category-id="optional">
<message>Resteasy should use UTF-8 as the character set for text media types.
The `resteasy.add.charset` parameter is set to `true` by default. You can set the `resteasy.add.charset` parameter to false in web.xml `context-param` element.
If you do not want RESTEasy to add `charset=UTF-8` to the returned content-type header when the resource method returns a `text/*` or `application/xml*` media type without an explicit charset.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's better w/o a new sentence starting "If" but have something like:
You can set the resteasy.add.charset parameter to false in web.xml context-param element if you do not want RESTEasy to add charset=UTF-8 to the returned content-type header ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I'll try to reword the whole message, it seems like that if you copy&paste from more resources :(

<javaclass references="javax.ws.rs.Produces">
<location>ANNOTATION</location>
<annotation-literal name="value" pattern="application/x-java-serialized-object"/>
</javaclass>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no condition for the @Consumes(value="application/x-java-serialized-object") case while it was enlisted in the JIRA WINDUPRULE-316.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, I will fix it

@mareknovotny mareknovotny dismissed mrizzi’s stale review October 11, 2017 13:44

fixed after review

Copy link
Member

@mrizzi mrizzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's nice with the last update to messages 👍

@mrizzi mrizzi merged commit b15ba2c into windup:master Oct 13, 2017
mrizzi pushed a commit to mrizzi/windup-rulesets that referenced this pull request Oct 13, 2017
…ndup#282)

* WINDUPRULE-314: adding rule for Resteasy Yaml provider

* WINDUPRULE-316: adding rule for Resteasy Serializable Provider

* WINDUPRULE-315: added new rule for default charset in text response

* WINDUPRULE-307: fixes after review

(cherry picked from commit b15ba2c)
mrizzi added a commit that referenced this pull request Oct 13, 2017
…) (#284)

* WINDUPRULE-314: adding rule for Resteasy Yaml provider

* WINDUPRULE-316: adding rule for Resteasy Serializable Provider

* WINDUPRULE-315: added new rule for default charset in text response

* WINDUPRULE-307: fixes after review

(cherry picked from commit b15ba2c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants