I am trying to pass a little-b boolean as an argument in this call:
boolean f = false
DiskFileItem fileItem = diskFileItemFactory.createItem('file',
'multipart/file-upload', f as boolean, file.name)
But I get the exception:
No signature of method: static DiskFileItemFactory.createItem()
is applicable for argument types: (java.lang.String, java.lang.String,
java.lang.Boolean, java.lang.String) values: [file, multipart/file-upload, false,
file.txt] Possible solutions: createItem(java.lang.String, java.lang.String,
boolean, java.lang.String)
Looks like it is still passing the big-b Boolean object rather than the primitive. Is there a way I can force the primitive rather than the wrapper class as an argument (or is that completely not the error)?
Maybe
f.booleanValue()will work?