<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Never return Null Arrays!</title>
	<atom:link href="http://www.selikoff.net/2008/10/15/never-return-null-arrays/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.selikoff.net/2008/10/15/never-return-null-arrays/</link>
	<description>Java/J2EE Software Development and Technology Discussion Blog</description>
	<lastBuildDate>Tue, 07 Feb 2012 22:20:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: scott</title>
		<link>http://www.selikoff.net/2008/10/15/never-return-null-arrays/comment-page-1/#comment-486</link>
		<dc:creator>scott</dc:creator>
		<pubDate>Fri, 17 Oct 2008 17:00:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.selikoff.net/blog/?p=569#comment-486</guid>
		<description>Hi Peter,
It&#039;s a much larger issue to distinguish between java primitive arrays and Java Collection classes, but my advice applies to both WLOG.
Thanks,
-Scott</description>
		<content:encoded><![CDATA[<p>Hi Peter,<br />
It&#8217;s a much larger issue to distinguish between java primitive arrays and Java Collection classes, but my advice applies to both WLOG.<br />
Thanks,<br />
-Scott</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frank Carver</title>
		<link>http://www.selikoff.net/2008/10/15/never-return-null-arrays/comment-page-1/#comment-482</link>
		<dc:creator>Frank Carver</dc:creator>
		<pubDate>Fri, 17 Oct 2008 09:39:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.selikoff.net/blog/?p=569#comment-482</guid>
		<description>It seems this blog does not support trackbacks. For interest I have written a response to this post at: 

http://blog.punchbarrel.com/2008/10/16/never-return-null-arrays-really/</description>
		<content:encoded><![CDATA[<p>It seems this blog does not support trackbacks. For interest I have written a response to this post at: </p>
<p><a href="http://blog.punchbarrel.com/2008/10/16/never-return-null-arrays-really/" rel="nofollow">http://blog.punchbarrel.com/2008/10/16/never-return-null-arrays-really/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Lawrey</title>
		<link>http://www.selikoff.net/2008/10/15/never-return-null-arrays/comment-page-1/#comment-475</link>
		<dc:creator>Peter Lawrey</dc:creator>
		<pubDate>Fri, 17 Oct 2008 07:00:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.selikoff.net/blog/?p=569#comment-475</guid>
		<description>Someone reading this might be confused about what the difference between Lists and arrays might be.   I suggest that your examples should match your text.
Perhaps you could comment that it a good idea not to return null collections or arrays.</description>
		<content:encoded><![CDATA[<p>Someone reading this might be confused about what the difference between Lists and arrays might be.   I suggest that your examples should match your text.<br />
Perhaps you could comment that it a good idea not to return null collections or arrays.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alepuzio</title>
		<link>http://www.selikoff.net/2008/10/15/never-return-null-arrays/comment-page-1/#comment-466</link>
		<dc:creator>alepuzio</dc:creator>
		<pubDate>Thu, 16 Oct 2008 07:35:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.selikoff.net/blog/?p=569#comment-466</guid>
		<description>I agree with you: the null value must mean &quot;error at runtime&quot;, not &quot;empty value&quot;: why don&#039;t use the assertions?

see too http://www.basilv.com/psd/blog/2008/how-to-handle-null-values-in-code</description>
		<content:encoded><![CDATA[<p>I agree with you: the null value must mean &#8220;error at runtime&#8221;, not &#8220;empty value&#8221;: why don&#8217;t use the assertions?</p>
<p>see too <a href="http://www.basilv.com/psd/blog/2008/how-to-handle-null-values-in-code" rel="nofollow">http://www.basilv.com/psd/blog/2008/how-to-handle-null-values-in-code</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oh</title>
		<link>http://www.selikoff.net/2008/10/15/never-return-null-arrays/comment-page-1/#comment-461</link>
		<dc:creator>oh</dc:creator>
		<pubDate>Wed, 15 Oct 2008 15:10:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.selikoff.net/blog/?p=569#comment-461</guid>
		<description>Completely agree, never return null instead of an empty collection. In general, require that the client performs null checks on the return value of a function is also a bad idea, usually there are better ways to indicate errors.
The approach you suggest is also recommended in Effective Java by J. Bloch.</description>
		<content:encoded><![CDATA[<p>Completely agree, never return null instead of an empty collection. In general, require that the client performs null checks on the return value of a function is also a bad idea, usually there are better ways to indicate errors.<br />
The approach you suggest is also recommended in Effective Java by J. Bloch.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Casper Bang</title>
		<link>http://www.selikoff.net/2008/10/15/never-return-null-arrays/comment-page-1/#comment-459</link>
		<dc:creator>Casper Bang</dc:creator>
		<pubDate>Wed, 15 Oct 2008 14:16:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.selikoff.net/blog/?p=569#comment-459</guid>
		<description>Good advice, seldom followed. We should strive to avoid &quot;if&quot;, as a successor to Dijkstra, &quot;if is evil&quot;. Remember, Collections define EMPTY_LIST, EMPTY_SET and EMPTY_MAP which are very handy in these cases (and reads better than alternatives).</description>
		<content:encoded><![CDATA[<p>Good advice, seldom followed. We should strive to avoid &#8220;if&#8221;, as a successor to Dijkstra, &#8220;if is evil&#8221;. Remember, Collections define EMPTY_LIST, EMPTY_SET and EMPTY_MAP which are very handy in these cases (and reads better than alternatives).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frank Behrens</title>
		<link>http://www.selikoff.net/2008/10/15/never-return-null-arrays/comment-page-1/#comment-458</link>
		<dc:creator>Frank Behrens</dc:creator>
		<pubDate>Wed, 15 Oct 2008 11:49:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.selikoff.net/blog/?p=569#comment-458</guid>
		<description>And remember that you can easily return an empy Collection (List, Set, ...) with
java.util.Collections.EmptyList (EmptySet, EmptyMap). You don&#039;t have to allocate a new object.</description>
		<content:encoded><![CDATA[<p>And remember that you can easily return an empy Collection (List, Set, &#8230;) with<br />
java.util.Collections.EmptyList (EmptySet, EmptyMap). You don&#8217;t have to allocate a new object.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

