diff options
author | Lars Vogel | 2020-02-11 15:18:31 +0000 |
---|---|---|
committer | Lars Vogel | 2020-02-11 15:18:31 +0000 |
commit | 6af02804146fcf9a39542dbf81fb01e4ea0707a0 (patch) | |
tree | a9171b76db443646ee79659abe23fe6974eb2e09 | |
parent | 20cd676b96091918641baaf7c764b38af96c2cee (diff) | |
download | eclipse.platform.team-6af02804146fcf9a39542dbf81fb01e4ea0707a0.tar.gz eclipse.platform.team-6af02804146fcf9a39542dbf81fb01e4ea0707a0.tar.xz eclipse.platform.team-6af02804146fcf9a39542dbf81fb01e4ea0707a0.zip |
Clean-up use lambdas and method referencesI20200211-1800
Using the JDT cleanup action ->
- Use lambda where possible
- Simplify lambda expression and method reference syntax
Change-Id: If567a82649e092753fd7fe3a3495a311cc7df8fd
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
2 files changed, 2 insertions, 6 deletions
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ConfigurationWizard.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ConfigurationWizard.java index 02a7f59b3..fe445995c 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ConfigurationWizard.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ConfigurationWizard.java @@ -100,11 +100,7 @@ public class ConfigurationWizard extends Wizard implements IConfigurationWizard, public <T> T getAdapter(Class<T> adapter) { if (adapter == IConfigurationWizardExtension.class) { - return adapter.cast(new IConfigurationWizardExtension(){ - public void init(IWorkbench workbench, IProject[] projects) { - setProjects(projects); - } - }); + return adapter.cast((IConfigurationWizardExtension) (workbench, projects) -> setProjects(projects)); } return null; } diff --git a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchTest.java b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchTest.java index db032b057..ae03b254c 100644 --- a/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchTest.java +++ b/tests/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchTest.java @@ -318,7 +318,7 @@ public class PatchTest extends TestCase { File patchdataFolderFile = patchdataFolderPath.toFile(); assertTrue(patchdataFolderFile.isDirectory()); File[] listOfSubfolders = patchdataFolderFile - .listFiles((FileFilter) pathname -> pathname.isDirectory()); + .listFiles((FileFilter) File::isDirectory); for (File subfolder : listOfSubfolders) { Path pcPath = new Path(subfolder.getPath() + "/" + PATCH_CONFIGURATION); File pcFile = pcPath.toFile(); |