Announcement Announcement Module
Collapse
No announcement yet.
SpringIDE warns non-public init method, but Springs calls it Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SpringIDE warns non-public init method, but Springs calls it

    JDK 1.4.2, Spring 1.2.8, Eclipse 3.3.1.1, SpringIDE 2.0.1.

    I was looking at the warnings that Eclipse was giving me on some code, and I noticed a warning due to the SpringIDE (I assume), complaining that the method specified on an "init-method" attribute is not public.

    However, what I noticed is that Spring happily calls that private method at init time. Is this warning just a "this should probably be public, but it'll work if it's not" statement?

  • #2
    However, what I noticed is that Spring happily calls that private method at init time. Is this warning just a "this should probably be public, but it'll work if it's not" statement
    This is meant to be a warning of the sort you mentioned. If the init-method is not found, you'll get an error.

    Is this behavior ok for you?

    Christian

    Comment


    • #3
      As it is, the warning is deceptive, and probably counter-productive. It makes it seem like there's some negative impact to having the method be private, when in fact there appears to be no impact at all. If the method doesn't need to be public, then making it so makes it more available to be accessed inadvertently.

      Comment


      • #4
        I clearly see your point here. Can you please go ahead and create a JIRA issue for this. We can then see if there is anybody with a different opinion.

        I would be happy for remove that warning.

        Christian

        Comment

        Working...
        X