SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Sean Keane wrote:The specific case I was pondering about was what if someone sent a record in to my business class where the field was a string that exceeded the schema.
I understand you will have prevented this from happening in your GUI. But I look at this from the point of view of someone using my business class.
OCMJD 6, OCPJP8, CISSP Baroque Potion, G+
Roel De Nijs wrote:Maybe you should look back to the title of this post and confirmed by the question in your 1st post: "did you guys trim the strings to remove whitespaces?", so I respond to what you ask. I can't know you actually meant trimming of values which are too long. I'm not a clairvoyant
Roel De Nijs wrote:In my application a String[] with a value which is too long, won't pass the validation. I believe Roberto trimmed strings which are too long for the field.
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
David Byron wrote:I also truncated if necessary on the way into the database
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Sean Keane wrote:I am in two minds which approach to go with here. I originally went with trimming.
Sure. In general, I agree with Roel that it's situationally dependent.Sean Keane wrote:I know this is probably a little on the theoretical side - but do you see the potential for confusion that I outlined in my previous post caused by trimming on the way in and out of the database?
OCMJD 6, OCPJP8, CISSP Baroque Potion, G+
Don't get me started about those stupid light bulbs. |