<?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: Common Groovy Errors</title>
	<atom:link href="http://juixe.com/techknow/index.php/2006/06/11/common-groovy-errors/feed/" rel="self" type="application/rss+xml" />
	<link>http://juixe.com/techknow/index.php/2006/06/11/common-groovy-errors/</link>
	<description>Break Coders Block!</description>
	<lastBuildDate>Tue, 31 Jan 2012 15:29:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Eric Christiansen</title>
		<link>http://juixe.com/techknow/index.php/2006/06/11/common-groovy-errors/comment-page-1/#comment-47979</link>
		<dc:creator>Eric Christiansen</dc:creator>
		<pubDate>Tue, 14 Jun 2011 15:56:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/11/common-groovy-errors/#comment-47979</guid>
		<description>The error with the for loop is that &quot;i&quot; is never initialized. &quot;int i = 0; ...&quot; fixes that.</description>
		<content:encoded><![CDATA[<p>The error with the for loop is that &#8220;i&#8221; is never initialized. &#8220;int i = 0; &#8230;&#8221; fixes that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Nielsen</title>
		<link>http://juixe.com/techknow/index.php/2006/06/11/common-groovy-errors/comment-page-1/#comment-65</link>
		<dc:creator>Rob Nielsen</dc:creator>
		<pubDate>Wed, 17 Sep 2008 06:41:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/11/common-groovy-errors/#comment-65</guid>
		<description>If you want to iterate through a list with an index you can use

list.eachWithIndex { it, i -&gt; println &quot;$i:$it&quot; }

For an early break out of an each, you would normally use find instead

[1, 2, 3, 4, 5].find {
  println it
  it == 2
}</description>
		<content:encoded><![CDATA[<p>If you want to iterate through a list with an index you can use</p>
<p>list.eachWithIndex { it, i -&gt; println &#8220;$i:$it&#8221; }</p>
<p>For an early break out of an each, you would normally use find instead</p>
<p>[1, 2, 3, 4, 5].find {<br />
  println it<br />
  it == 2<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://juixe.com/techknow/index.php/2006/06/11/common-groovy-errors/comment-page-1/#comment-64</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Tue, 19 Aug 2008 10:54:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/06/11/common-groovy-errors/#comment-64</guid>
		<description>Thanks, this helped me figure out why I was getting a java.lang.ArrayStoreException passing a Groovy list to a method that took a String[] and a String ... vararg.</description>
		<content:encoded><![CDATA[<p>Thanks, this helped me figure out why I was getting a java.lang.ArrayStoreException passing a Groovy list to a method that took a String[] and a String &#8230; vararg.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

