IG - false positive in "'return' inside 'finally' block"

Hi,

In following code for the return statement in line 6 the "return' inside 'finally' block" warning is shown. Which is IMHO a false positive.


David

2 comments

Right you are. And "'continue' or 'break' inside 'finally' block" and
"'throw' inside 'finally' block" suffer from the same problem. Could you
please submit a JIRA report?

Bas

David Kusche wrote:

Hi,

In following code for the return statement in line 6 the "return' inside 'finally' block" warning is shown. Which is IMHO a false positive.

 1: try {
> 2: 	System.out.println("test");
> 3: } finally {
> 4: 	File[] files = new File(".").listFiles(new FilenameFilter() {
> 5: 		public boolean accept(File dir, String name) {
> 6: 			return false;
> 7: 		}
> 8: 	});
> 9: }
> ]]>


David

0

Please sign in to leave a comment.