diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2023-01-07 10:36:08 +0100 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2023-01-07 14:07:27 +0100 |
commit | c8b9568a8577d2af0f1449eec729784b0dcaa484 (patch) | |
tree | c7af67ed62acd67c72843c6451dd116e61c1d112 /tests/java5/generics/binaryweaving | |
parent | 438eb9301014ffb63bbcbae4df684a2907ac91d5 (diff) | |
download | aspectj-c8b9568a8577d2af0f1449eec729784b0dcaa484.tar.gz aspectj-c8b9568a8577d2af0f1449eec729784b0dcaa484.zip |
BcelTypeMunger.mungeMethodDelegate: only use 'synchronized' when necessary
Relates to #198. Now, we create a delegate method body which basically
looks as follows:
public void methodOne() {
if (this.ajc$instance$MyAspect$MyMixin == null) {
synchronized(this) {
if (this.ajc$instance$MyAspect$MyMixin == null) {
this.ajc$instance$MyAspect$MyMixin = MyAspect.aspectOf().createImplementation(this);
}
}
}
this.ajc$instance$MyAspect$MyMixin.methodOne();
}
The idea for the outer null check is from @aclement, see
https://github.com/eclipse/org.aspectj/pull/205#issuecomment-1371556080.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'tests/java5/generics/binaryweaving')
0 files changed, 0 insertions, 0 deletions