[JAVA-176] GridFSInputFile aliases is null Created: 06/Oct/10  Updated: 29/Oct/10  Resolved: 07/Oct/10

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: 2.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Mathias Bogaert Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Since you're unable to assign a list to the aliases, I'm doing a get and addAll(..) but this fails since getAliases() returns null.

My code:

Collection<String> aliases = ...

GridFSInputFile inputFile = gridFS.createFile(file);
inputFile.setContentType(contentType);
inputFile.setFilename(filename);
inputFile.getAliases().addAll(aliases);
inputFile.save();



 Comments   
Comment by Eliot Horowitz (Inactive) [ 07/Oct/10 ]

added this comment

  • note: to set aliases, call put( "aliases" , List<String> )

i guess we could add a addAlias or setAliases method to gridfsinputfile

if you think we should do that - please open a case for that

Generated at Thu Feb 08 08:51:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.