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 8489163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:45:03+00:00 2026-06-10T21:45:03+00:00

Is anybody face such problem? Some fields marked with warning The field is never

  • 0

Is anybody face such problem?

Some fields marked with warning “The field is never read locally”:

enter image description here

but when I suppress warning, it Eclipse starts claim that this is unnecessary:

enter image description here

As result, I can’t get rid of warnings.

Eclipse SDK 3.6.2

EDITED:

The BlockBase class intended to be abstract. But adding abstract keyword to class and changing constructor visibility to protected doesn’t change anything. I guess the real reason for this behavior that class market as private and thus compiler assumes that fields should be accessed from inside the class visibility area. It doesn’t take into account, that these fields may be accessed from children, which have another visibility (public class DataBlock extends BlockBase).

I changed BlockBase visibility to protected and it solved the problem. I don’t like to change it to public, because it will cause that BlockBase will be visible from outside the parent class, but changing visibility to protected doesn’t change anything, because I parent class don’t have inherited classes.

But anyway, this compiler behavior is incorrect.

enter image description here

EDIT 2

-or-

HOW TO REPRODUCE THE PROBLEM

1. First file:

public class testClass {

    private abstract class x
    {
        public int theProblem;
    }

    public class y extends x 
    {
    }

}

2. Second file:

public class anotherClass {

    public void accessToTheProblem()
    {
        testClass.y a = (new testClass()).new y();
        a.theProblem = 5;
        Log.i("TEST", "See, I can read theProblem: " + a.theProblem);
    }

}

Under Eclipse SDK 3.6.2 you will see that theProblem declaration market with Warning:

The field is never read locally

  • 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-06-10T21:45:05+00:00Added an answer on June 10, 2026 at 9:45 pm

    Perhaps you are intending BlockBase to be an abstract class like BaseAdapter?

    • If you don’t plan on declaring a BlockBase object with blockBase = new BlockBase(widget); then add abstract to your class definition and remove your constructor. The compiler will understand that you plan to use these variables in a child class and it will remove the warnings.

    • Otherwise the compiler is right, you should removes those variables because they will never be used in BlockBase. (If you plan to use them in DataBlock, then cut & paste them in there but they are meaningless to BlockBase.)

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

Sidebar

Related Questions

Did anybody face to such issue? I have CKEditor completely installed and worked BUT
Does anybody know which,currently,is the best library for realizing a real time face-tracking solution
I know this question is general but I am always face to face this
Now before you face palm and click on duplicate entry or the like, read
I'm having a strange issue with some @font-face text where there is some strange
I have face a problem that all my app in my iphone is not
I'm very new in this blog and also in IT field. I've a problem
the problem i am face right now is i can't pass a variable from
My problem is pretty simple, but I just can't solve it by myself. Does
I try to read education details from face book using JSON in IPhone. I

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.