Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.0
-
Fix Version/s: 1.6
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
The code:
class A{
void a(){ b() }
void b(){}
}
benchmarkInterceptor = new BenchmarkInterceptor()
proxy = ProxyMetaClass.getInstance(A.class)
proxy.setInterceptor(benchmarkInterceptor)
proxy.use {
a = new A()
a.a()
a.b()
}
stats = benchmarkInterceptor.statistic()
stats.each{
println ""
it.each{ print it+" "}
}
The results:
b 1 0 ctor 1 0 a 1 0
This shows that the call made from a() to b() is not being intercepted.
As Dierk noted on mailing list, this shows that a respective unit test is missing for ProxyMetaClass and Interceptor. Also, blackdrag insists on that MetaClass should be rewritten (this is "another" collateral of MetaClass incorrect implementation).
The thread on the mailing list:
http://www.nabble.com/ProxyMetaClass-and-Interceptors-tf3308499.html
Add code tags