Closed KimmingLau closed 4 months ago
Thanks for the reproducer and the proposed fix. Actually, there is one existing integration test in AspectJ which because of an erroneous import was never executed. Instead, another test with the same name from another package was executed twice. Anyway, I added another test similar to your reproducer for this bug, i.e. we have two tests reproducing the problem.
As for your fix, I think I will go with a simpler solution without Optional
, but otherwise similar to your suggestion.
Superseded by #289. But I mentioned you as a co-author in the commit fixing the problem.
1.write SAME_BYTES to cacheMap when wovenbytes is null
2.fix TODO in SimpleCache#getAndInitialize, use Optional to help indicating case in which Hit cache but need to return null
Fixes #285.