On Sat, Jun 9, 2012 at 6:42 AM, Adrian Crum
<adrian.c...@sandglass-software.com> wrote:
> Actually, that cast should not be necessary. Try
>
> return AnnotationFactory.<Annotation>getStubType();

Seems reasonable, Adrian, but still poppped a compile error.  Thanks anyway!  ;)

Matt

>
> -Adrian
>
>
> On 6/9/2012 12:05 PM, sebb wrote:
>>
>> On 9 June 2012 08:54,<mben...@apache.org>  wrote:
>>>
>>> Author: mbenson
>>> Date: Sat Jun  9 07:54:02 2012
>>> New Revision: 1348334
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1348334&view=rev
>>> Log:
>>> generics precision
>>>
>>> Modified:
>>>
>>>  commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/AnnotationFactory.java
>>>
>>>  commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/StubConfigurer.java
>>>
>>> Modified:
>>> commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/AnnotationFactory.java
>>> URL:
>>> http://svn.apache.org/viewvc/commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/AnnotationFactory.java?rev=1348334&r1=1348333&r2=1348334&view=diff
>>>
>>> ==============================================================================
>>> ---
>>> commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/AnnotationFactory.java
>>> (original)
>>> +++
>>> commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/AnnotationFactory.java
>>> Sat Jun  9 07:54:02 2012
>>> @@ -214,8 +214,9 @@ public class AnnotationFactory {
>>>          * {@inheritDoc}
>>>          */
>>>         @Override
>>> -        public Class<? extends Annotation>  getStubType() {
>>> -            return AnnotationFactory.getStubType();
>>> +        @SuppressWarnings("unchecked")
>>
>> Why is it safe to ignore the warning?
>> This should be documented in a comment please.
>>
>>> +        public Class<Annotation>  getStubType() {
>>> +            return (Class<Annotation>) AnnotationFactory.getStubType();
>>>         }
>>>
>>>         /**
>>>
>>> Modified:
>>> commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/StubConfigurer.java
>>> URL:
>>> http://svn.apache.org/viewvc/commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/StubConfigurer.java?rev=1348334&r1=1348333&r2=1348334&view=diff
>>>
>>> ==============================================================================
>>> ---
>>> commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/StubConfigurer.java
>>> (original)
>>> +++
>>> commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/StubConfigurer.java
>>> Sat Jun  9 07:54:02 2012
>>> @@ -79,7 +79,7 @@ public abstract class StubConfigurer<T>
>>>      * Get the stubType.
>>>      * @return Class<T>
>>>      */
>>> -    public Class<? extends T>  getStubType() {
>>> +    public Class<T>  getStubType() {
>>>         return stubType;
>>>     }
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
>> For additional commands, e-mail: dev-h...@commons.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to