Commit 8dd957de3d19edd23e4a05151003d6a7c4279f04
1 parent
f8c26579
Exists in
master
Resolvendo a advertência do Sonar: Duplicated lines
Showing
2 changed files
with
2 additions
and
17 deletions
Show diff stats
impl/core/src/main/java/br/gov/frameworkdemoiselle/security/RequiredPermissionInterceptor.java
... | ... | @@ -48,9 +48,6 @@ import org.slf4j.Logger; |
48 | 48 | import br.gov.frameworkdemoiselle.annotation.Name; |
49 | 49 | import br.gov.frameworkdemoiselle.internal.producer.LoggerProducer; |
50 | 50 | import br.gov.frameworkdemoiselle.internal.producer.ResourceBundleProducer; |
51 | -import br.gov.frameworkdemoiselle.security.AuthorizationException; | |
52 | -import br.gov.frameworkdemoiselle.security.RequiredPermission; | |
53 | -import br.gov.frameworkdemoiselle.security.SecurityContext; | |
54 | 51 | import br.gov.frameworkdemoiselle.util.Beans; |
55 | 52 | import br.gov.frameworkdemoiselle.util.ResourceBundle; |
56 | 53 | import br.gov.frameworkdemoiselle.util.Strings; |
... | ... | @@ -66,8 +63,6 @@ public class RequiredPermissionInterceptor implements Serializable { |
66 | 63 | |
67 | 64 | private static final long serialVersionUID = 1L; |
68 | 65 | |
69 | - private SecurityContext securityContext; | |
70 | - | |
71 | 66 | private static ResourceBundle bundle; |
72 | 67 | |
73 | 68 | private static Logger logger; |
... | ... | @@ -168,11 +163,7 @@ public class RequiredPermissionInterceptor implements Serializable { |
168 | 163 | } |
169 | 164 | |
170 | 165 | private SecurityContext getSecurityContext() { |
171 | - if (securityContext == null) { | |
172 | - securityContext = Beans.getReference(SecurityContext.class); | |
173 | - } | |
174 | - | |
175 | - return securityContext; | |
166 | + return Beans.getReference(SecurityContext.class); | |
176 | 167 | } |
177 | 168 | |
178 | 169 | private static ResourceBundle getBundle() { | ... | ... |
impl/core/src/main/java/br/gov/frameworkdemoiselle/security/RequiredRoleInterceptor.java
... | ... | @@ -63,8 +63,6 @@ public class RequiredRoleInterceptor implements Serializable { |
63 | 63 | |
64 | 64 | private static final long serialVersionUID = 1L; |
65 | 65 | |
66 | - private SecurityContext securityContext; | |
67 | - | |
68 | 66 | private static ResourceBundle bundle; |
69 | 67 | |
70 | 68 | private static Logger logger; |
... | ... | @@ -136,11 +134,7 @@ public class RequiredRoleInterceptor implements Serializable { |
136 | 134 | } |
137 | 135 | |
138 | 136 | private SecurityContext getSecurityContext() { |
139 | - if (securityContext == null) { | |
140 | - securityContext = Beans.getReference(SecurityContext.class); | |
141 | - } | |
142 | - | |
143 | - return securityContext; | |
137 | + return Beans.getReference(SecurityContext.class); | |
144 | 138 | } |
145 | 139 | |
146 | 140 | private static ResourceBundle getBundle() { | ... | ... |