Community
Participate
Working Groups
After trying one of the latest builds towards M5 (I20110124-1800), we in WTP got a compile error related to IMarker::setAttributes(Map<String,Object> attributes) See WTP bug 335271. We had a call that (previously) used HashMap<String,Integer> as a parameter, and now gives compile error. Fairly sure IMarker changed from M4 to M5 (not our code). And, I'll admit I don't understand generics well ... but is this the kind of change that is "binary compatible" but not "source compatible"? (Or, could it be a JDT compiler bug?) Conceptually, sure seems like it should be fine, but, again, maybe I'm looking at it wrong. Thought I'd open this bug to at least let you know of the impact, even if not a true bug. I'm not sure of your practice, but maybe deserves mention if "migration guide" even if merely a source compatible issue?
Yes, this a source-level bug, it should be public void setAttributes(Map<String, ? extends Object> attributes) throws CoreException; It'll work at runtime due to erasure.
Created attachment 187571 [details] patch 1 Patch for the issue.
I think this needs to be fixed for M5 or people will run into it...
Created attachment 187573 [details] test1 Fixes the generics warnings in MarkerTest.
John, this is a potential API breakage, can this go into M5?
Yes this source incompatibility was made unintentionally during generification of the API. Thanks for reporting it, and thanks for the patch James. I have released it immediately to make sure it gets in the M5 candidate build.
James could you verify the bug when the next IBuild is ready?
Just to cross-reference, for a possible similar case (in third party code, ICU), see bug 337699.