Commit b7b1f7e40faea13506e7b56c09135d5546bd0c9e
1 parent
b32c6951
Exists in
master
Correção para o build Maven
Showing
2 changed files
with
5 additions
and
5 deletions
Show diff stats
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/context/AbstractCustomContext.java
... | ... | @@ -75,7 +75,7 @@ public abstract class AbstractCustomContext implements CustomContext { |
75 | 75 | |
76 | 76 | Class<?> type = getType(contextual); |
77 | 77 | if (getStore().contains(type)) { |
78 | - instance = getStore().get(type); | |
78 | + instance = (T) getStore().get(type); | |
79 | 79 | |
80 | 80 | } else if (creationalContext != null) { |
81 | 81 | instance = contextual.create(creationalContext); |
... | ... | @@ -124,9 +124,8 @@ public abstract class AbstractCustomContext implements CustomContext { |
124 | 124 | return this.getMap().containsKey(type); |
125 | 125 | } |
126 | 126 | |
127 | - @SuppressWarnings("unchecked") | |
128 | - private <T> T get(final Class<?> type) { | |
129 | - return (T) this.getMap().get(type); | |
127 | + private Object get(final Class<?> type) { | |
128 | + return this.getMap().get(type); | |
130 | 129 | } |
131 | 130 | |
132 | 131 | private void put(final Class<?> type, final Object instance) { | ... | ... |
impl/extension/jpa/src/test/java/br/gov/frameworkdemoiselle/internal/producer/FakeEntityManager.java
... | ... | @@ -38,6 +38,7 @@ package br.gov.frameworkdemoiselle.internal.producer; |
38 | 38 | |
39 | 39 | import java.util.Map; |
40 | 40 | |
41 | +import javax.enterprise.inject.Alternative; | |
41 | 42 | import javax.persistence.EntityManager; |
42 | 43 | import javax.persistence.EntityManagerFactory; |
43 | 44 | import javax.persistence.EntityTransaction; |
... | ... | @@ -49,7 +50,7 @@ import javax.persistence.criteria.CriteriaBuilder; |
49 | 50 | import javax.persistence.criteria.CriteriaQuery; |
50 | 51 | import javax.persistence.metamodel.Metamodel; |
51 | 52 | |
52 | - | |
53 | +@Alternative | |
53 | 54 | public class FakeEntityManager implements EntityManager { |
54 | 55 | |
55 | 56 | private boolean closed = false; | ... | ... |