PMJI but you need to be careful to not create a race state when you use a Singleton pattern like this. You should create a critical section around the if/new region using a syncrhonized block.
These guyz arent the normal M$ biggots. Looks like Personified Technologies is an ISV who actually bets their business on Java. Just very interesting to see some self-criticality and not ranting from the M$ sloths.
Actually I'm wrong, sorry. I didnt fully read this and thought it was sharing a static instance of Thinger. Blah. One of those days. Ignore me. js
PMJI but you need to be careful to not create a race state when you use a Singleton pattern like this. You should create a critical section around the if/new region using a syncrhonized block.
public static Thinger create(String thingerValue)
{
syncrhonized(Thinger.class)
{
if(thingerValue == null || thingerValue.length() == 0)
{
return EMPTY_THINGER;
}
return new Thinger(thingerValue);
}
}
js
These guyz arent the normal M$ biggots. Looks like Personified Technologies is an ISV who actually bets their business on Java. Just very interesting to see some self-criticality and not ranting from the M$ sloths.
js