Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 239048 Details for
Bug 406786
[1.8][extract method] Extract Method refactoring in interfaces not handled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch + Tests
Fixed-Bug-406786-18extract-method-Extract-Method-ref.patch (text/plain), 3.43 KB, created by
Martin Mathew
on 2014-01-15 22:11:21 EST
(
hide
)
Description:
Patch + Tests
Filename:
MIME Type:
Creator:
Martin Mathew
Created:
2014-01-15 22:11:21 EST
Size:
3.43 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui.tests.refactoring >diff --git resources/ExtractMethodWorkSpace/ExtractMethodTests/defaultMethods18_in/A_test5.java resources/ExtractMethodWorkSpace/ExtractMethodTests/defaultMethods18_in/A_test5.java >new file mode 100644 >index 0000000..741135a >--- /dev/null >+++ resources/ExtractMethodWorkSpace/ExtractMethodTests/defaultMethods18_in/A_test5.java >@@ -0,0 +1,11 @@ >+package defaultMethods_in; >+ >+public interface A_test5 { >+ default int foo() { >+ /*[*/return 0;/*]*/ >+ } >+ >+ static int foo() { >+ return 0; >+ } >+} >diff --git resources/ExtractMethodWorkSpace/ExtractMethodTests/defaultMethods18_out/A_test5.java resources/ExtractMethodWorkSpace/ExtractMethodTests/defaultMethods18_out/A_test5.java >new file mode 100644 >index 0000000..a88cbb8 >--- /dev/null >+++ resources/ExtractMethodWorkSpace/ExtractMethodTests/defaultMethods18_out/A_test5.java >@@ -0,0 +1,15 @@ >+package defaultMethods_out; >+ >+public interface A_test5 { >+ default int foo() { >+ return extracted(); >+ } >+ >+ static int extracted() { >+ /*[*/return 0;/*]*/ >+ } >+ >+ static int foo() { >+ return extracted(); >+ } >+} >diff --git test cases/org/eclipse/jdt/ui/tests/refactoring/ExtractMethodTests18.java test cases/org/eclipse/jdt/ui/tests/refactoring/ExtractMethodTests18.java >index 43eb52e..e8d4fbc 100644 >--- test cases/org/eclipse/jdt/ui/tests/refactoring/ExtractMethodTests18.java >+++ test cases/org/eclipse/jdt/ui/tests/refactoring/ExtractMethodTests18.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2013 IBM Corporation and others. >+ * Copyright (c) 2013, 2014 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -83,6 +83,10 @@ > defaultMethodsTest(1, Modifier.PUBLIC); > } > >+ public void test5() throws Exception { >+ defaultMethodsTest(0, Modifier.PUBLIC); >+ } >+ > //==================================================================================== > // Testing Static Methods > //==================================================================================== >#P org.eclipse.jdt.ui >diff --git core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractMethodRefactoring.java core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractMethodRefactoring.java >index 6ed9c56..90fc023 100644 >--- core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractMethodRefactoring.java >+++ core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractMethodRefactoring.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2013 IBM Corporation and others. >+ * Copyright (c) 2000, 2014 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -1009,7 +1009,7 @@ > currentParent= currentParent.getParent(); > } while (!shouldBeStatic && currentParent != null && currentParent != fDestination); > >- if (shouldBeStatic || fAnalyzer.getForceStatic()) { >+ if (shouldBeStatic || fAnalyzer.getForceStatic() || forceStatic()) { > modifiers|= Modifier.STATIC; > } else if (isDestinationInterface) { > modifiers|= Modifier.DEFAULT;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 406786
:
234655
|
236008
| 239048