Uploaded image for project: 'SLF4J'
  1. SLF4J
  2. SLF4J-418

Add JSR 305 to SLF4j

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 2.0.0-alpha0, 1.8.0-alpha2
    • Core API
    • normal

    Description

      A few years ago, attempts have been made to implement JSR 305 in SLF4j. This was rolled back due to a Scala compiler issue, which, 5 years later, still hasn't been fixed. In the meantime, other libraries, like Guava, most of Square's libraries (https://medium.com/square-corner-blog/rolling-out-nullable-42dd823fbd89), the Spring framework, etc, have implemented JSR 305. JSR 305 is now supported by tools like Findbugs, and languages like Kotlin, and IDEs like Eclipse and IntelliJ make use of this meta information to detect bugs. 

      I hope that by now, we can also add JSR 305 information into SLF4j. If the Scala issue is still an issue, it seems that this issue should either be fixed by Lightbend, or they will run into issues with other frameworks anyway. Anyhow, IMO, it seems the Scala compiler should not be a reason to withhold this change from happening. 

      The main motivation is that it will make programming in Kotlin easier (right now, types from SLF4j are platform types, and the compiler has no information if this is a nullable or non-nullable type, making SLF4j harder to use), but, as a side effect, it will help IDEs and other tooling.

       

       

      Attachments

        Activity

          People

            slf4j-dev SLF4J developers list
            bodiam Erik Pragt
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: