Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-15820

[Kotlin] Warning message about private final methods.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 5.0 RC2
    • Fix Version/s: 5.0 RC4
    • Component/s: Core
    • Labels:
    • Last commented by a User:
      true

      Description

      Recently in Kotlin version 1.1.2 there was a change regarding opening (making not final) Koltin classes . Now private methods are not being opened. This is actual change:

      https://github.com/JetBrains/kotlin/commit/5d4cefcc30615284b1b28d0fe0653f738371c167

      Unfortunately Spring is very verbose regarding printing warning into logs about final methods. Which leads to a warning about private final methods like this:

      "INFO org.springframework.aop.framework.CglibAopProxy - Final method [private final ...] cannot get proxied via CGLIB: Calls to this method will NOT be routed to the target instance and might lead to NPEs against uninitialized fields in the proxy instance."

      https://github.com/spring-projects/spring-framework/blob/0d0b879a2313b73bf85abfe45ff0a59897aa6a3e/spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java#L262

      As discussed with Sebastien Deleuze @koltinlang Slack this should be checked only for public and protected methods.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            sdeleuze S├ębastien Deleuze
            Reporter:
            dbacinski Dariusz Bacinski
            Last updater:
            St├ęphane Nicoll
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              8 weeks, 3 days ago