Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.3.1
-
None
-
None
Description
FileItem currently does not implement javax.activation.DataHandler; the javadoc states "While this interface does not extend javax.activation.DataSource per se (to avoid a seldom used dependency), several of the defined methods are specifically defined with the same signatures as methods in that interface. This allows an implementation of this interface to also implement javax.activation.DataSource with minimal additional work."
This limitation stems from 2002 (http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/FileItem.java?r1=133278&r2=133279&diff_format=h), at a time when javax.activation.DataSource was not part of Java SE (Or J2SE, which it was, back then!).
Times have changed, and javax.activation.* have been part of Java SE proper since Java 6. If/when java6 is an accepted minimum for FileUpload, FileItem should extend javax.activation.DataSource.