<?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>Les Hazlewood &#187; Uncategorized</title>
	<atom:link href="http://leshazlewood.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://leshazlewood.com</link>
	<description>Where Les is More</description>
	<lastBuildDate>Tue, 28 Jun 2011 21:39:24 +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>Upgrading from Groovy 1.7.x to 1.8.x: MissingPropertyException: No such property: for class:</title>
		<link>http://leshazlewood.com/2011/06/28/upgrading-from-groovy-1-7-x-to-1-8-x-missingpropertyexception-no-such-property-for-class/</link>
		<comments>http://leshazlewood.com/2011/06/28/upgrading-from-groovy-1-7-x-to-1-8-x-missingpropertyexception-no-such-property-for-class/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 21:39:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://leshazlewood.com/?p=147</guid>
		<description><![CDATA[<p>Just jotting this down for anyone that might encounter this problem.</p> <p>Apparently Groovy 1.8 introduced a backwards-incompatible language syntax change. It cropped up for me while I was attempting to compile existing Groovy unit tests (written against Groovy 1.7.x) that use EasyMock. I&#8217;ll show an example next &#8211; just note that that what I experienced [...]]]></description>
			<content:encoded><![CDATA[<p>Just jotting this down for anyone that might encounter this problem.</p>
<p>Apparently Groovy 1.8 introduced a backwards-incompatible language syntax change.  It cropped up for me while I was attempting to compile existing Groovy unit tests (written against Groovy 1.7.x) that use EasyMock.  I&#8217;ll show an example next &#8211; just note that that what I experienced was due to a Groovy syntax issue and not specific to EasyMock.</p>
<p>In a test case, I had a bit of code that looked like this:</p>
<pre>
expect(mock.someMethod(...)).andAnswer new IAnswer&lt;Whatever&gt;() {
    //bunch of stuff left out for brevity
}
</pre>
<p>Notice how the method argument to the <code>anAnswer</code> method is an anonymous inner class that spans multiple lines.  Also notice that I didn&#8217;t wrap the argument in parenthesis as they are usually optional in Groovy.  That is, instead of doing this:</p>
<pre>
someMethod.doSomething( anArg )
</pre>
<p>I usually do this:</p>
<pre>
someMethod.doSomething anArg
</pre>
<p>I find it to be more readable and less to type.</p>
<p>This worked fine with an anonymous inner class that spanned multiple lines in Groovy 1.7.  <b>This will not work in Groovy 1.8.x</b>.  When upgrading to Groovy 1.8.0 that same exact code threw an exception:</p>
<p><b><code>groovy.lang.MissingPropertyException: No such property: andAnswer for class: org.easymock.internal.MocksControl</code></b></p>
<p>Not nice.  The &#8216;no such property&#8217; error was a little misleading, but helpful &#8211; it told me Groovy thought <code>andAnswer</code> was a property &#8211; not a method.  So, I decided to throw some parenthesis in there to indicate that it was in fact a method.  The code then became:</p>
<pre>
expect(mock.someMethod(...)).andAnswer( new IAnswer&lt;Whatever&gt;() {
    //bunch of stuff left out for brevity
})
</pre>
<p>Notice the new opening parenthesis after <code>andAnswer</code> and the closing one after the anonymous inner class&#8217;s final <code>}</code> bracket.  A very subtle difference!  </p>
<p>After doing this, all of my test code compiled again.  I hope this helps anyone with a similar problem!</p>
]]></content:encoded>
			<wfw:commentRss>http://leshazlewood.com/2011/06/28/upgrading-from-groovy-1-7-x-to-1-8-x-missingpropertyexception-no-such-property-for-class/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google Chrome Funny Language Detection</title>
		<link>http://leshazlewood.com/2010/12/14/google-chrome-funny-language-detection/</link>
		<comments>http://leshazlewood.com/2010/12/14/google-chrome-funny-language-detection/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 00:18:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://leshazlewood.com/?p=131</guid>
		<description><![CDATA[<p>I thought this was rather amusing. When viewing a web server directory listing (in this case, the Maven Central repository), Chrome thought it was Italian. Seems like their language detection stuff isn&#8217;t quite fully fleshed out yet:</p> <p><a href="http://leshazlewood.com/wp-content/uploads/2010/12/maven_repo_italian.png"></a></p> <p>To be fair, it&#8217;s just a directory listing, and I bet my request was served from [...]]]></description>
			<content:encoded><![CDATA[<p>I thought this was rather amusing.  When viewing a web server directory listing (in this case, the Maven Central repository), Chrome thought it was Italian.  Seems like their language detection stuff isn&#8217;t quite fully fleshed out yet:</p>
<p><a href="http://leshazlewood.com/wp-content/uploads/2010/12/maven_repo_italian.png"><img src="http://leshazlewood.com/wp-content/uploads/2010/12/maven_repo_italian-300x202.png" alt="" title="maven_repo_italian" width="300" height="202" class="alignnone size-medium wp-image-132" /></a></p>
<p>To be fair, it&#8217;s just a directory listing, and I bet my request was served from M2 Central&#8217;s European mirror which probably resides partly in Italy.  This is strange though, since I&#8217;m in Silicon Valley, California &#8211; you&#8217;d think that the mirror routing algorithm is smarter than that!</p>
]]></content:encoded>
			<wfw:commentRss>http://leshazlewood.com/2010/12/14/google-chrome-funny-language-detection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Moral Dilemma</title>
		<link>http://leshazlewood.com/2010/11/30/a-moral-dilemma/</link>
		<comments>http://leshazlewood.com/2010/11/30/a-moral-dilemma/#comments</comments>
		<pubDate>Tue, 30 Nov 2010 20:14:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://leshazlewood.com/?p=107</guid>
		<description><![CDATA[<p>I&#8217;d like your thoughts on a moral dilemma I encountered last night in San Francisco. Here&#8217;s the story: </p> <p>On my way in to an In-n-Out Burger to grab a quick bite, there was a homeless guy in his mid-twenties sitting in front of the door with his scrawny-but-cute dog. He asked, &#8220;Could you please [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d like your thoughts on a moral dilemma I encountered last night in San Francisco.  Here&#8217;s the story:  </p>
<p>On my way in to an In-n-Out Burger to grab a quick bite, there was a homeless guy in his mid-twenties sitting in front of the door with his scrawny-but-cute dog.  He asked, &#8220;Could you please spare some food when you come out?&#8221;.  </p>
<p>Now, San Francisco is known for having one of the worst homeless problems in the nation.  But the homeless&#8217; public benefits here are good compared to the rest of the nation (health care, shelters, etc).  Many argue that the homeless situation is so bad because most homeless receive benefits well enough such that they don&#8217;t have an incentive to try and remedy their situation.  That is, it&#8217;s just easy enough to be homeless, that they don&#8217;t try to be otherwise.</p>
<p>So: </p>
<ol>
<li>Do you give the guy some food on the way out (or some money) because it is the holiday season after all, you&#8217;re a Christian, and you genuinely want to help people in times of need?</li>
<li>Or do you ignore the request because if you succumb, you&#8217;re only &#8216;enabling&#8217; that person, plus you make it uncomfortable for future restaurant guests because the homeless person might be encouraged to stay there and try again later.</li>
</ol>
<p>What do you do?  Why?</p>
]]></content:encoded>
			<wfw:commentRss>http://leshazlewood.com/2010/11/30/a-moral-dilemma/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

