Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6606399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:23:30+00:00 2026-05-25T19:23:30+00:00

How can I suppress the following error with the @SuppressWarning annotation? The method Foo.trololo()

  • 0

How can I suppress the following error with the @SuppressWarning annotation?

The method Foo.trololo() does not override the inherited method from Bar since it is private to a different package

So far as I can tell the only way is to blanket the entire method with @SuppressWarning("all") which I would prefer not to do.


For clarification: The naming and scope of both methods is a deliberate choice and the two classes were deliberately put into different packages knowing the methods would not be visible to each other. I am merely looking to declare that I acknowledge what I am doing and would not like to be warned of it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:23:31+00:00Added an answer on May 25, 2026 at 7:23 pm

    What it means (you probably know this already)

    It means that, even though your method has the same name as a (non-private) method in the super class, it doesn’t override that method.

    Regarding the warning message

    This is an Eclipse-specific warning. Nothing in the language spec says that it should produce this warning. It’s an "IDE-specific feature" if you so like. Therefore there is no "generic" way of suppressing the message.

    (Note for instance that javac does not produce this warning.)

    How to disable this warning (in Eclipse)

    (I know you are not looking for this, but some other visitor of this page may!)

    To disable this warning, you go to

           Window -> Preferences -> Java -> Compiler -> Errors / Warnings

    and set "Method does not override package visible method" to "Ignore".

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I suppress following warning from gcc linker: warning: the use of 'mktemp'
How can I suppress hyphens (------------) from the results set of this sqlcmd command:
In the following LaTeX fragment, how can I suppress the newline that is automatically
I would like to implement the following suggestion from CodeContracts: CodeContracts: MyModule: Method MyModule.MyClass.MyMethod:
How can i suppress words in a DIV (which has a defined width and
I need to suppress a specfic compiler warning in C#. Now I can do
I have the following try-catch statement and I do not want to not throw
Consider the following Java function: public void foo(Class<? extends Exception> cl, List<? extends Exception>
i have the following code, and i want to know how can supress the
I have read that I can suppress this noise by defining a form accept

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.