Isn't the original source the strongest possible hash? I don't see it as a problem. Will use Util.getBytes(getSource()) instead of getSource().getBytes().
I do agree that we should avoid having two code paths just to handle the -gen argument. Can -gen be handled by post-processing the contents of the diskCache? On Tue, Apr 28, 2009 at 1:02 PM, Scott Blum <[email protected]> wrote: > Having getStrongHash() return getSource() seems really bad to me. If the > method is named "getStrongHash()", it should be a strong hash, right? > Otherwise you could be the situation where you're comparing the contents of > the file against its strong hash and coming up with an answer where they're > different. > I dunno, I think maybe we should take a step back and rethink the design? > Maybe it's a bad idea for -gen to have such an effect on the program logic. > Maybe we should partially undo some of my changes that separated the two > code paths and types and move back to a model where -gen is akin to just > logging and you never read the contents? > > Also, instead of getSource().getBytes() you should be using > Util.getBytes(getSource()) because it will use the proper consistent > encoding that way. > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
