Skip to main content



      Home
Home » Newcomers » Newcomers » What is "Unqualified access to the field"?
What is "Unqualified access to the field"? [message #189946] Thu, 25 January 2007 09:23 Go to next message
Eclipse UserFriend
Originally posted by: www.nospam.net

Hi,

In the setting of "Error/Warining/Ignore" in Project->Property->Java
compiler, I have just turned on waring to "Unqualified access to the
field". After rebuild, there are many warnings now.(Before, there was none.)

I look at them. With my Java knowledge, I don't understand why they are
wrong and should be warned. For example,

public class MyClass
{
private int x;

MyClass(int w)
{
x = w; //Now, there is a warning here, saying "Unqualified access to
the field". I don't understand it
}

...//other code


}

Thank you very much.
Re: What is "Unqualified access to the field"? [message #189972 is a reply to message #189946] Thu, 25 January 2007 10:32 Go to previous message
Eclipse UserFriend
Originally posted by: pgodeau_nosp.m_sapex-alma.com

www a écrit :
> Hi,
>
> In the setting of "Error/Warining/Ignore" in Project->Property->Java
> compiler, I have just turned on waring to "Unqualified access to the
> field". After rebuild, there are many warnings now.(Before, there was
> none.)
>
> I look at them. With my Java knowledge, I don't understand why they are
> wrong and should be warned. For example,
>
> public class MyClass
> {
> private int x;
>
> MyClass(int w)
> {
> x = w; //Now, there is a warning here, saying "Unqualified
> access to the field". I don't understand it
> }
>
> ...//other code

Hi,

RTFM:
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. jdt.doc.user/reference/preferences/java/compiler/ref-prefere nces-errors-warnings.htm


When enabled, the compiler will issue an error or a warning whenever it
encounters a field access which is not qualified (eg. misses a 'this').

=> change "x" to "this.x".
Previous Topic:Debugging Java interface to 3rd party .exe
Next Topic:Console/Command Prompt window in eclipse
Goto Forum:
  


Current Time: Wed Jul 16 08:50:42 EDT 2025

Powered by FUDForum. Page generated in 0.33888 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top