Commit 83dfa45beddd08cd38d11258889495e500681fff
1 parent
696ec758
Exists in
master
Resolvendo a advertência do Sonar: Modificador 'final' é redundante
Showing
1 changed file
with
6 additions
and
6 deletions
Show diff stats
impl/core/src/main/java/br/gov/frameworkdemoiselle/exception/ExceptionHandlerInterceptor.java
@@ -66,7 +66,7 @@ public class ExceptionHandlerInterceptor implements Serializable { | @@ -66,7 +66,7 @@ public class ExceptionHandlerInterceptor implements Serializable { | ||
66 | 66 | ||
67 | private final Map<Class<?>, Map<Class<?>, Method>> cache = new HashMap<Class<?>, Map<Class<?>, Method>>(); | 67 | private final Map<Class<?>, Map<Class<?>, Method>> cache = new HashMap<Class<?>, Map<Class<?>, Method>>(); |
68 | 68 | ||
69 | - private final boolean handleException(final Exception cause, final Object target) throws Exception { | 69 | + private boolean handleException(final Exception cause, final Object target) throws Exception { |
70 | getLogger().info(getBundle().getString("handling-exception", cause.getClass().getCanonicalName())); | 70 | getLogger().info(getBundle().getString("handling-exception", cause.getClass().getCanonicalName())); |
71 | 71 | ||
72 | boolean handled = false; | 72 | boolean handled = false; |
@@ -93,7 +93,7 @@ public class ExceptionHandlerInterceptor implements Serializable { | @@ -93,7 +93,7 @@ public class ExceptionHandlerInterceptor implements Serializable { | ||
93 | * @param causeClass | 93 | * @param causeClass |
94 | * @return | 94 | * @return |
95 | */ | 95 | */ |
96 | - private final Method getMethod(final Class<?> type, final Class<?> causeClass) { | 96 | + private Method getMethod(final Class<?> type, final Class<?> causeClass) { |
97 | Method handler = null; | 97 | Method handler = null; |
98 | Map<Class<?>, Method> map = cache.get(type); | 98 | Map<Class<?>, Method> map = cache.get(type); |
99 | 99 | ||
@@ -113,7 +113,7 @@ public class ExceptionHandlerInterceptor implements Serializable { | @@ -113,7 +113,7 @@ public class ExceptionHandlerInterceptor implements Serializable { | ||
113 | * | 113 | * |
114 | * @param type | 114 | * @param type |
115 | */ | 115 | */ |
116 | - private final void loadHandlers(final Class<?> type) { | 116 | + private void loadHandlers(final Class<?> type) { |
117 | Map<Class<?>, Method> mapHandlers = new HashMap<Class<?>, Method>(); | 117 | Map<Class<?>, Method> mapHandlers = new HashMap<Class<?>, Method>(); |
118 | Method[] methods = type.getMethods(); | 118 | Method[] methods = type.getMethods(); |
119 | 119 | ||
@@ -132,7 +132,7 @@ public class ExceptionHandlerInterceptor implements Serializable { | @@ -132,7 +132,7 @@ public class ExceptionHandlerInterceptor implements Serializable { | ||
132 | * | 132 | * |
133 | * @param method | 133 | * @param method |
134 | */ | 134 | */ |
135 | - private final void validateHandler(final Method method) { | 135 | + private void validateHandler(final Method method) { |
136 | if (method.getParameterTypes().length != 1) { | 136 | if (method.getParameterTypes().length != 1) { |
137 | throw new DemoiselleException(getBundle().getString("must-declare-one-single-parameter", | 137 | throw new DemoiselleException(getBundle().getString("must-declare-one-single-parameter", |
138 | method.toGenericString())); | 138 | method.toGenericString())); |
@@ -145,11 +145,11 @@ public class ExceptionHandlerInterceptor implements Serializable { | @@ -145,11 +145,11 @@ public class ExceptionHandlerInterceptor implements Serializable { | ||
145 | * @param type | 145 | * @param type |
146 | * @return | 146 | * @return |
147 | */ | 147 | */ |
148 | - private final boolean isLoaded(final Class<?> type) { | 148 | + private boolean isLoaded(final Class<?> type) { |
149 | return cache.containsKey(type); | 149 | return cache.containsKey(type); |
150 | } | 150 | } |
151 | 151 | ||
152 | - private final void invoke(final Method method, final Object object, final Exception param) throws Exception { | 152 | + private void invoke(final Method method, final Object object, final Exception param) throws Exception { |
153 | boolean accessible = method.isAccessible(); | 153 | boolean accessible = method.isAccessible(); |
154 | method.setAccessible(true); | 154 | method.setAccessible(true); |
155 | 155 |