JDK-4885993 : java.awt.datatransfer.FlavorEvent: null reaction
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_2.6
  • CPU: sparc
  • Submitted: 2003-07-02
  • Updated: 2017-05-16
  • Resolved: 2011-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 Other
7 b04Fixed OpenJDK6Fixed
Related Reports
Relates :  
Description
Name: sdR10048			Date: 07/02/2003


Filed By      : SPB JCK team (###@###.###)
JDK           : java full version "1.5.0-beta-b09"
JCK           : 1.5
Platform[s]   : Solaris
switch/Mode   : 
JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto
Failing Test [s] : N/A


Specification excerpt:
======================
--------- J2SE API spec v.1.5 ---------
...
public FlavorEvent(Clipboard?source)

Constructs a FlavorEvent object.

Parameters:
source - the Clipboard that is the source of the event
...
---------- end-of-excerpt ---------------

Problem description
===================
Documentation for method:
java.awt.datatransfer.FlavorEvent.FlavorEvent(Clipboard source)
says nothing about expected behaviour if source == null.

It should be noted as document "Requirements for Writing
Java API Specifications" says:
http://java.sun.com/j2se/javadoc/writingapispecs/index.html#method.

======================================================================

Comments
SUGGESTED FIX You can find a web version at http://sa.sfbay.sun.com/projects/awt_data/dolphin/4885993/ *** src/share/classes/java/awt/datatransfer/FlavorEvent.java- Thu Oct 26 13:15:30 2006 --- FlavorEvent.java Thu Oct 26 12:19:59 2006 *** 23,32 **** --- 23,34 ---- public class FlavorEvent extends EventObject { /** * Constructs a <code>FlavorEvent</code> object. * * @param source the <code>Clipboard</code> that is the source of the event + * + * @throws IllegalArgumentException if the {@code source} is {@code null} */ public FlavorEvent(Clipboard source) { super(source); } }
18-09-2006

EVALUATION As a direct heir of EventObject, FlavorEvent throws IllegalArgumentException if it's target is null.
18-09-2006

EVALUATION Name: dk30142 Date: 07/19/2003 Accepted ====================================================================== Name: dk30142 Date: 07/19/2003 Accepted ====================================================================== Should specify that the constructor FlavorEvent(Clipboard source) throws IllegalArgumentException as FlavorEvent's superclass, EventObject, does (refer to the bug 4145996 which was finally fixed in tiger). ###@###.### 2005-1-26 12:17:06 GMT
26-01-2005