Bug 96464 - [assist] JavaCorePreferenceInitializer does not initialized CODEASSIST_DISCOURAGED_REFERENCE_CHECK
Summary: [assist] JavaCorePreferenceInitializer does not initialized CODEASSIST_DISCOU...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.1 RC1   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-24 13:16 EDT by Tom Hofmann CLA
Modified: 2005-05-27 09:09 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hofmann CLA 2005-05-24 13:16:40 EDT
N20050524

David, I guess JavaCorePreferenceInitializer.initializeDefaultPreferences should
also initialize CODEASSIST_DISCOURAGED_REFERENCE_CHECK - it currently
initializes CODEASSIST_FORBIDDEN_REFERENCE_CHECK twice.
Comment 1 David Audel CLA 2005-05-24 13:28:05 EDT
That's right

Fixed.
Comment 2 David Audel CLA 2005-05-25 09:14:57 EDT
I made the same error inside AssistOptions#set(Map optionsMap)

This code 

if ((optionValue = optionsMap.get(OPTION_OPTION_PerformForbiddenReferenceCheck))
!= null) {
	if (ENABLED.equals(optionValue)) {
		this.checkDiscouragedReference = true;
	} else if (DISABLED.equals(optionValue)) {
		this.checkDiscouragedReference = false;
	}
}

must be

if ((optionValue = optionsMap.get(OPTION_PerformDiscouragedReferenceCheck)) !=
null) {
	if (ENABLED.equals(optionValue)) {
		this.checkDiscouragedReference = true;
	} else if (DISABLED.equals(optionValue)) {
		this.checkDiscouragedReference = false;
	}
}

Fixed.
Comment 3 Maxime Daniel CLA 2005-05-27 07:35:08 EDT
Verified on build I20050527-0010.