File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
org.springframework.context/src/main/java/org/springframework/jndi Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2009 the original author or authors.
2
+ * Copyright 2002-2010 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
17
17
package org .springframework .jndi ;
18
18
19
19
import java .lang .reflect .Method ;
20
-
20
+ import java . lang . reflect . Modifier ;
21
21
import javax .naming .Context ;
22
22
import javax .naming .NamingException ;
23
23
@@ -295,7 +295,12 @@ private static Object createJndiObjectProxy(JndiObjectFactoryBean jof) throws Na
295
295
throw new IllegalStateException (
296
296
"Cannot deactivate 'lookupOnStartup' without specifying a 'proxyInterface' or 'expectedType'" );
297
297
}
298
- proxyFactory .setInterfaces (ClassUtils .getAllInterfacesForClass (targetClass , jof .beanClassLoader ));
298
+ Class [] ifcs = ClassUtils .getAllInterfacesForClass (targetClass , jof .beanClassLoader );
299
+ for (Class ifc : ifcs ) {
300
+ if (Modifier .isPublic (ifc .getModifiers ())) {
301
+ proxyFactory .addInterface (ifc );
302
+ }
303
+ }
299
304
}
300
305
if (jof .exposeAccessContext ) {
301
306
proxyFactory .addAdvice (new JndiContextExposingInterceptor (jof .getJndiTemplate ()));
You can’t perform that action at this time.
0 commit comments