You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "jeanouii (via GitHub)" <gi...@apache.org> on 2025/05/09 11:46:49 UTC
[PR] fix(#OWB-1450): Interceptor proxy memory leak [openwebbeans]
jeanouii opened a new pull request, #128:
URL: https://github.com/apache/openwebbeans/pull/128
(no comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@openwebbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(#OWB-1450): Interceptor proxy memory leak [openwebbeans]
Posted by "rmannibucau (via GitHub)" <gi...@apache.org>.
rmannibucau commented on code in PR #128:
URL: https://github.com/apache/openwebbeans/pull/128#discussion_r2081575758
##########
webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java:
##########
@@ -613,5 +615,55 @@ else if (methodIndex < 32267)
mv.visitEnd();
}
+ public static class AnnotationTypeKey<T>
+ {
+ private final AnnotatedType<T> annotatedType;
+
+
+ public AnnotationTypeKey(final AnnotatedType<T> annotatedType)
+ {
+ Asserts.assertNotNull(annotatedType, "annotatedType");
+ this.annotatedType = annotatedType;
Review Comment:
i'd cache (=precompute in the constructor) the hashcode as in beancachekey since it is hash structure oriented
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@openwebbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(#OWB-1450): Interceptor proxy memory leak [openwebbeans]
Posted by "rzo1 (via GitHub)" <gi...@apache.org>.
rzo1 commented on PR #128:
URL: https://github.com/apache/openwebbeans/pull/128#issuecomment-3320224711
Did went directly to main, no?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@openwebbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(#OWB-1450): Interceptor proxy memory leak [openwebbeans]
Posted by "struberg (via GitHub)" <gi...@apache.org>.
struberg commented on PR #128:
URL: https://github.com/apache/openwebbeans/pull/128#issuecomment-3357083153
I think so. fixed in #128 18f37f8883d079d007d23dee429faf0cd79a201f
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@openwebbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(#OWB-1450): Interceptor proxy memory leak [openwebbeans]
Posted by "rmannibucau (via GitHub)" <gi...@apache.org>.
rmannibucau commented on code in PR #128:
URL: https://github.com/apache/openwebbeans/pull/128#discussion_r2081576339
##########
webbeans-impl/src/test/java/org/apache/webbeans/test/interceptors/factory/InterceptorDecoratorProxyFactoryTest.java:
##########
@@ -41,22 +45,59 @@
import org.apache.webbeans.proxy.InterceptorHandler;
import org.apache.webbeans.proxy.OwbInterceptorProxy;
import org.apache.webbeans.test.interceptors.factory.beans.TonsOfMethodsInterceptedClass;
+import org.apache.webbeans.util.Asserts;
import org.apache.webbeans.util.ClassUtil;
import org.apache.webbeans.test.util.CustomBaseType;
import org.apache.webbeans.test.util.CustomType;
import org.apache.webbeans.test.util.ExtendedSpecificClass;
import org.apache.webbeans.test.util.GenericInterface;
import org.apache.webbeans.test.util.SpecificClass;
+import org.apache.webbeans.util.WebBeansUtil;
import org.junit.Assert;
import org.junit.Test;
+import static org.junit.Assert.assertSame;
+
/**
* Test the {@link org.apache.webbeans.proxy.InterceptorDecoratorProxyFactory}
*/
public class InterceptorDecoratorProxyFactoryTest extends AbstractUnitTest
{
+ @Test
+ public void testEnsureOneProxyPerAT()
+ {
+ // we take a fresh URLClassLoader to not blur the test classpath with synthetic classes.
+ ClassLoader classLoader = new URLClassLoader(new URL[0]);
Review Comment:
try()?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@openwebbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(#OWB-1450): Interceptor proxy memory leak [openwebbeans]
Posted by "struberg (via GitHub)" <gi...@apache.org>.
struberg closed pull request #128: fix(#OWB-1450): Interceptor proxy memory leak
URL: https://github.com/apache/openwebbeans/pull/128
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@openwebbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(#OWB-1450): Interceptor proxy memory leak [openwebbeans]
Posted by "rmannibucau (via GitHub)" <gi...@apache.org>.
rmannibucau commented on code in PR #128:
URL: https://github.com/apache/openwebbeans/pull/128#discussion_r2081577771
##########
webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java:
##########
@@ -613,5 +615,55 @@ else if (methodIndex < 32267)
mv.visitEnd();
}
+ public static class AnnotationTypeKey<T>
+ {
+ private final AnnotatedType<T> annotatedType;
+
+
+ public AnnotationTypeKey(final AnnotatedType<T> annotatedType)
+ {
+ Asserts.assertNotNull(annotatedType, "annotatedType");
+ this.annotatedType = annotatedType;
+ }
+
+ @Override
+ public final boolean equals(final Object o)
+ {
+ if (!(o instanceof AnnotationTypeKey))
+ {
+ return false;
+ }
+
+ final AnnotatedType<?> at = ((AnnotationTypeKey<?>) o).annotatedType;
+ if (annotatedType == at)
+ {
+ return true;
+ }
+
+ if (annotatedType.equals(at))
+ {
+ return true;
+ }
+
+ if (annotatedType.getJavaClass() == at.getJavaClass())
Review Comment:
think it is not sufficient, misses annotations and other parts of the model no?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@openwebbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org