[jbossseam-issues] [JBoss JIRA] Resolved: (JBSEAM-4132) AbstractResource has ambiguous setter methods
Jozef Hartinger (JIRA)
jira-events at lists.jboss.org
Tue Apr 21 08:21:22 EDT 2009
[ https://jira.jboss.org/jira/browse/JBSEAM-4132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jozef Hartinger resolved JBSEAM-4132.
-------------------------------------
Resolution: Done
Removed setMediaTypes(MediaType[] mediaTypes) as it is not needed if the resource if configured from xml descriptor nor it is needed in case of extension (It might be, but it's more handy to just write setMediaType(new String[] {"application/xml", "application/json"})). Getter now returns String[] as well.
> AbstractResource has ambiguous setter methods
> ---------------------------------------------
>
> Key: JBSEAM-4132
> URL: https://jira.jboss.org/jira/browse/JBSEAM-4132
> Project: Seam
> Issue Type: Bug
> Components: WS
> Affects Versions: 2.1.2.CR1
> Reporter: Christian Bauer
> Assignee: Jozef Hartinger
> Priority: Blocker
> Fix For: 2.1.2.CR2
>
>
> The *Resource component superclass has two ambiguous setter methods:
> public void setMediaTypes(String[] mediaTypes)
> public void setMediaTypes(MediaType[] mediaTypes)
> This will randomly fail on deployment depending on how the JDK orders clazz.getMethods() array:
> [testng] java.lang.RuntimeException: Could not create Component: configuredCategoryResourceHome
> [testng] at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1202)
> [testng] at org.jboss.seam.init.Initialization.installComponents(Initialization.java:1118)
> [testng] at org.jboss.seam.init.Initialization.init(Initialization.java:733)
> [testng] at org.jboss.seam.mock.AbstractSeamTest.startSeam(AbstractSeamTest.java:919)
> [testng] at org.jboss.seam.mock.SeamTest.startSeam(SeamTest.java:58)
> [testng] Caused by: java.lang.IllegalArgumentException: No converter for type: [Ljavax.ws.rs.core.MediaType;
> [testng] at org.jboss.seam.util.Conversions.getConverter(Conversions.java:63)
> [testng] at org.jboss.seam.Component$ConstantInitialValue.<init>(Component.java:2481)
> [testng] at org.jboss.seam.Component.getInitialValue(Component.java:538)
> [testng] at org.jboss.seam.Component.getInitialValueHonoringExceptions(Component.java:512)
> [testng] at org.jboss.seam.Component.initInitializers(Component.java:489)
> [testng] at org.jboss.seam.Component.<init>(Component.java:254)
> [testng] at org.jboss.seam.Component.<init>(Component.java:205)
> [testng] at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1186)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list