JDK-4885018 : java.awt.datatransfer.SystemFlavorMap.getFlavorsForNative: need clarification
  • Type: Bug
  • Component: docs
  • Sub-Component: guides
  • Affected Version: 5.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,linux,solaris_2.6
  • CPU: generic,x86,sparc
  • Submitted: 2003-06-27
  • Updated: 2017-05-16
  • Resolved: 2003-11-26
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 Availabitlity Release.

To download the current JDK release, click here.
5.0 b30Fixed

Name: sdR10048			Date: 06/27/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] :

Specification excerpt:
--------- J2SE API spec v.1.5 ---------
public List getFlavorsForNative(String?nat)

Returns a List of DataFlavors to which the specified String native can be
translated by the data transfer subsystem. The List will be sorted from 
best DataFlavor to worst. That is, the first DataFlavor will best reflect
data in the specified native to a Java application.

If the specified native is previously unknown to the data transfer subsystem,
and that native has been properly encoded, then invoking this method will
establish a mapping in both directions between the specified native and a
DataFlavor whose MIME type is a decoded version of the native.

Specified by:
getFlavorsForNative in interface FlavorTable

nat - the native whose corresponding DataFlavors should be returned. 
      If null is specified, all DataFlavors currently known to the data 
      transfer subsystem are returned in a non-deterministic order.

      a java.util.List of DataFlavor objects into which platform-specific
      data in the specified, platform-specific native can be translated

---------- end-of-excerpt ---------------

Problem description
Current javadoc says nothing about the expected behavior if
we pass not properly encoded (and previously unknown of course) native.

Possible ways to act here are:
1 return null
2 return an empty array
3 return all registered flavors


CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta FIXED IN: tiger-beta INTEGRATED IN: tiger-b30 tiger-beta


EVALUATION Name: dk30142 Date: 07/19/2003 Accepted ====================================================================== The solutions proposed in the bug report won't work. I discussed this with Danila who discussed it with others in engineering. Fix was CCC approved. Fixed for tiger. ###@###.### 2003-11-07