diff --git a/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantCatchIssue.cs b/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantCatchIssue.cs index 6d45d160af..5e72022477 100644 --- a/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantCatchIssue.cs +++ b/ICSharpCode.NRefactory.CSharp/Refactoring/CodeIssues/RedundantCatchIssue.cs @@ -125,7 +125,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring { var firstStatement = catchClause.Body.Statements.FirstOrNullObject(); if (firstStatement.IsNull) { - return true; + return false; } var throwStatement = firstStatement as ThrowStatement; if (throwStatement == null) { diff --git a/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCatchTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCatchTests.cs index 8dacccbb5c..7a67ccb6d7 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCatchTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/CodeIssues/RedundantCatchTests.cs @@ -152,11 +152,7 @@ class A }"; TestRefactoringContext context; var issues = GetIssues(new RedundantCatchIssue(), input, out context); - Assert.AreEqual(1, issues.Count); - - CheckFix(context, issues, BaseInput + @" - } -}"); + Assert.AreEqual(0, issues.Count); } [Test]