You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Gili (JIRA)" <ji...@apache.org> on 2018/03/05 19:44:00 UTC

[jira] [Created] (NETBEANS-446) Invalid "Use specific catch" hint

Gili created NETBEANS-446:
-----------------------------

             Summary: Invalid "Use specific catch" hint
                 Key: NETBEANS-446
                 URL: https://issues.apache.org/jira/browse/NETBEANS-446
             Project: NetBeans
          Issue Type: Bug
          Components: editor - Hints &amp; Annotations
         Environment: Product Version: Apache NetBeans IDE Dev (Build incubator-netbeans-release-222-on-20180226)
Java: 9.0.4; Java HotSpot(TM) 64-Bit Server VM 9.0.4+11
Runtime: Java(TM) SE Runtime Environment 9.0.4+11
System: Windows 10 version 10.0 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev
            Reporter: Gili


Given:

{code:java}
public static <T> CompletionStage<T> supply(CheckedSupplier<T, Throwable> supplier)
{
	try
	{
		return CompletableFuture.completedFuture(supplier.get());
	}
	catch (Throwable t)
	{
		CompletableFuture<T> result = new CompletableFuture<>();
		result.completeExceptionally(t);
		return result;
	}
}
{code}

Netbeans marks "catch (Throwable t)" with a hint to replace with "catch (Throwable t)" (yes, the exact same String).

Expected behavior: no hint should be displayed in this case.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists