This is the mail archive of the
mailing list for the Java project.
Re: [PATCH] Fix for 'paste'
- From: Fernando Nasser <fnasser at redhat dot com>
- To: tromey at redhat dot com
- Cc: GCJ Patches <java-patches at gcc dot gnu dot org>
- Date: Mon, 08 Dec 2003 17:52:27 -0500
- Subject: Re: [PATCH] Fix for 'paste'
- Organization: Red Hat , Inc. - Toronto
- References: <3FD4F434.firstname.lastname@example.org> <email@example.com>
Tom Tromey wrote:
Fernando> This patch fixes it by returning the object accordingly to the
Fernando> DataFlavor specified by the caller.
I forgot to mention: the best thing in a case like this, where the
docs are confusing, is to try it out on the Sun JDK and see what
Exactly. That is why I have an instance of the Accunia testsuite compiled and
running with the Sun SDK on the right and our libgcj/CLASSPATH one running on
the left. ;-) And with this patch the results become consistent.
I disagree that the documentation is not clear in this case though. Perhaps you
were looking in an old book? The documentation with JDK 1.4.2 clearly states
that getTransferData "Returns an object which represents the data to be
transferred. The class of the object returned is defined by the representation
class of the flavor." and for stringFlavor "representationClass =
java.lang.String" and for plainTextFlavor "representationClass = InputStream".
And these are the only two that we support (we throw an IllegalArgumentException