Code Monkey home page Code Monkey logo

Comments (12)

fpapon avatar fpapon commented on May 28, 2024 1

May be just adding the dependency in optional scope will be enough

from shiro.

lprimak avatar lprimak commented on May 28, 2024

I am not certain this is a bug. I believe the code started as optional, but later became required, but the optionality was not removed from the code.
IMHO it would be too much of a risk to make it optional at this time, because it would mysteriously break functionality existing applications currently rely on and require inclusions of explicit additional dependency for existing applications.

Perhaps the "action item" is to remove the above reflection / if statement from the code itself?

from shiro.

lprimak avatar lprimak commented on May 28, 2024

Maybe someone else can chime in?

from shiro.

fpapon avatar fpapon commented on May 28, 2024

I think this is a bug, I will go deeper.

It's well optional on config-ogdl:

<optional>true</optional>

But not in core:

<groupId>org.apache.commons</groupId>

from shiro.

lprimak avatar lprimak commented on May 28, 2024

Maybe not a bug but a code smell? Perhaps the required dependency should be moved into ogdl and removed from core but net effect wouldn't change

from shiro.

fpapon avatar fpapon commented on May 28, 2024

@lprimak the problem was introduced in this commit:
5755721

Can you explain why adding a provided dependency because of compiler warning?

from shiro.

lprimak avatar lprimak commented on May 28, 2024

I remember... it's an OSGi warning from the bnd plugin

from shiro.

lprimak avatar lprimak commented on May 28, 2024

I will try a PR to fix it then... thanks for your research @fpapon

from shiro.

fpapon avatar fpapon commented on May 28, 2024

The warning from the bnd plugin comes from these lines:

org.apache.commons.configuration2*;resolution:=optional,

I will make some test in Karaf to see why we need them. I think we don't need to add these import package because we are not using them.

from shiro.

lprimak avatar lprimak commented on May 28, 2024

No need. Making it optional in core worked and there is no warning

from shiro.

lprimak avatar lprimak commented on May 28, 2024

@papegaaij Thank you for the report! This snuck in during build / code cleanup

from shiro.

papegaaij avatar papegaaij commented on May 28, 2024

No problem. I just happen to notice it because commons-configuration2 triggered a failure due to its dependency on a javax API. Thanks for fixing this!

from shiro.

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.