
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
Operating System: All
Platform: All
Operating System: All
Platform: All
|
|
|
The default constructor of the FileUpload class (no parameters) is said by the
documentation to use "the default factory", but the code doesn't actually create
any factory at all (fileItemFactory attribute is null), so any attempt to use
the class causes a NullPointerException. Either the documentation or the code
should be fixed. Personally, I think the code should be fixed. Why make the
class harder to use than necessary?
|
|
Description
|
The default constructor of the FileUpload class (no parameters) is said by the
documentation to use "the default factory", but the code doesn't actually create
any factory at all (fileItemFactory attribute is null), so any attempt to use
the class causes a NullPointerException. Either the documentation or the code
should be fixed. Personally, I think the code should be fixed. Why make the
class harder to use than necessary? |
Show » |
|
I fixed the Javadoc rather than the code because there is no default factory.
The purpose of the FileUpload class is to enable customised implementations, so
it cannot know in advance of any particular factory. (The DiskFileUpload class
provides a standard implementation that saves files to disk, or keeps them in
memory if they are small enough.)