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

Bug 214283

Summary: [formatter] Blank lines option should consider a virtual/interface method
Product: [Eclipse Project] JDT Reporter: arie <aozarov>
Component: CoreAssignee: Mateusz Matela <mateusz.matela>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: aozarov, daniel_megert, eric_jodet, jarthana, loskutov, mateusz.matela, omax
Version: 3.4   
Target Milestone: 4.13 M3   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/147018
https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=d0c76762c053346997553cc62592c904876efdf6
https://git.eclipse.org/r/147078
https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=ac5a0e2c39ff6c70d6c8b57c09438d1a453cc7fe
https://git.eclipse.org/r/147746
https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=bfcc7f5fdc65e15bba873c742cf55b3775854f71
Whiteboard:
Bug Depends on:    
Bug Blocks: 550083    

Description arie CLA 2008-01-03 17:28:42 EST
In my case I would prefer not to have a blank line between methods that don't have declaration such as in interfaces
Comment 1 Dani Megert CLA 2008-01-07 04:18:10 EST
You mean methods without body, right?
Comment 2 arie CLA 2008-01-07 20:48:39 EST
Right, sorry for not being clear.
Comment 3 Eclipse Genie CLA 2019-08-04 09:27:10 EDT
New Gerrit change created: https://git.eclipse.org/r/147018
Comment 5 Andrey Loskutov CLA 2019-08-05 04:33:20 EDT
(In reply to Eclipse Genie from comment #4)
> Gerrit change https://git.eclipse.org/r/147018 was merged to [master].
> Commit:
> http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/
> ?id=d0c76762c053346997553cc62592c904876efdf6

This commit caused two test regressions, Mateusz, please check:

https://download.eclipse.org/eclipse/downloads/drops4/I20190804-1800/testresults/html/org.eclipse.jdt.ui.tests.refactoring_ep413I-unit-cen64-gtk3-java8_linux.gtk.x86_64_8.0.html

test33

expected:<...blic <T> void b(){} [] public <T> void a(...> but was:<...blic <T> void b(){} [ ] public <T> void a(...>

junit.framework.ComparisonFailure: expected:<...blic <T> void b(){}
[] public <T> void a(...> but was:<...blic <T> void b(){}
[
] public <T> void a(...>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.TestCase.assertEquals(TestCase.java:261)
at org.eclipse.jdt.ui.tests.refactoring.RefactoringTest.assertEqualLines(RefactoringTest.java:644)
at org.eclipse.jdt.ui.tests.refactoring.RefactoringTest.assertEqualLines(RefactoringTest.java:628)
at org.eclipse.jdt.ui.tests.refactoring.ConvertAnonymousToNestedTests.helper1(ConvertAnonymousToNestedTests.java:172)
at org.eclipse.jdt.ui.tests.refactoring.ConvertAnonymousToNestedTests.test33(ConvertAnonymousToNestedTests.java:398)

and in

https://download.eclipse.org/eclipse/downloads/drops4/I20190804-1800/testresults/html/org.eclipse.jdt.ui.tests_ep413I-unit-cen64-gtk3-java8_linux.gtk.x86_64_8.0.html


testAllCleanUps

Content not as expected for junit.framework.TestListener.java expected:<...test, Throwable t); [ /** * A failure occurred. */ void addFailure(Test test, AssertionFailedError t); /** * A test ended. */ void endTest(Test test);] /** * A te...> but was:<...test, Throwable t); [ /** * A failure occurred. */ void addFailure(Test test, AssertionFailedError t); /** * A test ended. */ void endTest(Test test); ] /** * A te...>

junit.framework.ComparisonFailure: Content not as expected for junit.framework.TestListener.java expected:<...test, Throwable t);
[ /**
* A failure occurred.
*/
void addFailure(Test test, AssertionFailedError t);
/**
* A test ended.
*/
void endTest(Test test);]
/**
* A te...> but was:<...test, Throwable t);
[
/**
* A failure occurred.
*/
void addFailure(Test test, AssertionFailedError t);

/**
* A test ended.
*/
void endTest(Test test);
]
/**
* A te...>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.TestCase.assertEquals(TestCase.java:261)
at org.eclipse.jdt.ui.tests.quickfix.CleanUpStressTest.testAllCleanUps(CleanUpStressTest.java:5322)
Comment 6 Andrey Loskutov CLA 2019-08-05 05:31:33 EDT
(In reply to Andrey Loskutov from comment #5)
> (In reply to Eclipse Genie from comment #4)
> > Gerrit change https://git.eclipse.org/r/147018 was merged to [master].
> > Commit:
> > http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/
> > ?id=d0c76762c053346997553cc62592c904876efdf6
> 
> This commit caused two test regressions, Mateusz, please check:

Also those fails are seen on jdt.ui Gerrit and that hinders others to contribute. Would be nice to fix it ASAP or revert the change.
Comment 7 Eclipse Genie CLA 2019-08-05 15:18:56 EDT
New Gerrit change created: https://git.eclipse.org/r/147078
Comment 9 Mateusz Matela CLA 2019-08-05 16:07:35 EDT
Sorry about that, just updated the tests.
Comment 10 Andrey Loskutov CLA 2019-08-06 02:52:16 EDT
(In reply to Mateusz Matela from comment #9)
> Sorry about that, just updated the tests.

Thanks for a quick fix, tests are green again.
Comment 11 Eclipse Genie CLA 2019-08-14 17:08:32 EDT
New Gerrit change created: https://git.eclipse.org/r/147746
Comment 13 Jay Arthanareeswaran CLA 2019-08-21 10:12:16 EDT
Verified for 4.13 M3 using build I20190820-1800