Skip to content

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

@SweetWuXiaoMei

Description

@SweetWuXiaoMei

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions