View | Details | Raw Unified | Return to bug 53180
Collapse All | Expand All

(-)java/org/apache/catalina/core/DefaultInstanceManager.java (-1 / +3 lines)
Lines 342-348 Link Here
342
                    String methodName = method.getName();
342
                    String methodName = method.getName();
343
                    if (context != null) {
343
                    if (context != null) {
344
                        // Resource injection only if JNDI is enabled
344
                        // Resource injection only if JNDI is enabled
345
                        if (injections != null && methodName.startsWith("set") && methodName.length() > 3) {
345
                        if (injections != null && methodName.startsWith("set") && methodName.length() > 3
346
                        		&& method.getParameterTypes().length == 1 
347
                        		&& method.getReturnType().getName().equals("void")) {
346
                            String fieldName = Character.toLowerCase(methodName.charAt(3)) + methodName.substring(4);
348
                            String fieldName = Character.toLowerCase(methodName.charAt(3)) + methodName.substring(4);
347
                            if (injections.containsKey(fieldName)) {
349
                            if (injections.containsKey(fieldName)) {
348
                                annotations.add(new AnnotationCacheEntry(
350
                                annotations.add(new AnnotationCacheEntry(

Return to bug 53180