Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Accumulo >> mail # dev >> Non Short Circuit Logic

Copy link to this message
Re: Non Short Circuit Logic
I didn't know for sure how the for loop acts when a null is the list.
So I wrote some code:

  List<String> strings = new ArrayList<String>();
  for (String s : strings) {

The result is:


Therefore, testing for null within a for loop seems like a good idea.