<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Random Thoughts &#187; Bad Code</title>
	<atom:link href="http://blog.inflinx.com/category/bad-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.inflinx.com</link>
	<description>All About Software Development</description>
	<lastBuildDate>Mon, 22 Aug 2011 23:31:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Sadly Singleton</title>
		<link>http://blog.inflinx.com/2008/09/18/sadly-singleton/</link>
		<comments>http://blog.inflinx.com/2008/09/18/sadly-singleton/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 03:23:08 +0000</pubDate>
		<dc:creator>Balaji</dc:creator>
				<category><![CDATA[Bad Code]]></category>

		<guid isPermaLink="false">http://onerandomthought.wordpress.com/?p=102</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.inflinx.com/2008/09/18/sadly-singleton/';
var dzone_title = 'Sadly Singleton';
var dzone_blurb = '';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
Here is some code I came across today: public class SingletonWannabe { private static String SERVER_URL; private static int port; private static String protocol; public SingletonWannabe(String url, int port, String protocol) { this.SERVER_URL = url; this.port = port; this.protocol = protocol; } public static String getServerUrl() { return SERVER_URL; } public static int getPort() { [...]]]></description>
		<wfw:commentRss>http://blog.inflinx.com/2008/09/18/sadly-singleton/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>@ThreadSafe javadoc annotation</title>
		<link>http://blog.inflinx.com/2008/06/30/threadsafe-javadoc-annotation/</link>
		<comments>http://blog.inflinx.com/2008/06/30/threadsafe-javadoc-annotation/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 19:30:29 +0000</pubDate>
		<dc:creator>Balaji</dc:creator>
				<category><![CDATA[Bad Code]]></category>

		<guid isPermaLink="false">http://onerandomthought.wordpress.com/?p=37</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.inflinx.com/2008/06/30/threadsafe-javadoc-annotation/';
var dzone_title = '@ThreadSafe javadoc annotation';
var dzone_blurb = '';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
Recently I came across this line of code: private&#160;static&#160;final&#160;SimpleDateFormat&#160;dateFormat&#160;=&#160;new&#160;SimpleDateFormat(&#34;hh:mm&#160;a&#34;); Unfortunately, this code belongs to a class whose instances will be used by multiple threads. Even though the API documentation for SimpleDateFormat mentions it being not thread safe, somehow it failed to get the developers attention. As I got to think more about this, a @ThreadSafe [...]]]></description>
		<wfw:commentRss>http://blog.inflinx.com/2008/06/30/threadsafe-javadoc-annotation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Closing Output Stream in JSP tag</title>
		<link>http://blog.inflinx.com/2008/06/19/closing-output-stream-in-jsp-tag/</link>
		<comments>http://blog.inflinx.com/2008/06/19/closing-output-stream-in-jsp-tag/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 22:56:31 +0000</pubDate>
		<dc:creator>Balaji</dc:creator>
				<category><![CDATA[Bad Code]]></category>

		<guid isPermaLink="false">http://onerandomthought.wordpress.com/?p=29</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.inflinx.com/2008/06/19/closing-output-stream-in-jsp-tag/';
var dzone_title = 'Closing Output Stream in JSP tag';
var dzone_blurb = '';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
Here is a code snippet from a custom JSP tag I ran into today: try { out.write(hoursSelectHTML.toString()); out.flush(); } catch (IOException e) { logger.error("Exception writing to the output stream... ", e); } finally { try { out.close(); } catch (IOException e) { // Simply ignore this exception } }return SKIP_BODY; If you are still wondering what is wrong with it, pay attention to the part where the stream is [...]]]></description>
		<wfw:commentRss>http://blog.inflinx.com/2008/06/19/closing-output-stream-in-jsp-tag/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

