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 17367 Details for
Bug 83383
IllegalArgumentException in Signature.getParameterCount
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
org.eclipse.jdt.internal.core.util.Util.diff
Util.diff (text/plain), 2.09 KB, created by
Tom Hofmann
on 2005-01-21 12:06:20 EST
(
hide
)
Description:
org.eclipse.jdt.internal.core.util.Util.diff
Filename:
MIME Type:
Creator:
Tom Hofmann
Created:
2005-01-21 12:06:20 EST
Size:
2.09 KB
patch
obsolete
>Index: Util.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Util.java,v >retrieving revision 1.45 >diff -u -r1.45 Util.java >--- Util.java 20 Jan 2005 15:48:26 -0000 1.45 >+++ Util.java 21 Jan 2005 17:02:55 -0000 >@@ -2111,6 +2111,10 @@ > case Signature.C_SHORT : > case Signature.C_VOID : > return scanBaseTypeSignature(string, start); >+ case Signature.C_EXTENDS: >+ case Signature.C_SUPER: >+ case Signature.C_STAR: >+ return scanTypeBoundSignature(string, start); > default : > throw new IllegalArgumentException(); > } >@@ -2200,6 +2204,50 @@ > return id + 1; > } else { > throw new IllegalArgumentException(); >+ } >+ } >+ >+ /** >+ * Scans the given string for a type bound signature starting at the given >+ * index and returns the index of the last character. >+ * <pre> >+ * TypeBoundSignature: >+ * <b>[-+]</b> TypeSignature <b>;</b> >+ * <b>*</b></b> >+ * </pre> >+ * >+ * @param string the signature string >+ * @param start the 0-based character index of the first character >+ * @return the 0-based character index of the last character >+ * @exception IllegalArgumentException if this is not a type variable signature >+ */ >+ public static int scanTypeBoundSignature(char[] string, int start) { >+ // need a minimum 1 char for wildcard >+ if (start >= string.length) { >+ throw new IllegalArgumentException(); >+ } >+ char c = string[start]; >+ if (c == Signature.C_STAR) { //$NON-NLS-1$ >+ return start; >+ } >+ >+ // need a minimum 4 chars "+Lx;" >+ if (start >= string.length - 3) { >+ throw new IllegalArgumentException(); >+ } >+ // must start in "+/-" >+ if (c != Signature.C_SUPER && c != Signature.C_EXTENDS) { >+ throw new IllegalArgumentException(); >+ } >+ c = string[start + 1]; >+ switch (c) { >+ case Signature.C_RESOLVED : >+ case Signature.C_UNRESOLVED : >+ return scanClassTypeSignature(string, start + 1); >+ case Signature.C_TYPE_VARIABLE : >+ return scanTypeVariableSignature(string, start + 1); >+ default: >+ throw new IllegalArgumentException(); > } > } >
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 83383
: 17367