This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[PATCH} Fix off-by-one mistake
- From: Fernando Nasser <fnasser at redhat dot com>
- To: GCJ Patches <java-patches at gcc dot gnu dot org>
- Date: Mon, 08 Dec 2003 18:00:27 -0500
- Subject: [PATCH} Fix off-by-one mistake
- Organization: Red Hat , Inc. - Toronto
Without this one cannot create a DataFlavor and specify, for instance, the
class. The Acunia tests which use it are failing without this fix.
2003-12-02 Fernando Nasser <fnasser@redhat.com>
* java/awt/datatransfer/DataFlavor.java (getParameter): Fix off-by-one
error which was clipping off the first character of a parameter value.
Index: java/awt/datatransfer/DataFlavor.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/datatransfer/DataFlavor.java,v
retrieving revision 1.11
diff -c -p -r1.11 DataFlavor.java
*** java/awt/datatransfer/DataFlavor.java 11 Nov 2003 12:22:18 -0000 1.11
--- java/awt/datatransfer/DataFlavor.java 8 Dec 2003 22:53:28 -0000
*************** getParameter(String paramName, String mi
*** 459,465 ****
if (idx == -1)
return(null);
! String value = mimeString.substring(idx + paramName.length() + 2);
idx = value.indexOf(" ");
if (idx == -1)
--- 459,465 ----
if (idx == -1)
return(null);
! String value = mimeString.substring(idx + paramName.length() + 1);
idx = value.indexOf(" ");
if (idx == -1)