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 161195 Details for
Bug 304887
Signature.toCharArray(..) doesn't fail when the signature is invalid
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed fix
patch_304887.txt (text/plain), 2.41 KB, created by
Olivier Thomann
on 2010-03-05 16:30:51 EST
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2010-03-05 16:30:51 EST
Size:
2.41 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/core/Signature.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/Signature.java,v >retrieving revision 1.96 >diff -u -r1.96 Signature.java >--- model/org/eclipse/jdt/core/Signature.java 10 Dec 2009 16:48:46 -0000 1.96 >+++ model/org/eclipse/jdt/core/Signature.java 5 Mar 2010 21:30:31 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2008 IBM Corporation and others. >+ * Copyright (c) 2000, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -2183,6 +2183,8 @@ > int firstParen = CharOperation.indexOf(C_PARAM_START, methodSignature); > if (firstParen == -1) { > throw new IllegalArgumentException(); >+ } else if (firstParen != 0 && methodSignature[0] != C_GENERIC_START) { >+ throw new IllegalArgumentException(); > } > > StringBuffer buffer = new StringBuffer(methodSignature.length + 10); >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/SignatureTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SignatureTests.java,v >retrieving revision 1.51 >diff -u -r1.51 SignatureTests.java >--- src/org/eclipse/jdt/core/tests/model/SignatureTests.java 5 Mar 2010 21:25:00 -0000 1.51 >+++ src/org/eclipse/jdt/core/tests/model/SignatureTests.java 5 Mar 2010 21:30:32 -0000 >@@ -1061,9 +1061,12 @@ > Signature.toString("([Ljava.lang.String;)Ljava.lang.String;", "main", new String[] {"args"}, true, true)); > } > public void testToStringMethod07() { >- assertEquals( >- "java.lang.String main(java.lang.String[] args)", >- Signature.toString("main([Ljava.lang.String;)Ljava.lang.String;", "main", new String[] {"args"}, true, true)); >+ try { >+ Signature.toString("main([Ljava.lang.String;)Ljava.lang.String;", "main", new String[] {"args"}, true, true); >+ assertTrue("Did not fail on invalid signature", false); >+ } catch(IllegalArgumentException e) { >+ // ignore >+ } > } > public void testToStringMethod08() { > assertEquals(
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 304887
: 161195