<?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: Some fun with Boolean.getBoolean</title>
	<atom:link href="http://www.shankh.com/2009/07/07/some-fun-with-boolean-getboolean/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shankh.com/2009/07/07/some-fun-with-boolean-getboolean/</link>
	<description>Where you search Begins...</description>
	<lastBuildDate>Thu, 12 Jan 2012 19:28:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Peter Lawrey</title>
		<link>http://www.shankh.com/2009/07/07/some-fun-with-boolean-getboolean/comment-page-1/#comment-282</link>
		<dc:creator>Peter Lawrey</dc:creator>
		<pubDate>Sun, 19 Jul 2009 08:31:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.shankh.com/?p=97#comment-282</guid>
		<description>You could define -Dtrue=true on the command line to add to the confusion. ;)</description>
		<content:encoded><![CDATA[<p>You could define -Dtrue=true on the command line to add to the confusion. <img src='http://www.shankh.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Morris</title>
		<link>http://www.shankh.com/2009/07/07/some-fun-with-boolean-getboolean/comment-page-1/#comment-269</link>
		<dc:creator>Tony Morris</dc:creator>
		<pubDate>Mon, 13 Jul 2009 09:15:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.shankh.com/?p=97#comment-269</guid>
		<description>The function gives the illusion that it acts only on its given arguments. Instead, it acts on the outside world. In more practical languages, this is denoted by the type system making this potential error disappear along with many others.</description>
		<content:encoded><![CDATA[<p>The function gives the illusion that it acts only on its given arguments. Instead, it acts on the outside world. In more practical languages, this is denoted by the type system making this potential error disappear along with many others.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.shankh.com/2009/07/07/some-fun-with-boolean-getboolean/comment-page-1/#comment-263</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sat, 11 Jul 2009 10:03:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.shankh.com/?p=97#comment-263</guid>
		<description>@Pete

It is not really a method to convert string literal into boolean. It is a method to convert the &#039;true/any_other_value&#039; of a system property to Boolean.true/false.

This method may be useful in certain situations. What my point is that the name of the method is not clear and causes confusion. Programmers are human and they tend to make mistakes. I haven&#039;t seen a single programmer in my whole career who hasn&#039;t made mistakes. One of the best practices in programming is to give an appropriate name to your methods. If your method name is ambiguous you are inviting more bugs to the system (blame it on bad programming... but unfortunately that exists)

Imagine, if the method was having some sensible name like Boolean.getSystemPropertyAsBoolean ... That will clear all confusion and will get rid of half of the bugs caused by this invalid naming.

Bottom line is keep it simple....</description>
		<content:encoded><![CDATA[<p>@Pete</p>
<p>It is not really a method to convert string literal into boolean. It is a method to convert the &#8216;true/any_other_value&#8217; of a system property to Boolean.true/false.</p>
<p>This method may be useful in certain situations. What my point is that the name of the method is not clear and causes confusion. Programmers are human and they tend to make mistakes. I haven&#8217;t seen a single programmer in my whole career who hasn&#8217;t made mistakes. One of the best practices in programming is to give an appropriate name to your methods. If your method name is ambiguous you are inviting more bugs to the system (blame it on bad programming&#8230; but unfortunately that exists)</p>
<p>Imagine, if the method was having some sensible name like Boolean.getSystemPropertyAsBoolean &#8230; That will clear all confusion and will get rid of half of the bugs caused by this invalid naming.</p>
<p>Bottom line is keep it simple&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete</title>
		<link>http://www.shankh.com/2009/07/07/some-fun-with-boolean-getboolean/comment-page-1/#comment-262</link>
		<dc:creator>Pete</dc:creator>
		<pubDate>Sat, 11 Jul 2009 00:36:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.shankh.com/?p=97#comment-262</guid>
		<description>What the hell?

It&#039;s a perfectly valid, very useful, method.

Calls to deprecate it are bizarre! Any moron who misuses it because they can&#039;t read Javadoc shouldn&#039;t be hired in the first place.

converting a string literal into a boolean is what the valueOf method is for.</description>
		<content:encoded><![CDATA[<p>What the hell?</p>
<p>It&#8217;s a perfectly valid, very useful, method.</p>
<p>Calls to deprecate it are bizarre! Any moron who misuses it because they can&#8217;t read Javadoc shouldn&#8217;t be hired in the first place.</p>
<p>converting a string literal into a boolean is what the valueOf method is for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.shankh.com/2009/07/07/some-fun-with-boolean-getboolean/comment-page-1/#comment-261</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 10 Jul 2009 22:35:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.shankh.com/?p=97#comment-261</guid>
		<description>@Dennis

Yes it is documented but developers sometimes tend to overlook the documentation and go by the name of the method which in this case is a bit unclear.

@Garidan
They should have removed it after 1.3.1. Unfortunately the deprecation policy changed during that time and only methods which were inherently unsafe was selected for deprecation. See this Bug report http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4533891
In my opinion this is a critically unsafe method</description>
		<content:encoded><![CDATA[<p>@Dennis</p>
<p>Yes it is documented but developers sometimes tend to overlook the documentation and go by the name of the method which in this case is a bit unclear.</p>
<p>@Garidan<br />
They should have removed it after 1.3.1. Unfortunately the deprecation policy changed during that time and only methods which were inherently unsafe was selected for deprecation. See this Bug report <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4533891" rel="nofollow">http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4533891</a><br />
In my opinion this is a critically unsafe method</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Garidan</title>
		<link>http://www.shankh.com/2009/07/07/some-fun-with-boolean-getboolean/comment-page-1/#comment-260</link>
		<dc:creator>Garidan</dc:creator>
		<pubDate>Fri, 10 Jul 2009 21:08:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.shankh.com/?p=97#comment-260</guid>
		<description>What on earth that Sun developer was thinking about when writing such an idiot choice ?
Really stupid and dangerous
Thnaks for this, and i find strange this method was not deprecated immediatly after first release.

Bye</description>
		<content:encoded><![CDATA[<p>What on earth that Sun developer was thinking about when writing such an idiot choice ?<br />
Really stupid and dangerous<br />
Thnaks for this, and i find strange this method was not deprecated immediatly after first release.</p>
<p>Bye</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis</title>
		<link>http://www.shankh.com/2009/07/07/some-fun-with-boolean-getboolean/comment-page-1/#comment-259</link>
		<dc:creator>Dennis</dc:creator>
		<pubDate>Fri, 10 Jul 2009 18:47:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.shankh.com/?p=97#comment-259</guid>
		<description>Actually it is documented in JavaDoc:

public static boolean getBoolean(String name)

Returns true if and only if the system property named by the argument exists and is equal to the string &quot;true&quot;. (Beginning with version 1.0.2 of the JavaTM platform, the test of this string is case insensitive.) A system property is accessible through getProperty, a method defined by the System class.

    If there is no property with the specified name, or if the specified name is empty or null, then false is returned.</description>
		<content:encoded><![CDATA[<p>Actually it is documented in JavaDoc:</p>
<p>public static boolean getBoolean(String name)</p>
<p>Returns true if and only if the system property named by the argument exists and is equal to the string &#8220;true&#8221;. (Beginning with version 1.0.2 of the JavaTM platform, the test of this string is case insensitive.) A system property is accessible through getProperty, a method defined by the System class.</p>
<p>    If there is no property with the specified name, or if the specified name is empty or null, then false is returned.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

