From eb68118330612e92008c0cf874af5d839c6078c3 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Tue, 2 Apr 2013 19:05:06 +0200 Subject: [PATCH] Typo --- .../com/intellij/psi/util/RedundantCastUtil.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/java/openapi/src/com/intellij/psi/util/RedundantCastUtil.java b/java/openapi/src/com/intellij/psi/util/RedundantCastUtil.java index ee390db92977..42bba5299036 100644 --- a/java/openapi/src/com/intellij/psi/util/RedundantCastUtil.java +++ b/java/openapi/src/com/intellij/psi/util/RedundantCastUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2013 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. @@ -118,7 +118,7 @@ public class RedundantCastUtil { @Override protected void addToResults(@NotNull PsiTypeCastExpression typeCast){ - if (!isTypeCastSemantical(typeCast)) { + if (!isTypeCastSemantic(typeCast)) { myFoundCasts.add(typeCast); } } @@ -140,7 +140,7 @@ public class RedundantCastUtil { } protected void addToResults(@NotNull PsiTypeCastExpression typeCast){ - if (!isTypeCastSemantical(typeCast)) { + if (!isTypeCastSemantic(typeCast)) { isRedundant = true; } } @@ -446,7 +446,7 @@ public class RedundantCastUtil { if (parent instanceof PsiReturnStatement) return; if (parent instanceof PsiTypeCastExpression) return; - if (isTypeCastSemantical(typeCast)) return; + if (isTypeCastSemantic(typeCast)) return; PsiTypeElement typeElement = typeCast.getCastType(); if (typeElement == null) return; @@ -511,7 +511,13 @@ public class RedundantCastUtil { return result.get().booleanValue(); } + /** @deprecated use {@link #isTypeCastSemantic(PsiTypeCastExpression)} (to remove in IDEA 14) */ + @SuppressWarnings({"UnusedDeclaration", "SpellCheckingInspection"}) public static boolean isTypeCastSemantical(PsiTypeCastExpression typeCast) { + return isTypeCastSemantic(typeCast); + } + + public static boolean isTypeCastSemantic(PsiTypeCastExpression typeCast) { PsiExpression operand = typeCast.getOperand(); if (operand == null) return false;