GameFile client model class must not use java.io

Bug #736029 reported by Matt Giuca
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MUGLE
Fix Released
Critical
Matt Giuca

Bug Description

The GameFile client model class () has been broken on the client build since, I believe, trunk r54.1.30 (in the data-wrapper branch, now merged into trunk). GameFile depends upon classes in java.io, which are not available to GWT client code. Prior to r54.1.90, it depended upon java.io.File; after 54.1.90 it depends upon java.io.InputStream and java.io.PrintWriter. Either way, these cannot be compiled on the client.

I think this is an example of where we can't just naively use these data wrapper objects around database objects. We need to consider the use of it on the client. GameFile's contents will only really be used in two situations: by a direct HTTP GET or a direct HTTP POST from an upload box. The GWT will not be involved and its javascript doesn't need access to those files. So they don't need to be exposed to the client at all.

Therefore, move them to GameFileData and don't expose them to client, and this should be solved. The public GameFile constructor can, for the moment, simply take no contents, and create an empty file (I don't think GameFiles will usually be constructed on the client).

Revision history for this message
Prageeth Silva (prageethsilva) wrote :

This will be completly implemented by Tuesday (5/04/2011). There will also be a client service that lets users upload and download files.

Revision history for this message
Prageeth Silva (prageethsilva) wrote :

As I had trouble implementing this I think Matt has taken over this task. I'll assign the bug to Matt from here onwards.

Changed in mugle:
assignee: Prageeth Silva (prageethsilva) → Matt Giuca (mgiuca)
Revision history for this message
Matt Giuca (mgiuca) wrote :

I'm not sure what the remaining issue with this is -- it doesn't seem to be using java.io any more. If there are any more problems I'll deal with it as part of the upload system. Closing this bug.

Changed in mugle:
status: Triaged → Fix Committed
Matt Giuca (mgiuca)
Changed in mugle:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.