Skip to content

Commit b79116b

Browse files
Merge pull request #10 from rbalamohan/issue/9
Issue 9: Consider optimising AbstractInvocationHandler::invoke
2 parents 0b2a1de + 7b183e4 commit b79116b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/java/org/vibur/dbcp/proxy/AbstractInvocationHandler.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ public final Object invoke(Object objProxy, Method method, Object[] args) throws
7272
@SuppressWarnings("unchecked")
7373
T proxy = (T) objProxy;
7474

75-
Object unrestrictedResult = unrestrictedInvoke(proxy, method, args); // (1)
76-
if (unrestrictedResult != NO_RESULT)
75+
Object unrestrictedResult;
76+
if (!method.getName().startsWith("get") && // shortcuts getXYZ methods
77+
(unrestrictedResult = unrestrictedInvoke(proxy, method, args)) != NO_RESULT) // (1)
7778
return unrestrictedResult;
7879

7980
restrictedAccessEntry(proxy, method, args); // (2)

0 commit comments

Comments
 (0)