make sources jdk7 compilable

This commit is contained in:
Alexey Kudravtsev
2011-10-19 12:59:20 +04:00
parent bf64fd77e8
commit dea113bd2a
6 changed files with 11 additions and 10 deletions
@@ -7,7 +7,7 @@ import org.jetbrains.annotations.NotNull;
/**
* @author peter
*/
public class LightParameter extends LightVariableBuilder implements PsiParameter {
public class LightParameter extends LightVariableBuilder<LightVariableBuilder> implements PsiParameter {
public static final LightParameter[] EMPTY_ARRAY = new LightParameter[0];
private final String myName;
private final PsiElement myDeclarationScope;
@@ -37,7 +37,7 @@ public class NegatingComparable<T extends NegatingComparable<T>> implements Comp
@Override
public int compareTo(T o) {
final Comparable w1 = myWeigh;
final Comparable w2 = o.myWeigh;
final Comparable w2 = ((NegatingComparable)o).myWeigh;
if (w1 == null && w2 == null) return 0;
if (w1 == null) return 1;
if (w2 == null) return -1;
@@ -181,8 +181,8 @@ public abstract class BaseInspectionVisitor extends JavaElementVisitor {
holder.registerProblem(location, description, fixes);
}
protected final void registerError(@NotNull PsiElement location,
int offset, int length, Object... infos) {
protected final void registerErrorAtOffset(@NotNull PsiElement location,
int offset, int length, Object... infos) {
if (location.getTextLength() == 0 || length == 0) {
return;
}
@@ -160,14 +160,14 @@ public class HtmlTagCanBeJavadocTagInspection extends BaseInspection {
if (startIndex < 0) {
return;
}
registerError(token, startIndex, 6, Boolean.TRUE,
Integer.valueOf(startIndex));
registerErrorAtOffset(token, startIndex, 6, Boolean.TRUE,
Integer.valueOf(startIndex));
final int endIndex = text.indexOf("</code>", startIndex);
if (endIndex < 0) {
return;
}
registerError(token, endIndex, 7, Boolean.FALSE,
Integer.valueOf(startIndex));
registerErrorAtOffset(token, endIndex, 7, Boolean.FALSE,
Integer.valueOf(startIndex));
startIndex++;
}
}
@@ -102,7 +102,7 @@ public class TryWithIdenticalCatchesInspection extends BaseInspection {
if (parameterValues == null || (parameterValues.size() == 1 && parameterValues.get(0) instanceof PsiReferenceExpression)) {
PsiJavaToken rParenth = otherSection.getRParenth();
if (rParenth != null) {
registerError(otherSection, 0, rParenth.getStartOffsetInParent() + 1, i);
registerErrorAtOffset(otherSection, 0, rParenth.getStartOffsetInParent() + 1, i);
}
duplicates[i] = true;
duplicates[j] = true;
@@ -17,6 +17,7 @@
package org.jetbrains.plugins.groovy.lang.psi.impl.statements;
import com.intellij.lang.ASTNode;
import com.intellij.psi.stubs.StubElement;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.plugins.groovy.lang.psi.GroovyElementVisitor;
import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrVariable;
@@ -25,7 +26,7 @@ import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrVariable;
* @author Dmitry.Krasilschikov
* @date 11.04.2007
*/
public class GrVariableImpl extends GrVariableBaseImpl implements GrVariable {
public class GrVariableImpl extends GrVariableBaseImpl<StubElement> implements GrVariable {
public GrVariableImpl(@NotNull ASTNode node) {
super(node);