Code review comment for lp:~d6g/do-plugins/GDocs

Revision history for this message
Alex Launi (alexlauni) wrote :

GDocsUploadDocument.cs : 92
        public IItem[] Perform (IItem[] items, IItem[] modifierItems)
        {
   string fileName = (items[0] as IFileItem).Path;
   string documentName = (modifierItems.Length > 0) ? (modifierItems[0] as ITextItem).Text : null;

   IItem returnItem;
   returnItem = GDocs.UploadDocument (fileName, documentName);

Why null? Does the GDocs library handle this elegantly? Why not make documentName = fileName or something? If GDocs knows what to do with a null 2nd parameter, withouth crashing ever than this is ok, but are you sure that's totally legal?

Still has Mono guidelines issues, especially in GDocs.cs, mostly issues with spaces between methods and their parenthesis.

That's it from me, fix those couple of things (the one might not even need fixed if that's cool with google), and you're into main!

review: Abstain

« Back to merge proposal