Commit ecc109da4d394d6a7809f25cad63329f20651b51
1 parent
6517653c
Exists in
master
Inclusão do type cast novamente (sem ele o Maven não compila)
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
impl/core/src/main/java/br/gov/frameworkdemoiselle/util/Beans.java
@@ -98,12 +98,13 @@ public final class Beans { | @@ -98,12 +98,13 @@ public final class Beans { | ||
98 | return instance; | 98 | return instance; |
99 | } | 99 | } |
100 | 100 | ||
101 | + @SuppressWarnings("unchecked") | ||
101 | public static <T> T getReference(final Class<T> beanClass) { | 102 | public static <T> T getReference(final Class<T> beanClass) { |
102 | 103 | ||
103 | T instance; | 104 | T instance; |
104 | 105 | ||
105 | try { | 106 | try { |
106 | - instance = getReference(manager.getBeans(beanClass)); | 107 | + instance = (T) getReference(manager.getBeans(beanClass)); |
107 | }catch (NoSuchElementException cause) { | 108 | }catch (NoSuchElementException cause) { |
108 | String message = getBundle() | 109 | String message = getBundle() |
109 | .getString("bean-not-found", beanClass.getCanonicalName()); | 110 | .getString("bean-not-found", beanClass.getCanonicalName()); |