You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by gsmet <gi...@git.apache.org> on 2015/05/19 23:20:04 UTC

[GitHub] wicket pull request: WICKET-5910 Do not intercept the protected me...

GitHub user gsmet opened a pull request:

    https://github.com/apache/wicket/pull/119

    WICKET-5910 Do not intercept the protected methods with CGLib.

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/openwide-java/wicket WICKET-5910-cglib-and-protected-methods

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/wicket/pull/119.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #119
    
----
commit b48d6cca6669c076b8283854ea677822a98c4a70
Author: Guillaume Smet <gu...@gmail.com>
Date:   2015-05-19T21:15:02Z

    WICKET-5910 Do not intercept the protected methods with CGLib.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket pull request: WICKET-5910 Do not intercept the protected me...

Posted by martin-g <gi...@git.apache.org>.
Github user martin-g commented on a diff in the pull request:

    https://github.com/apache/wicket/pull/119#discussion_r30675808
  
    --- Diff: wicket-ioc/src/main/java/org/apache/wicket/proxy/LazyInitProxyFactory.java ---
    @@ -157,14 +164,26 @@ else if (type.isInterface())
     		}
     		else
     		{
    -			CGLibInterceptor handler = new CGLibInterceptor(type, locator);
    +			CGLibInterceptor handler = new CGLibInterceptor(type, locator) {
    +				@Override
    +				public Object intercept(Object object, Method method, Object[] args, MethodProxy proxy)
    +						throws Throwable {
    +					// TODO Auto-generated method stub
    +					return super.intercept(object, method, args, proxy);
    --- End diff --
    
    What is the purpose of this override? It seems to just call super.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket pull request: WICKET-5910 Do not intercept the protected me...

Posted by martin-g <gi...@git.apache.org>.
Github user martin-g commented on a diff in the pull request:

    https://github.com/apache/wicket/pull/119#discussion_r30675893
  
    --- Diff: wicket-ioc/src/main/java/org/apache/wicket/proxy/LazyInitProxyFactory.java ---
    @@ -349,6 +368,33 @@ public Object writeReplace() throws ObjectStreamException
     	}
     
     	/**
    +	 * Serializable implementation of the NoOp callback.
    +	 */
    +	public static class SerializableNoOpCallback implements NoOp, Serializable
    +	{
    +		private static final long serialVersionUID = 1L;
    +	}
    +
    +	/**
    +	 * CGLib callback filter: does not intercept protected methods.
    +	 * 
    +	 * Otherwise CGLib throws an IllegalArgumentException: protected method.
    +	 */
    +	private static class CGLibCallbackFilter implements CallbackFilter {
    --- End diff --
    
    Please add a link to the description of the problem with protected methods in the Javadoc.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket pull request: WICKET-5910 Do not intercept the protected me...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/wicket/pull/119


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket pull request: WICKET-5910 Do not intercept the protected me...

Posted by gsmet <gi...@git.apache.org>.
Github user gsmet commented on the pull request:

    https://github.com/apache/wicket/pull/119#issuecomment-103849877
  
    I think I addressed your concerns.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket pull request: WICKET-5910 Do not intercept the protected me...

Posted by gsmet <gi...@git.apache.org>.
Github user gsmet commented on a diff in the pull request:

    https://github.com/apache/wicket/pull/119#discussion_r30690880
  
    --- Diff: wicket-ioc/src/main/java/org/apache/wicket/proxy/LazyInitProxyFactory.java ---
    @@ -157,14 +164,26 @@ else if (type.isInterface())
     		}
     		else
     		{
    -			CGLibInterceptor handler = new CGLibInterceptor(type, locator);
    +			CGLibInterceptor handler = new CGLibInterceptor(type, locator) {
    +				@Override
    +				public Object intercept(Object object, Method method, Object[] args, MethodProxy proxy)
    +						throws Throwable {
    +					// TODO Auto-generated method stub
    +					return super.intercept(object, method, args, proxy);
    --- End diff --
    
    Urgh, sorry, it was a leftover of my work on it. Shouldn't have been there.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---