From 84d917307f76ea7e3052daed6ca3a0bc9f86ef3f Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Thu, 7 Jul 2011 18:56:14 +0400 Subject: [PATCH] cleanup --- .../dataFlow/InstructionHandler.java | 24 ------------------- .../IntroduceVariableBase.java | 4 ++-- .../idea/svn/config/CompositeRunnable.java | 4 +++- 3 files changed, 5 insertions(+), 27 deletions(-) delete mode 100644 java/java-impl/src/com/intellij/codeInspection/dataFlow/InstructionHandler.java diff --git a/java/java-impl/src/com/intellij/codeInspection/dataFlow/InstructionHandler.java b/java/java-impl/src/com/intellij/codeInspection/dataFlow/InstructionHandler.java deleted file mode 100644 index 85b9667789e4..000000000000 --- a/java/java-impl/src/com/intellij/codeInspection/dataFlow/InstructionHandler.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2000-2009 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.intellij.codeInspection.dataFlow; - -/** - * @author Gregory.Shrago - */ -public interface InstructionHandler { - S createEmptyMemoryState(final T dataFlowRunner); -} diff --git a/java/java-impl/src/com/intellij/refactoring/introduceVariable/IntroduceVariableBase.java b/java/java-impl/src/com/intellij/refactoring/introduceVariable/IntroduceVariableBase.java index adb1b63d7ac0..682cd8b228b7 100644 --- a/java/java-impl/src/com/intellij/refactoring/introduceVariable/IntroduceVariableBase.java +++ b/java/java-impl/src/com/intellij/refactoring/introduceVariable/IntroduceVariableBase.java @@ -231,7 +231,6 @@ public abstract class IntroduceVariableBase extends IntroduceHandlerBase impleme if (endOffset <= startOffset) return null; - PsiExpression tempExpr; PsiElement elementAt = PsiTreeUtil.findCommonParent(elementAtStart, elementAtEnd); if (PsiTreeUtil.getParentOfType(elementAt, PsiExpression.class, false) == null) { elementAt = null; @@ -243,10 +242,10 @@ public abstract class IntroduceVariableBase extends IntroduceHandlerBase impleme final PsiElementFactory elementFactory = JavaPsiFacade.getInstance(project).getElementFactory(); String text = null; + PsiExpression tempExpr; try { text = file.getText().subSequence(startOffset, endOffset).toString(); String prefix = null; - String suffix = null; String stripped = text; if (startLiteralExpression != null) { final int startExpressionOffset = startLiteralExpression.getTextOffset(); @@ -262,6 +261,7 @@ public abstract class IntroduceVariableBase extends IntroduceHandlerBase impleme } } + String suffix = null; if (endLiteralExpression != null) { final int endExpressionOffset = endLiteralExpression.getTextOffset() + endLiteralExpression.getTextLength(); if (endOffset == endExpressionOffset ) { diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/config/CompositeRunnable.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/config/CompositeRunnable.java index 12867d7d8b5a..a401acaac31e 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/config/CompositeRunnable.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/config/CompositeRunnable.java @@ -15,10 +15,12 @@ */ package org.jetbrains.idea.svn.config; +import org.jetbrains.annotations.NotNull; + public class CompositeRunnable implements Runnable { private final Runnable[] myRunnables; - public CompositeRunnable(final Runnable... runnables) { + public CompositeRunnable(@NotNull Runnable... runnables) { myRunnables = runnables; }