vibur / vibur-dbcp

Vibur DBCP - concurrent and dynamic JDBC connection pool
http://www.vibur.org
Apache License 2.0
96 stars 11 forks source link

Issue 9: Consider optimising AbstractInvocationHandler::invoke #10

Closed rbalamohan closed 6 years ago

simeonmalchev commented 6 years ago

Hi @rbalamohan, would the changes in this PR be equivalent to changing the if statement in the middle AbstractInvocationHandler#invoke() as follows:

`

    Object unrestrictedResult;
    if (!method.getName().startsWith("get") && // shortcuts getXYZ methods
            (unrestrictedResult = unrestrictedInvoke(proxy, method, args)) != NO_RESULT) // (1)
        return unrestrictedResult;

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

    return restrictedInvoke(proxy, method, args); // (3)
}

`

rbalamohan commented 6 years ago

That is correct @simeonmalchev . I will make the relevant changes and resubmit the PR.

rbalamohan commented 6 years ago

Hi @simeonmalchev, I have addressed the review comments in the recent commit.