Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 15457 Details for
Bug 77212
[1.5][enum] declared enum type .valueOf(String) throws ArrayIndexOutOfBoundsException
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Apply on HEAD
patch_77212.txt (text/plain), 3.13 KB, created by
Olivier Thomann
on 2004-10-28 16:40:46 EDT
(
hide
)
Description:
Apply on HEAD
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2004-10-28 16:40:46 EDT
Size:
3.13 KB
patch
obsolete
>Index: compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java,v >retrieving revision 1.83 >diff -u -r1.83 CodeStream.java >--- compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java 21 Oct 2004 13:34:46 -0000 1.83 >+++ compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java 28 Oct 2004 20:25:30 -0000 >@@ -1887,11 +1887,13 @@ > Label loopCond = new Label(this); > Label loopStart = new Label(this); > Label wrongConstant = new Label(this); >- >+ > this.getstatic(enumValuesSyntheticfield); > this.dup(); > this.astore_1(); > this.arraylength(); >+ this.iconst_1(); >+ this.isub(); > this.istore_2(); > this.goto_(loopCond); > loopStart.place(); >@@ -1901,6 +1903,7 @@ > this.aaload(); > this.dup(); > this.astore_3(); >+ this.invokeJavaLangEnumname(this.classFile.referenceBinding); > this.invokeStringEquals(); > this.ifeq(wrongConstant); > this.aload_3(); >@@ -1909,7 +1912,7 @@ > this.iinc(2, -1); > loopCond.place(); > this.iload_2(); >- this.ifgt(loopStart); >+ this.ifge(loopStart); > this.newJavaLangIllegalArgumentException(); > this.dup(); > this.aload_0(); >@@ -3307,7 +3310,17 @@ > QualifiedNamesConstants.Init, > QualifiedNamesConstants.DefaultConstructorSignature); > } >- >+public void invokeJavaLangEnumname(TypeBinding typeBinding) { >+ // invokevirtual: java.lang.Enum.name()String >+ if (DEBUG) System.out.println(position + "\t\tinvokevirtual: java.lang.Enum.name()Ljava/lang/String;"); //$NON-NLS-1$ >+ this.invoke( >+ OPC_invokevirtual, >+ 0, >+ 1, >+ typeBinding.constantPoolName(), >+ QualifiedNamesConstants.Name, >+ QualifiedNamesConstants.NameSignature); >+} > public void invokeJavaLangIllegalArgumentExceptionStringConstructor() { > // invokespecial: java.lang.IllegalArgumentException.<init>(String)V > if (DEBUG) System.out.println(position + "\t\tinvokespecial: java.lang.IllegalArgumentException.<init>(java.lang.String)V"); //$NON-NLS-1$ >Index: compiler/org/eclipse/jdt/internal/compiler/codegen/QualifiedNamesConstants.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/QualifiedNamesConstants.java,v >retrieving revision 1.22 >diff -u -r1.22 QualifiedNamesConstants.java >--- compiler/org/eclipse/jdt/internal/compiler/codegen/QualifiedNamesConstants.java 21 Oct 2004 13:34:46 -0000 1.22 >+++ compiler/org/eclipse/jdt/internal/compiler/codegen/QualifiedNamesConstants.java 28 Oct 2004 20:25:30 -0000 >@@ -192,4 +192,6 @@ > char[] LONGVALUE_LONG_METHOD_SIGNATURE = "()J".toCharArray(); //$NON-NLS-1$ > char[] GETDECLAREDCONSTRUCTOR_NAME = "getDeclaredConstructor".toCharArray(); //$NON-NLS-1$ > char[] GETDECLAREDCONSTRUCTOR_SIGNATURE = "([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;".toCharArray(); //$NON-NLS-1$ >+ char[] Name = "name".toCharArray(); //$NON-NLS-1$ >+ char[] NameSignature = "()Ljava/lang/String;".toCharArray(); //$NON-NLS-1$ > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 77212
: 15457