Skip to content

Commit

Permalink
Fix NPE in Veto handlers.
Browse files Browse the repository at this point in the history
  • Loading branch information
amolenaar committed Jan 18, 2016
1 parent 5199027 commit c1b1c2f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<vendor>George Shakhnazaryan, Arjan Molenaar</vendor>
<change-notes>
<![CDATA[<pre>
1.4.1
* Fix Veto handler failing with NPE
1.4.0
* Rename a Java class and the FitNesse reference is updated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import fitnesse.idea.table.Table
class FitnesseVetoDecisionInputOutputRename extends Condition[PsiElement] {

// Return true if rename should be veto'ed.
override def value(t: PsiElement): Boolean = t.isInstanceOf[DecisionInput] || t.isInstanceOf[DecisionOutput] || (!t.isInstanceOf[Table] && value(t.getParent))
override def value(t: PsiElement): Boolean = t.isInstanceOf[DecisionInput] || t.isInstanceOf[DecisionOutput] || (!t.isInstanceOf[Table] && t.getParent != null && value(t.getParent))

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import fitnesse.idea.table.Table
class FitnesseVetoScriptRowRename extends Condition[PsiElement] {

// Return true if rename should be veto'ed.
override def value(t: PsiElement): Boolean = t.isInstanceOf[ScriptRow] || (!t.isInstanceOf[Table] && value(t.getParent))
override def value(t: PsiElement): Boolean = t.isInstanceOf[ScriptRow] || (!t.isInstanceOf[Table] && t.getParent != null && value(t.getParent))

}

0 comments on commit c1b1c2f

Please sign in to comment.