[JBoss JIRA] Updated: (SOLDER-23) Provide utility to extract type parameter from Instance
by Dan Allen (JIRA)
[ https://issues.jboss.org/browse/SOLDER-23?page=com.atlassian.jira.plugin.... ]
Dan Allen updated SOLDER-23:
----------------------------
Assignee: Dan Allen
Fix Version/s: 3.0.0.Beta2
Affects Version/s: 3.0.0.Beta1
Component/s: Reflections
> Provide utility to extract type parameter from Instance
> -------------------------------------------------------
>
> Key: SOLDER-23
> URL: https://issues.jboss.org/browse/SOLDER-23
> Project: Seam Solder
> Issue Type: Feature Request
> Components: Reflections
> Affects Versions: 3.0.0.Beta1
> Reporter: Dan Allen
> Assignee: Dan Allen
> Priority: Minor
> Fix For: 3.0.0.Beta2
>
>
> When discovering injection points, a type of Instance<T> is effectively the same as discovering a type T. You don't want to create a producer method for an Instance, for instance, hence why you want to figure out what T is. Thus, it's common to want to extract the type parameter from Instance. Having a utility would be convenient.
> Here's an example that collects the actual bean types (extracting from the Instance type parameter if necessary)
> Set<Type> types = new HashSet<Type>();
> for (InjectionPoint ip : event.getInjectionTarget().getInjectionPoints())
> {
> types.add(Reflections.getActualType(ip.Type()));
> }
> Here's the utility:
> private static Type getActualType(Type t)
> {
> if (t instanceof ParameterizedType && ((ParameterizedType) t).getRawType().equals(Instance.class))
> {
> return ((ParameterizedType) t).getActualTypeArguments()[0];
> }
> return t;
> }
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 3 months
[JBoss JIRA] Updated: (SOLDER-6) Poor error message when there are multiple generic producer methods resolved
by Dan Allen (JIRA)
[ https://issues.jboss.org/browse/SOLDER-6?page=com.atlassian.jira.plugin.s... ]
Dan Allen updated SOLDER-6:
---------------------------
Fix Version/s: 3.0.0.Beta2
Affects Version/s: 3.0.0.Beta1
> Poor error message when there are multiple generic producer methods resolved
> ----------------------------------------------------------------------------
>
> Key: SOLDER-6
> URL: https://issues.jboss.org/browse/SOLDER-6
> Project: Seam Solder
> Issue Type: Bug
> Components: Generic Beans
> Affects Versions: 3.0.0.Beta1
> Reporter: Pete Muir
> Fix For: 3.0.0.Beta2
>
>
> org.jboss.arquillian.impl.event.FiredEventException: org.jboss.weld.exceptions.DeploymentException: WELD-001409 Ambiguous dependencies for type [BlobStore] with qualifiers [@TestContainer] at injection point [[field] @Inject @TestContainer private org.jboss.seam.jclouds.test.blobstore.Consumer.blobStore]. Possible dependencies [[Producer Method [BlobStore] with qualifiers [@Any @GenericMarker @Synthetic] declared as [[method] @Produces public org.jboss.seam.jclouds.blobstore.BlobStoreManager.getBlobStore()], Producer Method [BlobStore] with qualifiers [@Any @GenericMarker @Synthetic] declared as [[method] @Produces public org.jboss.seam.jclouds.blobstore.BlobStoreManager.getBlobStore()]]]
> This somehow needs to indicate the path the possible producers.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 3 months
[JBoss JIRA] Updated: (SOLDER-3) OTT Exception wrapping
by Dan Allen (JIRA)
[ https://issues.jboss.org/browse/SOLDER-3?page=com.atlassian.jira.plugin.s... ]
Dan Allen updated SOLDER-3:
---------------------------
Assignee: Stuart Douglas
Fix Version/s: 3.0.0.Beta2
Affects Version/s: 3.0.0.Beta1
Component/s: Unwraps
> OTT Exception wrapping
> ----------------------
>
> Key: SOLDER-3
> URL: https://issues.jboss.org/browse/SOLDER-3
> Project: Seam Solder
> Issue Type: Bug
> Components: Unwraps
> Affects Versions: 3.0.0.Beta1
> Reporter: Pete Muir
> Assignee: Stuart Douglas
> Fix For: 3.0.0.Beta2
>
>
> This piece of code
> try
> {
> M obj = proxyClass.newInstance();
> ((ProxyObject) obj).setHandler(hdl);
> creationalContext.push(obj);
> return obj;
> }
> catch (Exception e)
> {
> throw new RuntimeException(e);
> }
> in UnwrapsProducerBean is over-zealous in wrapping exceptions. It should only wrap specific exceptions, adding additonal info (e.g. the proxyClass it was trying to create)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 3 months