Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

help! bytecode is modified by jmockit,how to exclude in some test case #750

Open
SweetWuXiaoMei opened this issue Dec 22, 2024 · 1 comment

Comments

@SweetWuXiaoMei
Copy link

When I upgrade the log4j2 version to 2.24.2, multiple test classes report an error. Here is the link:
apache/logging-log4j2#3284

While executing InternalLoggerRegistry class(log4j2), the following code is run:

final Map<String, WeakReference<Logger>> loggerRefByName =  
    loggerRefByNameByMessageFactory.computeIfAbsent(messageFactory, ignored -> new HashMap<>());

I found that loggerRefByName seems to have its bytecode modified and returns null. How can I make JMockit and log4j2 not interfere with each other?

@SweetWuXiaoMei
Copy link
Author

I have solved it

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

No branches or pull requests

1 participant