Concurrent access to a utility static method

No, because there are is no shared state. Even if you call this method with the same string s, it is still safe as String is immutable and thread-safe.

BTW StringUtils.isEmpty() method in Apache Commons does the same thing.


The method does not access any shared state. Thus, no -- it will not cause any problems.


No. This wont suffer from any concurrency problems.

1) The parameter you pass in is a String which is an immutable class (its value cannot be modified)

2) The method doesn't try to modify any shared state