From 7b2214e2fae8f127fe30809e6bfc53d3cc8fba98 Mon Sep 17 00:00:00 2001 From: Daniil Ovchinnikov Date: Tue, 16 Feb 2016 14:47:11 +0300 Subject: [PATCH] [groovy] fix EA-55538 --- .../codeInspection/type/GroovyTypeCheckVisitorHelper.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/type/GroovyTypeCheckVisitorHelper.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/type/GroovyTypeCheckVisitorHelper.java index b6d4f27fd533..4b31efe39643 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/type/GroovyTypeCheckVisitorHelper.java +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/type/GroovyTypeCheckVisitorHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -191,7 +191,9 @@ public class GroovyTypeCheckVisitorHelper { final ArrayList fixes = new ArrayList(); for (Pair error : allErrors) { - fixes.add(new ParameterCastFix(error.first, error.second, args.get(error.first))); + if (args.size() > error.first) { + fixes.add(new ParameterCastFix(error.first, error.second, args.get(error.first))); + } } return fixes.toArray(new LocalQuickFix[fixes.size()]); }