From dc5a988c90eeef06a44c86bdd2b102a7ac50afd8 Mon Sep 17 00:00:00 2001 From: Heiko Klare Date: Sun, 5 Nov 2023 16:58:11 +0100 Subject: [PATCH] Fix several Javadoc errors * Remove invalid @return statements * Replace or remove invalid @see annotations * Fix faulty method references * Fix missing qualification of type references * Remove obsolete exception specification in test documentations --- .../debug/tests/AbstractDebugTest.java | 2 - .../tests/console/IOConsoleTestUtil.java | 6 +- .../launching/LaunchConfigurationTests.java | 55 ++----------------- .../tests/launching/LaunchManagerTests.java | 24 +++----- .../debug/tests/viewer/model/UpdateTests.java | 4 -- .../intro/impl/model/AbstractIntroPage.java | 2 - 6 files changed, 18 insertions(+), 75 deletions(-) diff --git a/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/AbstractDebugTest.java b/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/AbstractDebugTest.java index c7019e21039..4cd15825367 100644 --- a/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/AbstractDebugTest.java +++ b/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/AbstractDebugTest.java @@ -68,8 +68,6 @@ public void tearDown() throws Exception { /** * Ensure the welcome screen is closed because in 4.x the debug perspective * opens a giant fast-view causing issues - * - * @throws Exception */ protected final void assertWelcomeScreenClosed() throws Exception { if (!welcomeClosed && PlatformUI.isWorkbenchRunning()) { diff --git a/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/IOConsoleTestUtil.java b/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/IOConsoleTestUtil.java index 96fc91c0128..b544cc2b855 100644 --- a/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/IOConsoleTestUtil.java +++ b/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/IOConsoleTestUtil.java @@ -778,7 +778,8 @@ public void setIgnoreFixedConsole(boolean ignoreWrappeding) { } /** - * Get identifier for output {@code IOConsolePartition}s. + * Get identifier for output + * {@code org.eclipse.ui.internal.console.IOConsolePartition}s. * * @return output partition identifier */ @@ -788,7 +789,8 @@ public static String outputPartitionType() { } /** - * Get identifier for input {@code IOConsolePartition}s. + * Get identifier for input + * {@code org.eclipse.ui.internal.console.IOConsolePartition}s. * * @return input partition identifier */ diff --git a/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchConfigurationTests.java b/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchConfigurationTests.java index 8111986bbf7..17f953229d5 100644 --- a/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchConfigurationTests.java +++ b/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchConfigurationTests.java @@ -1388,7 +1388,7 @@ public void launchesTerminated(ILaunch[] launches) { * Tests that a launch is properly registered for notifications before a * process is spawned and may already propagate a termination event. * - * see 598 + * @see 598 */ @Test public void testTerminateLaunchListener_Issue598() throws Exception { @@ -1453,8 +1453,6 @@ public void addProcess(IProcess process) { /** * Tests that attributes in a nested map are persisted in alphabetical * order. - * - * @throws CoreException */ @Test public void testMapAttributePersistence() throws CoreException, IOException { @@ -1536,8 +1534,6 @@ public void testMapAttributePersistence() throws CoreException, IOException { /** * Tests that attributes in a nested set are persisted in alphabetical * order. - * - * @throws CoreException */ @Test public void testSetAttributePersistence() throws CoreException, IOException { @@ -1662,8 +1658,6 @@ public void testIllegalCharName() { /** * Test that moving and renaming a shared configuration at the same time * works. - * - * @throws CoreException */ @Test public void testRenameAndMoveShared() throws CoreException { @@ -1691,8 +1685,6 @@ public void testRenameAndMoveShared() throws CoreException { * * Bug 381175 - [patch] launchConfigurationTypeImage to support platform: * style icons - * - * @throws Exception */ @Test public void testGetTypeImageFromURI() throws Exception { @@ -1703,8 +1695,6 @@ public void testGetTypeImageFromURI() throws Exception { /** * Test support for a declared launch configuration type image - * - * @throws Exception */ @Test public void testGetTyeImage() throws Exception { @@ -1716,10 +1706,7 @@ public void testGetTyeImage() throws Exception { /** * Tests that we can get a project handle from a project name * - * see - * 395441 - * - * @throws Exception + * @see 395441 * @since 3.9.0 */ @Test @@ -1741,10 +1728,7 @@ public void testGetProjectMappedResource1() throws Exception { /** * Tests that we cannot get a project handle from a bogus project name * - * see - * 395441 - * - * @throws Exception + * @see 395441 * @since 3.9.0 */ @Test @@ -1765,10 +1749,7 @@ public void testGetProjectMappedResource2() throws Exception { /** * Tests that we cannot get a project handle from a bogus project name * - * see - * 395441 - * - * @throws Exception + * @see 395441 * @since 3.9.0 */ @Test @@ -1794,10 +1775,7 @@ public void testGetProjectMappedResource3() throws Exception { /** * Tests that we can get a project handle from an absolute project name * - * see - * 395441 - * - * @throws Exception + * @see 395441 * @since 3.9.0 */ @Test @@ -1819,10 +1797,7 @@ public void testGetProjectMappedResource4() throws Exception { * Tests that a launch created without a backing * {@link ILaunchConfiguration} does not cause {@link NullPointerException}s * - * see - * 416691 - * - * @throws Exception + * @see 416691 * @since 3.9.0 */ @Test @@ -1865,8 +1840,6 @@ protected void setResourceMappings(ILaunchConfigurationWorkingCopy config, Resou /** * Test copying attributes from one configuration to another. - * - * @throws CoreException */ @Test public void testCopyAttributes() throws CoreException { @@ -1881,8 +1854,6 @@ public void testCopyAttributes() throws CoreException { /** * Tests that creation from a prototype works. - * - * @throws CoreException */ @Test public void testCreationFromPrototype() throws CoreException { @@ -1899,8 +1870,6 @@ public void testCreationFromPrototype() throws CoreException { /** * Tests setting the 'isPrototype' attribute. - * - * @throws CoreException */ @Test public void testIsPrototype() throws CoreException { @@ -1916,8 +1885,6 @@ public void testIsPrototype() throws CoreException { /** * Tests finding references to a prototype. - * - * @throws CoreException */ @Test public void testPrototypeChildren() throws CoreException { @@ -1946,8 +1913,6 @@ public void testPrototypeChildren() throws CoreException { /** * Tests that when an attribute is removed from a working copy, it does not * get inherited from its prototype. - * - * @throws CoreException */ @Test public void testPrototypeRemoveBehavior() throws CoreException { @@ -1971,8 +1936,6 @@ public void testPrototypeRemoveBehavior() throws CoreException { /** * Tests that setting a configuration's prototype to null cleans its * prototype association. - * - * @throws CoreException */ @Test public void testUnPrototype() throws CoreException { @@ -1995,8 +1958,6 @@ public void testUnPrototype() throws CoreException { /** * Tests that nested prototypes are not allowed. - * - * @throws CoreException */ @Test public void testNestedPrototypes() throws CoreException { @@ -2013,8 +1974,6 @@ public void testNestedPrototypes() throws CoreException { /** * Test that you cannot set a config's prototype to be a non-prototype. - * - * @throws CoreException */ @Test public void testIllegalPrototype() throws CoreException { @@ -2032,8 +1991,6 @@ public void testIllegalPrototype() throws CoreException { /** * Test that a prototype can be duplicated (and results in a prototype). - * - * @throws CoreException */ @Test public void testCopyPrototype() throws CoreException { diff --git a/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchManagerTests.java b/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchManagerTests.java index 8a80508b661..11deb31fa28 100644 --- a/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchManagerTests.java +++ b/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchManagerTests.java @@ -294,8 +294,7 @@ void hasCancellingLaunches(int count) { * Tests if a launch is properly removed from the launch manager when * #preLaunchCheck is cancelled * - * @throws Exception see 437122 + * @see 437122 * @since 3.9.100 */ @Test @@ -319,8 +318,7 @@ public void testCancelledPreLaunchCheck() throws Exception { * Tests if a launch is properly removed from the launch manager when * #finalLaunchCheck is cancelled * - * @throws Exception see 437122 + * @see 437122 * @since 3.9.100 */ @Test @@ -344,8 +342,7 @@ public void testCancelledFinalLaunchCheck() throws Exception { * Tests if a launch is properly removed from the launch manager when * #buildFoLaunch is cancelled * - * @throws Exception see 437122 + * @see 437122 * @since 3.9.100 */ @Test @@ -444,8 +441,7 @@ private ILaunchConfiguration getThrowingConfiguration(ThrowingEnum throwingEnum) * Tests if a launch is properly removed from the launch manager when * throwingEnum method throws exception * - * @throws Exception see 578302 + * @see 578302 */ private void testThrowingLaunchDelegateMethod(ThrowingEnum throwingEnum) throws Exception { ILaunchConfiguration config = getThrowingConfiguration(throwingEnum); @@ -468,8 +464,7 @@ private void testThrowingLaunchDelegateMethod(ThrowingEnum throwingEnum) throws * Tests if a launch is properly removed from the launch manager when * #preLaunchCheck throws exception * - * @throws Exception see 578302 + * @see 578302 */ @Test public void testThrowingPreLaunchCheck() throws Exception { @@ -480,8 +475,7 @@ public void testThrowingPreLaunchCheck() throws Exception { * Tests if a launch is properly removed from the launch manager when * #finalLaunchCheck throws exception * - * @throws Exception see 578302 + * @see 578302 */ @Test public void testThrowingFinalLaunchCheck() throws Exception { @@ -492,8 +486,7 @@ public void testThrowingFinalLaunchCheck() throws Exception { * Tests if a launch is properly removed from the launch manager when * #buildFoLaunch throws exception * - * @throws Exception see 578302 + * @see 578302 */ @Test public void testThrowingBuildForLaunch() throws Exception { @@ -504,8 +497,7 @@ public void testThrowingBuildForLaunch() throws Exception { * Tests if a launch is properly removed from the launch manager when * #buildFoLaunch throws exception * - * @throws Exception see 578302 + * @see 578302 */ @Test public void testThrowingLaunch() throws Exception { diff --git a/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/UpdateTests.java b/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/UpdateTests.java index 153a7ccbfec..eab4bbfa5f4 100644 --- a/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/UpdateTests.java +++ b/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/UpdateTests.java @@ -326,8 +326,6 @@ public void testInsertAtInvalidIndex() throws Exception { /** * This test forces the viewer to reschedule pending content updates due to * a remove event from the model. - * - * see org.eclipse.debug.internal.ui.viewers.model.TreeModelContentProvider#rescheduleUpdates */ @Test public void testRescheduleUpdates() throws Exception { @@ -537,8 +535,6 @@ public void testCanceledUpdates4() throws Exception { *

* See Bug 373790 - Debug view stays busy after Resume *

- * - * see org.eclipse.debug.internal.ui.viewers.model.TreeModelContentProvider#rescheduleUpdates */ @Test public void testCancelUpdatesOnRemoveElementWhileUpdatingSubTree() throws Exception { diff --git a/ua/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPage.java b/ua/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPage.java index dadd0d1799d..81e5feb0710 100644 --- a/ua/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPage.java +++ b/ua/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroPage.java @@ -412,8 +412,6 @@ protected void resolveChildren() { /** * Override parent behavior to add support for HEAD & Title element in pages * only, and not in divs. - * - * @see org.eclipse.ui.internal.intro.impl.model.AbstractIntroContainer#getModelChild(Element, Bundle, String) */ @Override protected AbstractIntroElement getModelChild(Element childElement,