This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH} Fix off-by-one mistake


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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]