void (PsiArrayType type, PsiExpression[] dimensions) { if (dimensions.length != 1) return; PsiType componentType = type.getComponentType(); // Ignore objects as they may produce false NPE warnings due to non-perfect loop handling if (!(componentType instanceof PsiPrimitiveType)) return; Object val = ExpressionUtils.computeConstantExpression(dimensions[0]); if (val instanceof Integer) { int lengthValue = (Integer)val; if (lengthValue > 0 && lengthValue <= MAX_UNROLL_SIZE) { DfaVariableValue var = createTempVariable(type); addInstruction(new SimpleAssignmentInstruction(null, var)); addInstruction(new PushValueInstruction(DfTypes.defaultValue(componentType))); for (int i = lengthValue - 1; i >= 0; i--) { DfaValue value = ArrayElementDescriptor.getArrayElementValue(getFactory(), var, i); if (value instanceof DfaVariableValue) { addInstruction(new SimpleAssignmentInstruction(null, (DfaVariableValue)value)); } } addInstruction(new PopInstruction()); } } }