Bug 400359 - ArrayIndexOutOfBoundsException: 1 org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.substitute(ParameterizedTypeBinding.java:970)
Summary: ArrayIndexOutOfBoundsException: 1 org.eclipse.jdt.internal.compiler.lookup.Pa...
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-08 13:50 EST by Francis ANDRE CLA
Modified: 2024-01-09 17:00 EST (History)
3 users (show)

See Also:


Attachments
Screen with more errors (18.48 KB, image/png)
2020-01-28 02:50 EST, Frank Musolf CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Francis ANDRE CLA 2013-02-08 13:50:11 EST
Hi

Got a java.lang.ArrayIndexOutOfBoundsException: 1 at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.substitute(ParameterizedTypeBinding.java:970)


Context
eclipse.buildId=M20120914-1800
java.version=1.6.0_35
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=fr_FR
Command-line arguments:  -os win32 -ws win32 -arch x86 -clean

This is a continuation of log file Z:\DEV\Apache\.metadata\.bak_1.log
Created Time: 2013-02-08 19:37:20.828


java.lang.ArrayIndexOutOfBoundsException: 1
	at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.substitute(ParameterizedTypeBinding.java:970)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.substitute(Scope.java:366)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.substitute(Scope.java:474)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.substitute(Scope.java:381)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.substitute(Scope.java:334)
	at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.superInterfaces(ParameterizedTypeBinding.java:1003)
	at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.superInterfaces(BinaryTypeBinding.java:1363)
	at org.eclipse.jdt.internal.compiler.lookup.TypeBinding.findSuperTypeOriginatingFrom(TypeBinding.java:298)
	at org.eclipse.jdt.internal.compiler.ast.Expression.checkCastTypesCompatibility(Expression.java:429)
	at org.eclipse.jdt.internal.compiler.ast.CastExpression.resolveType(CastExpression.java:502)
	at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:401)
	at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:243)
	at org.eclipse.jdt.internal.compiler.ast.Block.resolveUsing(Block.java:118)
	at org.eclipse.jdt.internal.compiler.ast.TryStatement.resolve(TryStatement.java:1105)
	at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:507)
	at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:259)
	at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:466)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1162)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1272)
	at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:561)
	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:770)
	at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:137)
	at java.lang.Thread.run(Thread.java:662)

The problem seems to happen when parametrized reference contains less parameters than the parametrized définition.

Rgds
Comment 1 Jay Arthanareeswaran CLA 2013-02-11 09:02:49 EST
If you can reproduce this, can you please tell us what steps would help us do so? It would help if you can isolate the test case and share it with us.
Comment 2 Francis ANDRE CLA 2013-02-14 03:47:53 EST
Hi

I understand wery well your request of an isolate test case...Unfortunalty, I am not able to reproduce on a simple case this issue. This issue appeared when refactoring an interface from

public interface Entry extends Cloneable, Iterable<Attribute>, Externalizable

to

public interface Entry<DN, AT, ATT> extends Cloneable, Iterable<AT>, Externalizable


HTH

Rgds
Comment 3 Frank Musolf CLA 2020-01-28 02:48:32 EST
This exception with another line number in eclipse 4.14 without any clear reason directly after eclipse start

Regards 
Frank

!SESSION 2020-01-28 08:31:52.756 -----------------------------------------------
eclipse.buildId=4.14.0.I20191210-0610
java.fullversion=11.0.5+10
JRE 11 Windows 10 amd64-64-Bit Compressed References 20191016_357 (JIT enabled, AOT enabled)
OpenJ9   - 77c1cf708
OMR      - 20db4fbc
JCL      - 2a7af5674b based on jdk-11.0.5+10
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -data E:\eclipse_workspaces\xx

This is a continuation of log file E:\eclipse_workspaces\xx\.metadata\.bak_1.log
Created Time: 2020-01-28 08:38:41.853

!ENTRY org.eclipse.core.resources 4 2 2020-01-28 08:38:41.853
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.ArrayIndexOutOfBoundsException
	at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.substitute(ParameterizedTypeBinding.java:1407)
	at org.eclipse.jdt.internal.compiler.lookup.Scope$Substitutor.substitute(Scope.java:575)
	at org.eclipse.jdt.internal.compiler.lookup.Scope$Substitutor.substitute(Scope.java:712)
	at org.eclipse.jdt.internal.compiler.lookup.Scope$Substitutor.substitute(Scope.java:593)
	at org.eclipse.jdt.internal.compiler.lookup.Scope$Substitutor.substitute(Scope.java:543)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.substitute(Scope.java:506)
	at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.superInterfaces(ParameterizedTypeBinding.java:1446)
	at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.superInterfaces(BinaryTypeBinding.java:2183)
	at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.getExactMethod(BinaryTypeBinding.java:1257)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.findExactMethod(Scope.java:1323)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.getMethod(Scope.java:2944)
	at org.eclipse.jdt.internal.compiler.ast.MessageSend.findMethodBinding(MessageSend.java:966)
	at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:787)
	at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:1066)
	at org.eclipse.jdt.internal.compiler.ast.Block.resolve(Block.java:125)
	at org.eclipse.jdt.internal.compiler.ast.IfStatement.resolve(IfStatement.java:283)
	at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:641)
	at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:316)
	at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:551)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1293)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1418)
	at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:666)
	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:901)
	at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:145)
	at java.base/java.lang.Thread.run(Thread.java:831)
Comment 4 Frank Musolf CLA 2020-01-28 02:50:47 EST
Created attachment 281622 [details]
Screen with more errors
Comment 5 Eclipse Genie CLA 2022-01-18 14:42:37 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 6 Eclipse Genie CLA 2024-01-09 17:00:11 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.