<?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: Finally, a use for checked exceptions</title>
	<atom:link href="http://andypalmer.com/2011/11/finally-a-use-for-checked-exceptions/feed/" rel="self" type="application/rss+xml" />
	<link>http://andypalmer.com/2011/11/finally-a-use-for-checked-exceptions/</link>
	<description>Views on software, technology, consulting and business process</description>
	<lastBuildDate>Fri, 18 Nov 2011 07:13:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Andy Palmer</title>
		<link>http://andypalmer.com/2011/11/finally-a-use-for-checked-exceptions/comment-page-1/#comment-1126</link>
		<dc:creator>Andy Palmer</dc:creator>
		<pubDate>Fri, 18 Nov 2011 07:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://andypalmer.com/?p=272#comment-1126</guid>
		<description>Good point. I have used Call Hierarchy, although when I read your comment, the idea that popped into my mind was &quot;debugging&quot;. 
I use &quot;Find references in workspace (&lt;ctrl&gt;&lt;shift&gt;g)&quot; a lot while refactoring (particularly while deleting code), but not Call Hierarchy. I&#039;m not sure why; I&#039;ll investigate that feeling next time I&#039;m doing something like this.

Also, yes, the point of this is to leverage the compiler to help make sure we&#039;ve removed all traces of the original null. I hate null checks within code I control, as that is indicative of a bad citizen (see &lt;a href=&quot;http://docs.codehaus.org/display/PICO/Good+Citizen&quot; rel=&quot;nofollow&quot;&gt;Good Citizen&lt;/a&gt;)</description>
		<content:encoded><![CDATA[<p>Good point. I have used Call Hierarchy, although when I read your comment, the idea that popped into my mind was &#8221;debugging&#8221;. <br />
I use &#8220;Find references in workspace (&lt;ctrl&gt;&lt;shift&gt;g)&#8221; a lot while refactoring (particularly while deleting code), but not Call Hierarchy. I&#8217;m not sure why; I&#8217;ll investigate that feeling next time I&#8217;m doing something like this.</p>
<p>Also, yes, the point of this is to leverage the compiler to help make sure we&#8217;ve removed all traces of the original null. I hate null checks within code I control, as that is indicative of a bad citizen (see <a href="http://docs.codehaus.org/display/PICO/Good+Citizen" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/docs.codehaus.org/display/PICO/Good+Citizen?referer=');">Good Citizen</a>)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Demian Alonso</title>
		<link>http://andypalmer.com/2011/11/finally-a-use-for-checked-exceptions/comment-page-1/#comment-1125</link>
		<dc:creator>Demian Alonso</dc:creator>
		<pubDate>Fri, 18 Nov 2011 01:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://andypalmer.com/?p=272#comment-1125</guid>
		<description>Just a little contribution: Many ideas do have a way to search for references hierarchically. I now for sure that in Eclipse is called &quot;call hierarchy&quot;, but I am quite sure that on Idea is possible too, but I do not know the shortcuts :)

Still, the &quot;it won&#039;t compile&quot;  technic does prevent you from missing any case.</description>
		<content:encoded><![CDATA[<p>Just a little contribution: Many ideas do have a way to search for references hierarchically. I now for sure that in Eclipse is called &#8220;call hierarchy&#8221;, but I am quite sure that on Idea is possible too, but I do not know the shortcuts <img src='http://andypalmer.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Still, the &#8220;it won&#8217;t compile&#8221;  technic does prevent you from missing any case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Palmer</title>
		<link>http://andypalmer.com/2011/11/finally-a-use-for-checked-exceptions/comment-page-1/#comment-1124</link>
		<dc:creator>Andy Palmer</dc:creator>
		<pubDate>Thu, 17 Nov 2011 17:15:00 +0000</pubDate>
		<guid isPermaLink="false">http://andypalmer.com/?p=272#comment-1124</guid>
		<description>Good point. Although I would hope (for my sanity) that if there are catch everything blocks in the code, that they&#039;re doing something sensible and I don&#039;t need to go and change them at this point.
(I&#039;ll probably go and rip them out at the soonest opportunity though :-) )</description>
		<content:encoded><![CDATA[<p>Good point. Although I would hope (for my sanity) that if there are catch everything blocks in the code, that they&#8217;re doing something sensible and I don&#8217;t need to go and change them at this point.<br />
(I&#8217;ll probably go and rip them out at the soonest opportunity though <img src='http://andypalmer.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Palmer</title>
		<link>http://andypalmer.com/2011/11/finally-a-use-for-checked-exceptions/comment-page-1/#comment-1123</link>
		<dc:creator>Andy Palmer</dc:creator>
		<pubDate>Thu, 17 Nov 2011 17:14:00 +0000</pubDate>
		<guid isPermaLink="false">http://andypalmer.com/?p=272#comment-1123</guid>
		<description>Yes, although the advantage of this method is that it propagates _beyond the direct usages_.
</description>
		<content:encoded><![CDATA[<p>Yes, although the advantage of this method is that it propagates _beyond the direct usages_.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Palmer</title>
		<link>http://andypalmer.com/2011/11/finally-a-use-for-checked-exceptions/comment-page-1/#comment-1122</link>
		<dc:creator>Andy Palmer</dc:creator>
		<pubDate>Thu, 17 Nov 2011 17:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://andypalmer.com/?p=272#comment-1122</guid>
		<description>The advantage is that it highlights the direct and indirect usages of someMethod. Direct usages is obviously trivial, it&#039;s the indirect usages where the bugs usually lie.</description>
		<content:encoded><![CDATA[<p>The advantage is that it highlights the direct and indirect usages of someMethod. Direct usages is obviously trivial, it&#8217;s the indirect usages where the bugs usually lie.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dileep Mandapam</title>
		<link>http://andypalmer.com/2011/11/finally-a-use-for-checked-exceptions/comment-page-1/#comment-1121</link>
		<dc:creator>Dileep Mandapam</dc:creator>
		<pubDate>Thu, 17 Nov 2011 16:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://andypalmer.com/?p=272#comment-1121</guid>
		<description>I don&#039;t see any other advantage of this refactoring technique , other than finding usages of &quot;someMethod&quot;</description>
		<content:encoded><![CDATA[<p>I don&#8217;t see any other advantage of this refactoring technique , other than finding usages of &#8220;someMethod&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ricky Clarkson</title>
		<link>http://andypalmer.com/2011/11/finally-a-use-for-checked-exceptions/comment-page-1/#comment-1120</link>
		<dc:creator>Ricky Clarkson</dc:creator>
		<pubDate>Thu, 17 Nov 2011 16:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://andypalmer.com/?p=272#comment-1120</guid>
		<description>You&#039;ll need to remove all the catch (Exception e) and catch (Throwable t) instances that inevitably end up in large code bases precisely because of checked exceptions.</description>
		<content:encoded><![CDATA[<p>You&#8217;ll need to remove all the catch (Exception e) and catch (Throwable t) instances that inevitably end up in large code bases precisely because of checked exceptions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Palmer</title>
		<link>http://andypalmer.com/2011/11/finally-a-use-for-checked-exceptions/comment-page-1/#comment-1119</link>
		<dc:creator>Andy Palmer</dc:creator>
		<pubDate>Thu, 17 Nov 2011 15:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://andypalmer.com/?p=272#comment-1119</guid>
		<description>If my someMethod() from above was used in another method like so:
public Result someOtherMethod() {
  if (someValue) {return something;}
  return someMethod();
}

then the value of someOtherMethod can also be null. So I also need to check the callers of that method, and so on, until I reach someone who either knows what the sensible thing to do with the value is or, I reach the extremities of the program (for example, the main loop or the request handler).

In the simple case, there isn&#039;t a need to do this, but removing a null return should encompass the entire system, and this method ensures that this is the case.

You are correct about reflective calls, but I would hope that people using reflective calls were aware of the power (and therefore, danger) of that approach. </description>
		<content:encoded><![CDATA[<p>If my someMethod() from above was used in another method like so:<br />
public Result someOtherMethod() {<br />
  if (someValue) {return something;}<br />
  return someMethod();<br />
}</p>
<p>then the value of someOtherMethod can also be null. So I also need to check the callers of that method, and so on, until I reach someone who either knows what the sensible thing to do with the value is or, I reach the extremities of the program (for example, the main loop or the request handler).</p>
<p>In the simple case, there isn&#8217;t a need to do this, but removing a null return should encompass the entire system, and this method ensures that this is the case.</p>
<p>You are correct about reflective calls, but I would hope that people using reflective calls were aware of the power (and therefore, danger) of that approach. </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Shneyderman</title>
		<link>http://andypalmer.com/2011/11/finally-a-use-for-checked-exceptions/comment-page-1/#comment-1118</link>
		<dc:creator>Alex Shneyderman</dc:creator>
		<pubDate>Thu, 17 Nov 2011 15:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://andypalmer.com/?p=272#comment-1118</guid>
		<description>Hmm, I do not understand the second part of the explanation. The first five markers is all you need I would think. The rest is noise - although I do not understand why/how out of five usage places you would get another 20. If I have a method cal chain like so:
someUsageOfUsage -&gt; usage -&gt; npeProblem(this is the method where we add new Exception)I would only get trouble reports with the last portion of the chain (5 usages) pointing to the usage methods. The rest is noise, but I think compiler would not even complain aout the first link in the chain) and I woud not like to deal with that at all. So, I do not really see transitive use here. How?

Of course, it would be worth mentioning that the limitation of the trick is the loose coupling (reflective calls, JSP pages, etc). This method fails, and would only give the person using it a false sense of understanding.  </description>
		<content:encoded><![CDATA[<p>Hmm, I do not understand the second part of the explanation. The first five markers is all you need I would think. The rest is noise &#8211; although I do not understand why/how out of five usage places you would get another 20. If I have a method cal chain like so:<br />
someUsageOfUsage -&gt; usage -&gt; npeProblem(this is the method where we add new Exception)I would only get trouble reports with the last portion of the chain (5 usages) pointing to the usage methods. The rest is noise, but I think compiler would not even complain aout the first link in the chain) and I woud not like to deal with that at all. So, I do not really see transitive use here. How?</p>
<p>Of course, it would be worth mentioning that the limitation of the trick is the loose coupling (reflective calls, JSP pages, etc). This method fails, and would only give the person using it a false sense of understanding.  </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Kriegelstein</title>
		<link>http://andypalmer.com/2011/11/finally-a-use-for-checked-exceptions/comment-page-1/#comment-1117</link>
		<dc:creator>Thomas Kriegelstein</dc:creator>
		<pubDate>Thu, 17 Nov 2011 14:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://andypalmer.com/?p=272#comment-1117</guid>
		<description>Changing an API and relying on the compiler to highlight the downstream changes is so clever. I might not have thought of that several years, like 10, before. Anyways kudos for sharing that stuff. And it works with your favorite IDE, e.g. Emacs, Notepad and vi too.</description>
		<content:encoded><![CDATA[<p>Changing an API and relying on the compiler to highlight the downstream changes is so clever. I might not have thought of that several years, like 10, before. Anyways kudos for sharing that stuff. And it works with your favorite IDE, e.g. Emacs, Notepad and vi too.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

