Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 426728

Summary: [hotbug] @regression: DefaultInferenceProvider is always enabled
Product: [WebTools] JSDT Reporter: Victor Rubezhny <vrubezhny>
Component: GeneralAssignee: Victor Rubezhny <vrubezhny>
Status: RESOLVED FIXED QA Contact: Chris Jaun <cmjaun>
Severity: blocker    
Priority: P3 CC: cbridgha, cmjaun, david_williams, kaloyan, naci.dai, neil.hauge, paul.verest, raghunathan.srinivasan, thatnitind, vrubezhny, zulus
Version: 3.5.1Flags: vrubezhny: pmc_approved? (david_williams)
vrubezhny: pmc_approved? (raghunathan.srinivasan)
vrubezhny: pmc_approved? (naci.dai)
vrubezhny: pmc_approved? (neil.hauge)
cbridgha: pmc_approved+
vrubezhny: pmc_approved? (kaloyan)
cmjaun: review+
Target Milestone: 3.5.2   
Hardware: PC   
OS: Mac OS X   
Whiteboard: PMC_Approved
Bug Depends on: 419871    
Bug Blocks:    
Attachments:
Description Flags
Patch that backports the fix for Bug 419871 to R3_5_maintenance branch none

Description Victor Rubezhny CLA 2014-01-27 11:20:35 EST
+++ This bug was initially created as a clone of Bug #419871 +++

In ExtJS plugin I used InferrenceProvider.ONLY_THIS to disable DefaultInferenceProvider, because is not possible to remove InfererredType from CompilationResult.

I don't know why, but now its hardcoded:

Class: org.eclipse.wst.jsdt.core.infer.InferrenceManager, line 112
Comment 1 Victor Rubezhny CLA 2014-01-27 11:38:52 EST
The issue is the regression made by fixing bug [384319] (CPU utilization to 100% when this is appended to new object definition) in commit ec87a3b8e0a51fc2baec20756c00429d9e68a587
This regression was found (see [419871] - DefaultInferenceProvider is always enabled) and fixed in master in commit 802e0ab714f7e3f9bf852ce72689628b218e9e62

The fix for Luna WTP 3.6 was provided and tested by Jason Peterson <jasonpet@us.ibm.com>  2013-07-15 23:11:57.

Backport to WTP 3.5.2 for the fix is requested by the adopters.

Explain why you believe this is a stop-ship defect:
* It's not possible for adopters to remove InferredType from CompilationResult, when new InferrenceProvider is added using InferrenceProvider.ONLY_THIS option.

Is there a work-around? If so, why do you believe the work-around is insufficient?
* No, DefaultInferrenceProvider to InferrenceManager is is always added to InferrenceManager in addition to any Inferrence Provider implemented by an adopter that is added using InferrenceProvider.ONLY_THIS option.

How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added?
* Tested with JSDT JUnit tests on R3_5_maintenance branch. All tests are passed with no errors.

Give a brief technical overview. Who has reviewed this fix?
* The adding of DefaultInferrenceProvider to InferrenceManager is hardcoded in line 112 of InferrenceManager, so it's always added to the new Inferrence Provider (from adopters).


What is the risk associated with this fix?
* Low. All JUnit Tests are good after applying the patch in R3_5_maintenance branch. Smoke testing shows that Content Assist/Validation/Outline View works as expected when DefaultInferrenceManager is used.
Comment 2 Victor Rubezhny CLA 2014-01-27 11:44:51 EST
Created attachment 239354 [details]
Patch that backports the fix for Bug 419871 to R3_5_maintenance branch
Comment 3 Chris Jaun CLA 2014-01-27 13:45:26 EST
Thanks for pushing this forward, Victor. You can mark for PMC approval.
Comment 4 Chuck Bridgham CLA 2014-01-29 09:29:14 EST
Thanks for the fix...
Comment 6 Dawid Pakula CLA 2014-01-29 09:54:41 EST
Thanks for the fix!