mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
[java-inspection] IDEA-352587 Support JEP 455: Improve conversion from if to switch
GitOrigin-RevId: 30a1ee985af322459781882e4e792ecb6478ea67
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f1642ef3bb
commit
5cdb566ad8
@@ -157,7 +157,7 @@ public final class PsiPrimitiveType extends PsiType.Stub implements JvmPrimitive
|
||||
* @return the primitive type, or null if the type does not represent a boxed primitive type.
|
||||
*/
|
||||
@Nullable
|
||||
public static PsiPrimitiveType getUnboxedType(PsiType type) {
|
||||
public static PsiPrimitiveType getUnboxedType(@Nullable PsiType type) {
|
||||
if (!(type instanceof PsiClassType)) return null;
|
||||
|
||||
PsiUtil.ensureValidType(type);
|
||||
@@ -174,7 +174,7 @@ public final class PsiPrimitiveType extends PsiType.Stub implements JvmPrimitive
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static PsiPrimitiveType getOptionallyUnboxedType(PsiType type) {
|
||||
public static PsiPrimitiveType getOptionallyUnboxedType(@Nullable PsiType type) {
|
||||
return type instanceof PsiPrimitiveType ? (PsiPrimitiveType)type : getUnboxedType(type);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user