Giter Site home page Giter Site logo

Dependency Conflict: duplicate classes "org.slf4j.LoggerFactory.getILoggerFactory" in different JARs, have different implementations about nutzboot HOT 3 CLOSED

HelloCoCooo avatar HelloCoCooo commented on May 25, 2024
Dependency Conflict: duplicate classes "org.slf4j.LoggerFactory.getILoggerFactory" in different JARs, have different implementations

from nutzboot.

Comments (3)

HelloCoCooo avatar HelloCoCooo commented on May 25, 2024

Code snippet of org.slf4j.LoggerFactory.getILoggerFactory in org.slf4j:slf4j-api:1.7.28 (shadowed but expected to invoke method):

public static ILoggerFactory getILoggerFactory() {	//line 407
        if (INITIALIZATION_STATE == UNINITIALIZED) {
            synchronized (LoggerFactory.class) {
                if (INITIALIZATION_STATE == UNINITIALIZED) {
                    INITIALIZATION_STATE = ONGOING_INITIALIZATION;
                    performInitialization();
                }
            }
        }
        switch (INITIALIZATION_STATE) {
        case SUCCESSFUL_INITIALIZATION:
            return StaticLoggerBinder.getSingleton().getLoggerFactory();
...

Code snippet of org.slf4j.LoggerFactory.getILoggerFactory inorg.gandon.tomcat:juli-to-slf4j:1.1.1 (loaded version):

public static ILoggerFactory getILoggerFactory() {	//line 405
        if (INITIALIZATION_STATE == UNINITIALIZED) {
            INITIALIZATION_STATE = ONGOING_INITIALIZATION;
            performInitialization();
        }
        switch (INITIALIZATION_STATE) {
        case SUCCESSFUL_INITIALIZATION:
            return getLoggerFactory();
...

As a result, these conflicting method included in org.slf4j:slf4j-api:1.7.28 deals with different cases, which changes the control flows and data flows. So being forced to use these methods in org.gandon.tomcat:juli-to-slf4j:1.1.1 may lead to inconsisitent semantic behaviors.

from nutzboot.

HelloCoCooo avatar HelloCoCooo commented on May 25, 2024

Using the following test case to run on these two versions of methods separately starting from the entry method Main(String, int); in your project, then we can find the state of variable NutMap referenced by this entry method is changed.

Tese case of Nutzboot.txt

Please check whether the changes of this variable value will affect your semantic behaviors.

from nutzboot.

ywjno avatar ywjno commented on May 25, 2024

@HelloCoCooo はい、できます。リクエスト大歓迎です。

from nutzboot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.