Bug 138672 - Bad code completion formatting for Collections.synchronizedMap
Summary: Bad code completion formatting for Collections.synchronizedMap
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.2 RC2   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-26 12:48 EDT by Kahli Burke CLA
Modified: 2007-07-29 09:19 EDT (History)
1 user (show)

See Also:


Attachments
Proposed fix (3.06 KB, patch)
2006-04-27 11:38 EDT, Olivier Thomann CLA
no flags Details | Diff
Regression test (2.49 KB, patch)
2006-04-27 11:40 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kahli Burke CLA 2006-04-26 12:48:31 EDT
Just noticed that in 3.2RC1a I get some incorrectly formatted code completion when creating a synchronized map.  I've only noticed this for this one method but there are probably others out there.  The completion is available, but I get the following in the drop down and when I select it:

Map m = Collections.synchronizedMap(java.util">Map</A>&lt;K)

Perhaps the parser of the method signature is having problems with this case of generics, or maybe there is something strange in the Javadoc for that class?  Not a serious issue but I thought I would report it since I couldn't find it in the bug system currently.
Comment 1 Dani Megert CLA 2006-04-27 02:25:34 EDT
Looks like wrong extraction from Javadoc.
Are you using 5.0 or 1.4?
Comment 2 Kahli Burke CLA 2006-04-27 02:55:58 EDT
Here's the info for the JDK I run Eclipse with and have configured as the compiler for the project:

Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-112)
Java HotSpot(TM) Client VM (build 1.5.0_06-64, mixed mode, sharing)

This is the JDK for OS X.

Thanks.
Comment 3 Philipe Mulet CLA 2006-04-27 05:05:59 EDT
+1 for 3.2RC2
Comment 4 Olivier Thomann CLA 2006-04-27 10:15:02 EDT
The parameter source is:
<A HREF="../../java/util/Map.html" title="interface in java.util">Map</A>&lt;K,V&gt; m
And the parameter name is not extracted properly. I am splitting on the ',', and this doesn't work well in case of generic types.
I am investigating how to split them in order to get the 'm' part.
Comment 5 Olivier Thomann CLA 2006-04-27 11:38:40 EDT
Created attachment 39679 [details]
Proposed fix
Comment 6 Olivier Thomann CLA 2006-04-27 11:40:10 EDT
Created attachment 39680 [details]
Regression test
Comment 7 Olivier Thomann CLA 2006-04-27 11:40:54 EDT
Fixed and released in HEAD.
Regression test added in org.eclipse.jdt.core.tests.model.AttachedJavadocTests.test019
Comment 8 Olivier Thomann CLA 2006-04-28 14:07:32 EDT
Verified with I20060427-1600 for 3.2RC2
Comment 9 Eclipse Webmaster CLA 2007-07-29 09:19:40 EDT
Changing OS from Mac OS to Mac OS X as per bug 185991