Community
Participate
Working Groups
Created attachment 213982 [details] patch v0.1 This is a request to backport the fix for bug 24804 to 3.6.2+.
Hi Marek, what's the motivation behind the backport? Note that it was not a regression.
Hello, this problem was classified as data loss that is why I was asked to create bugzilla backport request.
(In reply to comment #2) > Hello, this problem was classified as data loss that is why I was asked to > create bugzilla backport request. Yes, I'm reviewing it for backport. Thanks.
The code in org.eclipse.jdt.internal.core.dom.rewrite.ImportRewriteAnalyzer.addExistingImports(CompilationUnit) lines 281 - 297 is not right in the way it calculates ranges of comments before and after an import. However, I've not able to trigger the code that finally uses the two new fields org.eclipse.jdt.internal.core.dom.rewrite.ImportRewriteAnalyzer.ImportDeclEntry.precedingCommentRange and trailingCommentRange via the get..() methods, such that they have non-null values. Even the new tests don't trigger that condition. I'll keep trying and open a new bug.
The backport should be done when bug 376930 is fixed.
This patch is good if applied with the fix for bug 376930. Dani, need your +1 as well.
(In reply to comment #6) > This patch is good if applied with the fix for bug 376930. > > Dani, need your +1 as well. What's the patch to backport? The attached one? It does not include any test cases.
(In reply to comment #7) > What's the patch to backport? The attached one? It does not include any test > cases. Marek and I assumed that tests are not backported. If they are, then I guess the whole patch from bug 24804 should be backported.
Created attachment 214395 [details] patch + tests to backport This is the full patch taken from bug 24804. It also contains a JDT.UI test - ImportOrganizeTest.
(In reply to comment #9) > Created attachment 214395 [details] [diff] > patch + tests to backport > > It also contains a JDT.UI test ImportOrganizeTest. That I'd leave out, because it creates additional work on the JDT UI side for the backport.
+1 to backport this along with bug 376930, excluding the JDT UI tests.
(In reply to comment #11) > +1 to backport this along with bug 376930, excluding the JDT UI tests. I and Dani decided that these tests are necessary to be backported to reflect the new behaviour because of the patch. Hence, raised bug 378068 to track the UI backport.
Backported to R3_7_maintenance via commit ea81eedacd738fc30b5cea61e33c1c4e17dac10d
Backported to R3_6_maintenance_Java7 via http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=R3_6_maintenance_Java7&id=bb70a07ef59d4ffe60f5b0225d8ab9c105041bd8
Please also backport to 3.6.2+.
Released in 362+ via http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=R3_6_maintenance&id=e795ef784de39eb3529f1750c2504b9afe37e6d0