Bug 508561 - Formatter missing space between method type parameters and return type
Summary: Formatter missing space between method type parameters and return type
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.6   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.6 M6   Edit
Assignee: Mateusz Matela CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2016-12-01 15:38 EST by Ryan Gustafson CLA
Modified: 2017-03-08 00:51 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Gustafson CLA 2016-12-01 15:38:28 EST
The formatter misses a space between method type parameters and the return type, when the method type parameters provide type arguments.  For example:

interface Foo {
	<T> void bar(); // Ok
	<T extends Enum<T>>void baz(); // Missing space
}

This is with 4.6.1 (Neon.1a).
Comment 1 Jay Arthanareeswaran CLA 2016-12-05 00:57:17 EST
I believe this was fixed recently but can't dig out the bug number.

Mateusz, do you recall the bug report for that?

Ryan, if you can grab a recent build from 4.7 stream, you can see it working as expected.
Comment 2 Ryan Gustafson CLA 2016-12-09 14:14:43 EST
I pulled down the Oxygen M3 build and the above example formats as desired.
Comment 3 Mateusz Matela CLA 2016-12-11 16:40:45 EST
(In reply to Jay Arthanareeswaran from comment #1)
> Mateusz, do you recall the bug report for that?

I don't recall fixing a bug like that.
Also, I can't reproduce it with default settings in any version of Eclipse I tried. Ryan, did the problem occur only for a specific formatter profile? Could you share it?
Comment 4 Ryan Gustafson CLA 2016-12-12 13:38:36 EST
I tried using our formatter settings in stock 4.6 and 4.7 M3 installs an it's not happening.  I'll do more testing to see if I can isolate it further, we have numerous plugins installed.
Comment 5 Mateusz Matela CLA 2017-02-07 16:53:50 EST
No further feedback, closing.
Comment 6 Sasikanth Bharadwaj CLA 2017-03-08 00:51:06 EST
Verified for 4.7 M6 using I20170307-2000 build