diff options
author | Alexander Kurtakov | 2017-08-18 06:35:09 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2017-08-18 06:35:09 +0000 |
commit | d23b6e4b43746a1d76f36c249b85d11e263a0640 (patch) | |
tree | 7d86e15b222120df17e5a4fdd3755b05deb68ff6 | |
parent | 303fccc20ec9c678324bba79f5f52749237d243f (diff) | |
download | eclipse.platform.ui.tools-d23b6e4b43746a1d76f36c249b85d11e263a0640.tar.gz eclipse.platform.ui.tools-d23b6e4b43746a1d76f36c249b85d11e263a0640.tar.xz eclipse.platform.ui.tools-d23b6e4b43746a1d76f36c249b85d11e263a0640.zip |
Bug 521096 - Move o.e.e4.tools.tests to Java 8
Bump minor, stricter warnings and adapt code to Java 8.
Change-Id: I5cdee1daca48fb2798d8cff40e472214e1e3fab8
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
4 files changed, 29 insertions, 21 deletions
diff --git a/tests/org.eclipse.e4.tools.test/.classpath b/tests/org.eclipse.e4.tools.test/.classpath index 098194ca..eca7bdba 100644 --- a/tests/org.eclipse.e4.tools.test/.classpath +++ b/tests/org.eclipse.e4.tools.test/.classpath @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="src" path="src"/> <classpathentry kind="output" path="bin"/> diff --git a/tests/org.eclipse.e4.tools.test/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.e4.tools.test/.settings/org.eclipse.jdt.core.prefs index 55e5fb83..544ddacf 100644 --- a/tests/org.eclipse.e4.tools.test/.settings/org.eclipse.jdt.core.prefs +++ b/tests/org.eclipse.e4.tools.test/.settings/org.eclipse.jdt.core.prefs @@ -21,14 +21,17 @@ org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -45,7 +48,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod= org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=warning org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore @@ -56,7 +59,7 @@ org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled @@ -84,19 +87,21 @@ org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=warning org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning -org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore @@ -112,6 +117,9 @@ org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore @@ -132,7 +140,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH,LOW,LOW,LOW,LOW,LOW,NORMAL org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,PERF,MEM,POLISH,@generated NOT,@ADDED,APITODO diff --git a/tests/org.eclipse.e4.tools.test/META-INF/MANIFEST.MF b/tests/org.eclipse.e4.tools.test/META-INF/MANIFEST.MF index f4f7ec29..53ccea96 100644 --- a/tests/org.eclipse.e4.tools.test/META-INF/MANIFEST.MF +++ b/tests/org.eclipse.e4.tools.test/META-INF/MANIFEST.MF @@ -2,9 +2,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Test Bundle-SymbolicName: org.eclipse.e4.tools.test -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 1.1.0.qualifier Fragment-Host: org.eclipse.e4.tools;bundle-version="4.7.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Require-Bundle: org.junit;bundle-version="4.0.0", org.eclipse.e4.core.contexts;bundle-version="1.3.100" Export-Package: org.eclipse.e4.tools.test;version="1.0.0";x-internal:=true diff --git a/tests/org.eclipse.e4.tools.test/src/org/eclipse/e4/tools/test/FragmentExtractHelperTest.java b/tests/org.eclipse.e4.tools.test/src/org/eclipse/e4/tools/test/FragmentExtractHelperTest.java index 1d7b54e6..b246261a 100644 --- a/tests/org.eclipse.e4.tools.test/src/org/eclipse/e4/tools/test/FragmentExtractHelperTest.java +++ b/tests/org.eclipse.e4.tools.test/src/org/eclipse/e4/tools/test/FragmentExtractHelperTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011-2015 EclipseSource Muenchen GmbH and others. + * Copyright (c) 2011, 2017 EclipseSource Muenchen GmbH and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -77,7 +77,7 @@ public class FragmentExtractHelperTest { @Test public void testExtractSinglePart() { createWindowWithPart(); - final ArrayList<MApplicationElement> elementsToExtract = new ArrayList<MApplicationElement>(); + final ArrayList<MApplicationElement> elementsToExtract = new ArrayList<>(); elementsToExtract.add(part1); final MModelFragments initialModel = FragmentExtractHelper.createInitialModel(elementsToExtract); assertEquals(1, initialModel.getFragments().size()); @@ -108,7 +108,7 @@ public class FragmentExtractHelperTest { */ public void testExtractPlaceHolder() { createWindowWithPlaceHolder(); - final ArrayList<MApplicationElement> elementsToExtract = new ArrayList<MApplicationElement>(); + final ArrayList<MApplicationElement> elementsToExtract = new ArrayList<>(); elementsToExtract.add(placeholder); final MModelFragments initialModel = FragmentExtractHelper.createInitialModel(elementsToExtract); assertEquals(1, initialModel.getFragments().size()); @@ -140,7 +140,7 @@ public class FragmentExtractHelperTest { public void testExtractCommandWithCategory() { final MCommand command = createCommand(); final MCategory category = createCategoryForCommand(command); - final ArrayList<MApplicationElement> elementsToExtract = new ArrayList<MApplicationElement>(); + final ArrayList<MApplicationElement> elementsToExtract = new ArrayList<>(); elementsToExtract.add(command); final MModelFragments initialModel = FragmentExtractHelper.createInitialModel(elementsToExtract); assertEquals(1, initialModel.getFragments().size()); @@ -183,7 +183,7 @@ public class FragmentExtractHelperTest { public void testExtractTwoPartsSameLocation() { createWindowWithPart(); addSecondPart(); - final ArrayList<MApplicationElement> elementsToExtract = new ArrayList<MApplicationElement>(); + final ArrayList<MApplicationElement> elementsToExtract = new ArrayList<>(); elementsToExtract.add(part1); elementsToExtract.add(part2); final MModelFragments initialModel = FragmentExtractHelper.createInitialModel(elementsToExtract); @@ -198,7 +198,7 @@ public class FragmentExtractHelperTest { @Test public void testExtractHandlerWithoutCommand() { createHandler(); - final ArrayList<MApplicationElement> elementsToExtract = new ArrayList<MApplicationElement>(); + final ArrayList<MApplicationElement> elementsToExtract = new ArrayList<>(); elementsToExtract.add(handler1); final MModelFragments initialModel = FragmentExtractHelper.createInitialModel(elementsToExtract); assertEquals(1, initialModel.getFragments().size()); @@ -218,7 +218,7 @@ public class FragmentExtractHelperTest { public void testExtractHandlerWithCommand() { createHandler(); final MCommand command = createCommandLinkedWithHandler(handler1); - final ArrayList<MApplicationElement> elementsToExtract = new ArrayList<MApplicationElement>(); + final ArrayList<MApplicationElement> elementsToExtract = new ArrayList<>(); elementsToExtract.add(handler1); final MModelFragments initialModel = FragmentExtractHelper.createInitialModel(elementsToExtract); assertEquals(1, initialModel.getFragments().size()); @@ -262,7 +262,7 @@ public class FragmentExtractHelperTest { createHandler2(); final MCommand command = createCommandLinkedWithHandler(handler1); final MCommand command2 = createCommandLinkedWithHandler(handler2); - final ArrayList<MApplicationElement> elementsToExtract = new ArrayList<MApplicationElement>(); + final ArrayList<MApplicationElement> elementsToExtract = new ArrayList<>(); elementsToExtract.add(handler1); elementsToExtract.add(handler2); final MModelFragments initialModel = FragmentExtractHelper.createInitialModel(elementsToExtract); @@ -296,7 +296,7 @@ public class FragmentExtractHelperTest { createHandler2(); final MCommand command = createCommandLinkedWithHandler(handler1); handler2.setCommand(command); - final HashMap<MApplicationElement, MApplicationElement> importCommands = new HashMap<MApplicationElement, MApplicationElement>(); + final HashMap<MApplicationElement, MApplicationElement> importCommands = new HashMap<>(); FragmentExtractHelper.resolveImports(handler1, importCommands); FragmentExtractHelper.resolveImports(handler2, importCommands); @@ -317,7 +317,7 @@ public class FragmentExtractHelperTest { final MCommand command = createCommand(); handledItem1.setCommand(command); handledItem2.setCommand(command); - final HashMap<MApplicationElement, MApplicationElement> importCommands = new HashMap<MApplicationElement, MApplicationElement>(); + final HashMap<MApplicationElement, MApplicationElement> importCommands = new HashMap<>(); FragmentExtractHelper.resolveImports(handledItem1, importCommands); FragmentExtractHelper.resolveImports(handledItem2, importCommands); @@ -344,7 +344,7 @@ public class FragmentExtractHelperTest { part2.getBindingContexts().add(bindingContext1); - final HashMap<MApplicationElement, MApplicationElement> importCommands = new LinkedHashMap<MApplicationElement, MApplicationElement>(); + final HashMap<MApplicationElement, MApplicationElement> importCommands = new LinkedHashMap<>(); FragmentExtractHelper.resolveImports(part, importCommands); FragmentExtractHelper.resolveImports(part2, importCommands); @@ -379,7 +379,7 @@ public class FragmentExtractHelperTest { createHandler2(); final MCommand command = createCommandLinkedWithHandler(handler1); handler2.setCommand(command); - final ArrayList<MApplicationElement> elementsToExtract = new ArrayList<MApplicationElement>(); + final ArrayList<MApplicationElement> elementsToExtract = new ArrayList<>(); elementsToExtract.add(handler1); elementsToExtract.add(handler2); final MModelFragments initialModel = FragmentExtractHelper.createInitialModel(elementsToExtract); |