From c637217559fb8539c835f23e5e11707c2a4d645d Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 14 Aug 2012 15:48:29 +0200 Subject: [PATCH] some @NotNulls in dfa (EA-37933) --- .../codeInspection/dataFlow/DfaInstructionState.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/java/java-impl/src/com/intellij/codeInspection/dataFlow/DfaInstructionState.java b/java/java-impl/src/com/intellij/codeInspection/dataFlow/DfaInstructionState.java index 2c4741941329..9b17104b0e95 100644 --- a/java/java-impl/src/com/intellij/codeInspection/dataFlow/DfaInstructionState.java +++ b/java/java-impl/src/com/intellij/codeInspection/dataFlow/DfaInstructionState.java @@ -25,6 +25,7 @@ package com.intellij.codeInspection.dataFlow; import com.intellij.codeInspection.dataFlow.instructions.Instruction; +import org.jetbrains.annotations.NotNull; public class DfaInstructionState { public static final DfaInstructionState[] EMPTY_ARRAY = new DfaInstructionState[0]; @@ -32,7 +33,7 @@ public class DfaInstructionState { private final Instruction myInstruction; private long myDistanceFromStart = 0; - public DfaInstructionState(Instruction myInstruction, DfaMemoryState myBeforeMemoryState) { + public DfaInstructionState(@NotNull Instruction myInstruction, @NotNull DfaMemoryState myBeforeMemoryState) { this.myBeforeMemoryState = myBeforeMemoryState; this.myInstruction = myInstruction; } @@ -41,15 +42,17 @@ public class DfaInstructionState { public void setDistanceFromStart(long distanceFromStart) { myDistanceFromStart = distanceFromStart; } + @NotNull public Instruction getInstruction() { return myInstruction; } + @NotNull public DfaMemoryState getMemoryState() { return myBeforeMemoryState; } public String toString() { - return "" + getInstruction().getIndex() + ": " + getMemoryState().toString() + " " + getInstruction().toString(); + return getInstruction().getIndex() + ": " + getMemoryState().toString() + " " + getInstruction().toString(); } }