Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WINDUPRULE-314, WINDUPRULE--315,WINDUPRULE-316 Resteasy new rules (#282…
…) (#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)
- Loading branch information
Showing
3 changed files
with
174 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
rules-reviewed/eap7/eap6/tests/data/data-resteasy/YamlResource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import javax.ws.rs.Consumes; | ||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.Produces; | ||
|
||
@Path("/yaml") | ||
public class YamlResource { | ||
|
||
@GET | ||
@Produces("text/x-yaml") | ||
public MyObject getMyObject() { | ||
return createMyObject(); | ||
} | ||
|
||
@GET | ||
@Produces("text/yaml") | ||
public MyObject getMyObject1() { | ||
return createMyObject(); | ||
} | ||
|
||
@GET | ||
@Produces("application/x-yaml") | ||
public MyObject getMyObject2() { | ||
return createMyObject(); | ||
} | ||
|
||
|
||
@GET | ||
@Produces("application/x-java-serialized-object") | ||
public MyObject getMyObject4() { | ||
return createMyObject(); | ||
} | ||
|
||
@GET | ||
@Produces("text/plain") | ||
public String getResult() { | ||
return ""; | ||
} | ||
|
||
@GET | ||
@Produces("application/xml") | ||
public String getResult() { | ||
return ""; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters