Arkin Yetis

+ Follow
since Oct 13, 2010
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Arkin Yetis

Hi Pedro,

Check this out: Double-checked locking

It basically boils down to: with JDK 5 and above your thread-safety concern is addressed with a few modifications. Before then it seems to be broken... Really interesting article, if you are into nitty gritty details.
Thanks for the suggestion.

I am used to using resource bundles for localization. Since I didn't think of translating/localizing action command strings, I didn't think of moving them there.
But I guess one could consider using resource bundles for all string constants. I have to think about the cost of look up, though, for real-life scenarios....
Thanks, guys. I better not take a chance and document all of them.

It was a little less than a gazillion. After some clean-up and moving out of the text, I ended up with only 12, which isn't too bad.

Btw, most of them were action command strings for UI components that are shared across view and controller classes to identify events. Any approaches you can recommend to deal with them other than centralizing them in a single class/interface?
I have centralized all my GUI constants and texts shown to the user in one interface as a bunch of "public static final" variables.
The instructions say that "javadoc style comments must be used for each element of the public interface of each class".

So does this mean that I have to write a comment for each of those gazillion constants, which will not be much more than a repetition of the name of the variable (as I believe I have selected reasonably clear names for the variables.)

I would appreciate any insight. Especially if someone has had a problem with such a situation.....

I am thinking that there is a good chance that I am not the first one who used this approach.