Re: Differences between DevMode and Production mode related to trim()
Yeah, I had thought about that, but unfortunately our DTOs are auto-generated from the backend and contain null filled pre-sized char arrays. I changed the generator to give us String getProperty() and setProperty(String) method for each char Array. Changing those to do trim() wouldn't work when they are used on the client side.
On Monday, January 13, 2014 2:38:49 PM UTC-5, Jens wrote:
-- I have the server setup to fill the char Arrays with nulls when the data goes back to the backend.
Currently those getProperty() calls just do return String.valueOf(char[]). I guess that I could change those to build up a char[] by looking at each character until it hits a '\0' and then use that 'trimmed' char[] as the input to the String.valueOf() that is returned.
On Monday, January 13, 2014 2:38:49 PM UTC-5, Jens wrote:
Is there any reason why you don't trim always when the value is retrieved from the C backend and append a null character when the String is supposed to go back to your C backend, so basically correct the string on Java server side on the fly? Would drive me crazy if I would always need to call trim() in every equals just because of possible null characters (regardless if this equals happens on server or client side)-- J.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home