<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5862178524406640164</id><updated>2011-09-29T00:40:43.374-04:00</updated><category term='linux'/><category term='log4j'/><category term='autotrace'/><category term='hibernate'/><category term='show_sql'/><category term='shell'/><category term='cpu utilization'/><category term='svn linux'/><category term='java.net.URL'/><category term='microsoft'/><category term='diacritics charset encoding'/><category term='cmd'/><category term='sar'/><category term='java stream string.'/><category term='JAXB maven wsimport'/><category term='oracle'/><title type='text'>The Inquisitive Programmer</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>22</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-3121279080326139835</id><published>2011-04-05T13:02:00.003-04:00</published><updated>2011-04-05T13:04:31.108-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cmd'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><category scheme='http://www.blogger.com/atom/ns#' term='microsoft'/><title type='text'>Good Microsoft CMD Reference</title><content type='html'>Good reference for Microsoft Shell scripting. Including available env variables. &lt;a href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx?mfr=true"&gt;http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx?mfr=true&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-3121279080326139835?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/3121279080326139835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=3121279080326139835' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/3121279080326139835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/3121279080326139835'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2011/04/good-microsoft-cmd-reference.html' title='Good Microsoft CMD Reference'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-6080374531121678667</id><published>2011-01-31T18:26:00.001-05:00</published><updated>2011-01-31T18:27:50.970-05:00</updated><title type='text'>Changing Blogs</title><content type='html'>I've changed Blogs for now. Please note the new address...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.crediblesolutions.net/"&gt;http://www.crediblesolutions.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thanks for reading!&lt;br /&gt;&lt;br /&gt;Eric&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-6080374531121678667?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/6080374531121678667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=6080374531121678667' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/6080374531121678667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/6080374531121678667'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2011/01/changing-blogs.html' title='Changing Blogs'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-8184611380331611098</id><published>2010-12-30T12:34:00.005-05:00</published><updated>2010-12-30T14:55:47.519-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sar'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='cpu utilization'/><title type='text'>CPU Utilization</title><content type='html'>&lt;div&gt;Every way possible to dice CPU utiliztion on *nix.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://www.cyberciti.biz/tips/how-do-i-find-out-linux-cpu-utilization.html"&gt;http://www.cyberciti.biz/tips/how-do-i-find-out-linux-cpu-utilization.html&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I learned that &lt;a href="http://www.ibm.com/developerworks/aix/library/au-unix-perfmonsar.html"&gt;sar&lt;/a&gt; is great! ( but &lt;a href="http://en.wikipedia.org/wiki/Severe_acute_respiratory_syndrome"&gt;sars&lt;/a&gt; is bad )&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-8184611380331611098?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/8184611380331611098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=8184611380331611098' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/8184611380331611098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/8184611380331611098'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2010/12/cpu-utilization.html' title='CPU Utilization'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-2333421022459922072</id><published>2010-12-20T15:30:00.003-05:00</published><updated>2010-12-20T15:46:16.619-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java stream string.'/><title type='text'>How do I do that Java 101 task again?...</title><content type='html'>I find that every new Java project I'm on, I run into a situation where I want to translate an &lt;span style="font-weight:bold;"&gt;InputStream&lt;/span&gt; to a &lt;b&gt;String&lt;/b&gt; or vice versa.  This is frequently in a unit test where I've read an input file or expected output file in using &lt;i&gt;getClass().getResourceAsStream() &lt;/i&gt;and need to convert to Strings for use in my test.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It's a simple boiler plate task, yet darned if I can remember &lt;span style="text-decoration:line-through;"&gt;the most&lt;/span&gt; &lt;i&gt;an&lt;/i&gt; effecient way to do it every time.  I always re-google and always tend to refer to this one to jog my memory..&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;  &lt;a href="http://www.kodejava.org/examples/266.html"&gt;http://www.kodejava.org/examples/266.html&lt;/a&gt;. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; Thought I'd link out to it this time.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-2333421022459922072?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/2333421022459922072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=2333421022459922072' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/2333421022459922072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/2333421022459922072'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2010/12/how-do-i-do-that-java-101-task-again.html' title='How do I do that Java 101 task again?...'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-3113820153667453189</id><published>2010-12-08T13:59:00.003-05:00</published><updated>2010-12-08T14:02:56.129-05:00</updated><title type='text'>POM Search Site</title><content type='html'>I know this is obvious, but adding it I can reference in the future...&lt;br /&gt;&lt;br /&gt;Get dependency tags for dependencies.&lt;br /&gt;&lt;a href="http://mvnrepository.com/"&gt;http://mvnrepository.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-3113820153667453189?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/3113820153667453189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=3113820153667453189' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/3113820153667453189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/3113820153667453189'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2010/12/pom-search-site.html' title='POM Search Site'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-6150557254910670939</id><published>2010-12-03T16:16:00.004-05:00</published><updated>2010-12-03T16:22:23.550-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='log4j'/><category scheme='http://www.blogger.com/atom/ns#' term='show_sql'/><title type='text'>Hibernate shows SQL to log4j too</title><content type='html'>Log hibernate queries and more without using the show_sql = true setting in your hibernate config. This way you can see them in your log4j configured log files, not just in your STDOUT log.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;# Hibernate logging&lt;br /&gt;# Log everything (a lot of information, but very useful for troubleshooting)&lt;/strong&gt;&lt;br /&gt;log4j.logger.org.hibernate=FATAL&lt;br /&gt;&lt;strong&gt;# Log all SQL DML statements as they are executed&lt;/strong&gt;&lt;br /&gt;log4j.logger.org.hibernate.SQL=DEBUG&lt;br /&gt;&lt;strong&gt;# Log all JDBC parameters&lt;/strong&gt;&lt;br /&gt;log4j.logger.org.hibernate.type=INHERITED&lt;br /&gt;&lt;strong&gt;# Log all SQL DDL statements as they are executed&lt;br /&gt;&lt;/strong&gt;log4j.logger.org.hibernate.tool.hbm2ddl=INHERITED&lt;br /&gt;&lt;strong&gt;# Log the state of all entities (max 20 entities) associated with the session at flush time&lt;/strong&gt;&lt;br /&gt;log4j.logger.org.hibernate.pretty=INHERITED&lt;br /&gt;&lt;strong&gt;# Log all second-level cache activity&lt;/strong&gt;&lt;br /&gt;log4j.logger.org.hibernate.cache=INHERITED&lt;br /&gt;&lt;strong&gt;# Log all OSCache activity - used by Hibernate&lt;/strong&gt;&lt;br /&gt;log4j.logger.com.opensymphony.oscache=INHERITED&lt;br /&gt;&lt;strong&gt;# Log transaction related activity&lt;/strong&gt;&lt;br /&gt;log4j.logger.org.hibernate.transaction=INHERITED&lt;br /&gt;&lt;strong&gt;# Log all JDBC resource acquisition&lt;br /&gt;&lt;/strong&gt;log4j.logger.org.hibernate.jdbc=INHERITED&lt;br /&gt;&lt;strong&gt;# Log all JAAS authorization requests&lt;br /&gt;&lt;/strong&gt;log4j.logger.org.hibernate.secure=INHERITED &lt;/span&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-6150557254910670939?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/6150557254910670939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=6150557254910670939' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/6150557254910670939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/6150557254910670939'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2010/12/log-hibernate-queries-and-more-without.html' title='Hibernate shows SQL to log4j too'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-2608817906029342331</id><published>2010-04-19T15:31:00.004-04:00</published><updated>2010-04-19T15:38:32.056-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='autotrace'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle Query Analysis</title><content type='html'>This is the best thing since sliced bread...&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;set autotrace on exp;&lt;br /&gt;Run Some SQL!&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It shows me the bottle necks in my SQL statement, where indexes might help,  and give me a pretty accurate estimate on the time the statement will take to run.  This is all done within a second for so.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Example output..&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, Geneva, sans-serif; font-size: medium; "&gt;&lt;br /&gt;Elapsed: 00:00:00.01&lt;br /&gt;&lt;br /&gt;Execution Plan &lt;br /&gt;---------------------------------------------------------- &lt;br /&gt;Plan hash value: 1080733679&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation           | Name           | Rows  | Bytes | Cost (%CPU)| Time     |&lt;br /&gt;--------------------------------------------------------------------------------------&lt;br /&gt;|   0 | SELECT STATEMENT    |                |     1 |    21 |     2   (0)| 00:00:01 |&lt;br /&gt;|   1 |  SORT AGGREGATE     |                |     1 |    21 |            |          |&lt;br /&gt;|   2 |   NESTED LOOPS      |                |     1 |    21 |     2   (0)| 00:00:01 |&lt;br /&gt;|*  3 |    TABLE ACCESS FULL| NG_FILES       |     1 |    16 |     2   (0)| 00:00:01 |&lt;br /&gt;|*  4 |    INDEX UNIQUE SCAN| PK_NG_FILES_ID |     1 |     5 |     0   (0)| 00:00:01 |&lt;br /&gt;--------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Predicate Information (identified by operation id):&lt;br /&gt;---------------------------------------------------&lt;br /&gt;&lt;br /&gt;   3 - filter("DATE_FILE_RECEIVED"&gt;=TIMESTAMP' 2009-12-16 00:00:00' AND&lt;br /&gt;              "DATE_FILE_RECEIVED"&lt;=TIMESTAMP' 2009-12-17 00:00:00')&lt;br /&gt;   4 - access("NG_FILE_ID"="NG_FILE_ID")&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-2608817906029342331?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/2608817906029342331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=2608817906029342331' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/2608817906029342331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/2608817906029342331'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2010/04/oracle-query-analysis.html' title='Oracle Query Analysis'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-5529843039755927838</id><published>2010-04-01T15:37:00.005-04:00</published><updated>2010-04-01T16:12:10.686-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='svn linux'/><title type='text'>Linux Commands</title><content type='html'>A few commands I find myself using from time to time and don't want to forget.&lt;br /&gt;&lt;br /&gt;To examine a large log with logj4, STDIN, STDOUT, and STDERR printouts all going to the same log file, I find it easier to comb when I can narrow down to specific type(s) of log4j level statements and show them without line breaks.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;grep "^\[TRACE\|DEBUG\|INFO\|ERROR\|WARN\|FATAL\]" my.log | less -S&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Also, to recursively add files in your svn working copy...&lt;br /&gt;&lt;br /&gt;&lt;code&gt;svn status | grep "^\?" | awk '{print $2}' | xargs svn add&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-5529843039755927838?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/5529843039755927838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=5529843039755927838' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/5529843039755927838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/5529843039755927838'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2010/04/i-regularly-need-to-examine-large-log.html' title='Linux Commands'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-700453097387970419</id><published>2010-03-26T16:40:00.001-04:00</published><updated>2010-03-29T08:50:56.903-04:00</updated><title type='text'>SVN Merging : Blocking Revisions</title><content type='html'>&lt;p&gt;Blocking revisions from auto merging in svn, taken from the &lt;a href="http://svnbook.red-bean.com/en/1.5/svn.branchmerge.advanced.html#svn.branchmerge.advanced.blockchanges"&gt;manual&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: serif; font-size: medium; "&gt;&lt;pre class="screen" style="font-family: monospace; font-style: normal; font-weight: normal; font-size: 12px; color: black; margin-top: 1em; margin-right: 0.25in; margin-bottom: 1em; margin-left: 0.25in; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(240, 240, 240); border-top-color: black; border-top-style: dotted; border-top-width: 1px; border-left-color: black; border-left-style: dotted; border-left-width: 1px; border-right-color: black; border-right-style: solid; border-right-width: 2px; border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 2px; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br /&gt;&lt;br /&gt;$ cd my-calc-branch&lt;br /&gt;&lt;br /&gt;$ svn propget svn:mergeinfo .&lt;br /&gt;/trunk:1680-3305&lt;br /&gt;&lt;br /&gt;# Let's make the metadata list r3328 as already merged.&lt;br /&gt;$ svn merge -c 3328 --record-only http://svn.example.com/repos/calc/trunk&lt;br /&gt;&lt;br /&gt;$ svn status&lt;br /&gt;M     .&lt;br /&gt;&lt;br /&gt;$ svn propget svn:mergeinfo .&lt;br /&gt;/trunk:1680-3305,3328&lt;br /&gt;&lt;br /&gt;$ svn commit -m "Block r3328 from being merged to the branch."&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-700453097387970419?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/700453097387970419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=700453097387970419' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/700453097387970419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/700453097387970419'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2010/03/svn-merging-blocking-revisions_26.html' title='SVN Merging : Blocking Revisions'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-217946707667249876</id><published>2010-02-19T09:44:00.001-05:00</published><updated>2010-03-24T10:41:57.443-04:00</updated><title type='text'>Debug tests in maven</title><content type='html'>&lt;span class="Apple-style-span"   style="  line-height: 19px; font-family:sans-serif;font-size:13px;"&gt;&lt;ul style="line-height: 1.5em; list-style-type: square; margin-top: 0.3em; margin-right: 0px; margin-bottom: 0px; margin-left: 1.5em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-image: url(http://intranet-wiki.oclc.org/mediawiki/skins/monobook/bullet.gif); "&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;If you need to configure a different port, you may pass a more detailed value. For example, the value below will use port 5334.&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;&lt;b&gt;mvn -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5334" test&lt;/b&gt;&lt;/p&gt;&lt;p style="margin-top: 0.4em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; line-height: 1.5em; "&gt;&lt;i&gt;Note: if you are not worried about making a connection to the debugger so that you are connected before the program reaches your breakpoint, you can change suspend=y to suspend=n, and the tests will not wait for a debugger connection&lt;/i&gt;&lt;/p&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;/ul&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-217946707667249876?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/217946707667249876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=217946707667249876' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/217946707667249876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/217946707667249876'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2010/02/debug-tests-in-maven.html' title='Debug tests in maven'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-6813926672695645076</id><published>2009-10-30T14:18:00.000-04:00</published><updated>2009-10-30T14:19:06.301-04:00</updated><title type='text'>Force Quit on Mac Apps</title><content type='html'>Command + Option + Escape&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-6813926672695645076?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/6813926672695645076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=6813926672695645076' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/6813926672695645076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/6813926672695645076'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2009/10/force-quit-on-mac-apps.html' title='Force Quit on Mac Apps'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-3946174707921723238</id><published>2009-10-13T21:59:00.002-04:00</published><updated>2009-10-13T22:03:56.110-04:00</updated><title type='text'>Capturing Screenshots On Mac</title><content type='html'>&lt;p&gt;&lt;span&gt;Great tips for capturing screen shots on the Mac.  I got this from..&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.techiecorner.com/138/how-to-do-print-screen-in-mac-os-x/"&gt;&lt;span&gt;http://www.techiecorner.com/138/how-to-do-print-screen-in-mac-os-x/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;There are few ways to do &lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;screen capture&lt;/span&gt;&lt;span&gt; in &lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;Mac&lt;/span&gt;&lt;span&gt; &lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;OS X&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt; Follow the steps below and you will be able to do a &lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;screen capture&lt;/span&gt;&lt;span&gt; in &lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;Mac&lt;/span&gt;&lt;span&gt; &lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;OS X&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span id="more-138"&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;span&gt;Switch to the screen that you wan to to do &lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;screen capture&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;&lt;span style="border-bottom: 1px solid rgb(0, 0, 255); text-decoration: underline; color: rgb(0, 0, 255); font-weight: 400; font-style: normal;font-family:'Lucida Grande',Verdana,Arial,Sans-Serif;font-size:12;" class="IL_LINK_STYLE"  &gt;Hold down&lt;/span&gt; Apple key ⌘ + Shift + 3 and release all&lt;/span&gt;&lt;/li&gt;&lt;li&gt;then use your mouse to click on the screen&lt;/li&gt;&lt;li&gt;&lt;span&gt;&lt;span&gt;Done. You &lt;span style="border-bottom: 1px solid rgb(0, 0, 255); text-decoration: underline; color: rgb(0, 0, 255); font-weight: 400; font-style: normal;font-family:'Lucida Grande',Verdana,Arial,Sans-Serif;font-size:12;" class="IL_LINK_STYLE"  &gt;will see&lt;/span&gt; a picture file in at your desktop. That’s the &lt;/span&gt;&lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;screen capture&lt;/span&gt; picture.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;span&gt;You can also do a &lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;screen capture&lt;/span&gt; for a portion of your screen.&lt;/span&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;span&gt;Switch to the screen that you wan to to do &lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;screen capture&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;&lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;Hold down&lt;/span&gt; Apple key ⌘ + Shift + 4 and release all key&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;Now, You &lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;will see&lt;/span&gt; the mouse cursor will change to +&lt;/span&gt;&lt;/li&gt;&lt;li&gt;You can start to drag your mouse to select the portion you wish to capture.&lt;/li&gt;&lt;li&gt;&lt;span&gt;&lt;span&gt;Once finish, you &lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;will see&lt;/span&gt; a picture file in at your desktop. That’s the &lt;/span&gt;&lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;screen capture&lt;/span&gt; picture!&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;span&gt;If you want to do a &lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;screen capture&lt;/span&gt; for a particular application window, you can follow this:-&lt;/span&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;span&gt;Switch to the screen that you wan to to do &lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;screen capture&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;&lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;Hold down&lt;/span&gt; Apple key ⌘ + Shift + 4 and release all key&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;Now, You &lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;will see&lt;/span&gt; the mouse cursor will change to +&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Press the space bar once&lt;/li&gt;&lt;li&gt;&lt;span&gt;You &lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;will see&lt;/span&gt; the mouse cursor change to a camera&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;Now you can use the camera to select which application window to &lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;screen capture&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;&lt;span&gt;Once finish, you &lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;will see&lt;/span&gt; a picture file in at your desktop. That’s the &lt;/span&gt;&lt;span class="IL_SPAN"&gt;&lt;input name="IL_MARKER" type="hidden"&gt;screen capture&lt;/span&gt; picture!&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-3946174707921723238?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/3946174707921723238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=3946174707921723238' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/3946174707921723238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/3946174707921723238'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2009/10/capturing-screenshots-on-mac.html' title='Capturing Screenshots On Mac'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-2240370304547125850</id><published>2009-09-25T08:35:00.005-04:00</published><updated>2009-09-25T08:38:44.917-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='diacritics charset encoding'/><title type='text'>Character-set Encoding Issues</title><content type='html'>Great site for inspecting characters to troubleshoot character encoding issues. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=%3F&amp;amp;mode=char"&gt;http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=%3F&amp;amp;mode=char&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-2240370304547125850?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/2240370304547125850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=2240370304547125850' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/2240370304547125850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/2240370304547125850'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2009/09/character-set-encoding-issues.html' title='Character-set Encoding Issues'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-2124136881061553542</id><published>2009-09-24T09:07:00.004-04:00</published><updated>2009-09-24T09:26:57.563-04:00</updated><title type='text'>DBUnit and Foriegn Key Constraints</title><content type='html'>&lt;div&gt;&lt;br /&gt;DB Unit is great, except for the FK constraint hell you go through until you learn to do..&lt;/div&gt;&lt;pre&gt;1. IDataSet dataset = new FlatXmlDataSet(&lt;br /&gt;                     ClassLoader.getSystemResourceAsStream(&lt;br /&gt;                     datasetFilename));&lt;/pre&gt;&lt;pre&gt;&lt;b&gt;2. dataset = new FilteredDataSet(&lt;br /&gt;            new DatabaseSequenceFilter(&lt;br /&gt;            getConnection()), dataset);&lt;/b&gt;&lt;/pre&gt;&lt;div&gt;Line 2 there looks at the constraints and the dataset and determines the correct ordering for the SQL statements for your database, so that when they're run in the setup/teardown of your DBUnit tests you don't get FK constraint violations.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are many blog postings that give all kinds of ways to disable or defer FK checks by the database, but this works better I think, for me since I have the test setup in Java.  This came from the comments in a &lt;a href="http://raibledesigns.com/rd/entry/dbunit_tip_turn_off_foreign"&gt;Matt Raible post&lt;/a&gt; from 2006. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-2124136881061553542?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/2124136881061553542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=2124136881061553542' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/2124136881061553542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/2124136881061553542'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2009/09/dbunit-and-foriegn-key-constraints.html' title='DBUnit and Foriegn Key Constraints'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-7937891722918346884</id><published>2009-09-10T13:21:00.007-04:00</published><updated>2009-09-10T14:51:46.013-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java.net.URL'/><title type='text'>You're in Timeout</title><content type='html'>&lt;div&gt;I recently had an issue with some code I wrote to connect to a service with a "rest like" interface that returns XML data given a simple query over a HTTP GET request.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I used that java.net.URL class to send the query and retrieve the results as follows..&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;br /&gt;private InputStream executeQuery(String query) {&lt;br /&gt;&lt;br /&gt;   InputStream rawResults = null;&lt;br /&gt;&lt;br /&gt;   try {&lt;br /&gt;      query = baseUrl + "?query=" + query;&lt;br /&gt;      if(LOG.isDebugEnabled()) {&lt;br /&gt;        LOG.debug("Full Query : " + query);&lt;br /&gt;      }&lt;br /&gt;      URL request = new URL(query);&lt;br /&gt;      rawResults = request.openStream();&lt;br /&gt;   }&lt;br /&gt;   catch (IOException e) {&lt;br /&gt;      LOG.warn(e.getMessage(), e);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   return rawResults;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If the host on which this service runs is down (or doesn't exist) before URL.openStream() gets invoked, a java.net.UnknownHostException is quickly thrown (within about 4000 milliseconds), the catch block is executed, and the process goes on.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;However, if the service goes down after the socket connection is made, but before the data is read back from the service, this method call to URL.openStream will block indefinitely by default.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Eric Burke has written a post defining this problem and a simple solution, which can be found &lt;a href="http://stuffthathappens.com/blog/2007/09/10/urlopenstream-might-leave-you-hanging/"&gt;here&lt;/a&gt;.  The solution is to set the read timeout on the URLConnection so that you can break after so many milliseconds if you are't getting the data back.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For example:&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;br /&gt;private InputStream executeQuery(String query) {&lt;br /&gt;&lt;br /&gt;   InputStream rawResults = null;&lt;br /&gt;&lt;br /&gt;   try {&lt;br /&gt;      query = baseUrl + "?query=" + query;&lt;br /&gt;      if(LOG.isDebugEnabled()) {&lt;br /&gt;        LOG.debug("Full Query : " + query);&lt;br /&gt;      }&lt;br /&gt;       URL url = new URL(query);&lt;br /&gt;       URLConnection conn = url.openConnection();&lt;br /&gt;       &lt;br /&gt;       // Seems set to 4000ms by default already.&lt;br /&gt;       conn.setConnectTimeout( 4000 ); &lt;br /&gt;       &lt;br /&gt;       // Set to 0 by default, T/O never occurs!&lt;br /&gt;       conn.setReadTimeout( 10000 ); &lt;br /&gt;&lt;br /&gt;       rawResults = conn.getInputStream();&lt;br /&gt;     &lt;br /&gt;   } catch (java.net.UnknownHostException e) {&lt;br /&gt;      LOG.warn("Could not make connection to &lt;br /&gt;                host within the allotted connectTimeout", e);&lt;br /&gt;   } catch (java.net.SocketTimeoutException e) {&lt;br /&gt;      LOG.warn("Could finish reading data from the &lt;br /&gt;                socket within the allotted readTimeout", e);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   return rawResults;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span"   style="font-family:Georgia;font-size:130%;"&gt;&lt;span class="Apple-style-span"  style=" white-space: normal;font-size:16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"   style="font-family:Georgia;font-size:130%;"&gt;&lt;span class="Apple-style-span"  style=" white-space: normal;font-size:16px;"&gt;Now as the catch blocks indicate, the host can go down, or the service can be unresponsive before or during the read, and we'll cut out after our chosen timeout.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-7937891722918346884?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/7937891722918346884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=7937891722918346884' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/7937891722918346884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/7937891722918346884'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2009/09/youre-in-timeout.html' title='You&apos;re in Timeout'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-6307373127461178666</id><published>2009-08-28T10:28:00.008-04:00</published><updated>2009-09-01T08:54:36.046-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JAXB maven wsimport'/><title type='text'>JAX-WS / Maven / WSIMPORT</title><content type='html'>To use JAXB during your maven build use something similar to..&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&amp;gt;&lt;br /&gt;    &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;br /&gt;    &amp;lt;groupId&amp;gt;StaticDetailLogAccessServiceClient&amp;lt;/groupId&amp;gt;&lt;br /&gt;    &amp;lt;artifactId&amp;gt;StaticDetailLogAccessServiceClient&amp;lt;/artifactId&amp;gt;&lt;br /&gt;    &amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;&lt;br /&gt;    &amp;lt;dependencies&amp;gt;&lt;br /&gt;        &amp;lt;dependency&amp;gt;&lt;br /&gt;            &amp;lt;groupId&amp;gt;com.sun.xml.bind&amp;lt;/groupId&amp;gt;&lt;br /&gt;            &amp;lt;artifactId&amp;gt;jaxb-impl&amp;lt;/artifactId&amp;gt;&lt;br /&gt;            &amp;lt;version&amp;gt;2.1.6&amp;lt;/version&amp;gt;&lt;br /&gt;        &amp;lt;/dependency&amp;gt;&lt;br /&gt;        &amp;lt;dependency&amp;gt;&lt;br /&gt;          &amp;lt;groupId&amp;gt;junit&amp;lt;/groupId&amp;gt;&lt;br /&gt;          &amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;&lt;br /&gt;          &amp;lt;version&amp;gt;4.3.1&amp;lt;/version&amp;gt;&lt;br /&gt;          &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;&lt;br /&gt;        &amp;lt;/dependency&amp;gt;&lt;br /&gt;    &amp;lt;/dependencies&amp;gt;&lt;br /&gt;    &amp;lt;build&amp;gt;&lt;br /&gt;        &amp;lt;defaultGoal&amp;gt;install&amp;lt;/defaultGoal&amp;gt;&lt;br /&gt;        &amp;lt;plugins&amp;gt;&lt;br /&gt;            &amp;lt;plugin&amp;gt;&lt;br /&gt;                &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;&lt;br /&gt;                &amp;lt;artifactId&amp;gt;maven-dependency-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;                &amp;lt;version&amp;gt;2.1&amp;lt;/version&amp;gt;&lt;br /&gt;                &amp;lt;executions&amp;gt;&lt;br /&gt;                    &amp;lt;execution&amp;gt;&lt;br /&gt;                        &amp;lt;id&amp;gt;copy&amp;lt;/id&amp;gt;&lt;br /&gt;                        &amp;lt;phase&amp;gt;generate-sources&amp;lt;/phase&amp;gt;&lt;br /&gt;                        &amp;lt;goals&amp;gt;&lt;br /&gt;                            &amp;lt;goal&amp;gt;copy&amp;lt;/goal&amp;gt;&lt;br /&gt;                        &amp;lt;/goals&amp;gt;&lt;br /&gt;                        &amp;lt;configuration&amp;gt;&lt;br /&gt;                            &amp;lt;artifactItems&amp;gt;&lt;br /&gt;                                &amp;lt;artifactItem&amp;gt;&lt;br /&gt;                                    &amp;lt;groupId&amp;gt;com.yourco.schemas&amp;lt;/groupId&amp;gt;&lt;br /&gt;                                   &amp;lt;artifactId&amp;gt;DetailLogAccess&amp;lt;/artifactId&amp;gt;&lt;br /&gt;                                    &amp;lt;version&amp;gt;1.0.1&amp;lt;/version&amp;gt;&lt;br /&gt;                                    &amp;lt;type&amp;gt;xsd&amp;lt;/type&amp;gt;&lt;br /&gt;                                    &amp;lt;overWrite&amp;gt;true&amp;lt;/overWrite&amp;gt;&lt;br /&gt;                                    &amp;lt;outputDirectory&amp;gt;${project.build.directory}/classes&amp;lt;/outputDirectory&amp;gt;&lt;br /&gt;                                &amp;lt;/artifactItem&amp;gt;&lt;br /&gt;                            &amp;lt;/artifactItems&amp;gt;&lt;br /&gt;                            &amp;lt;!-- other configurations here --&amp;gt;&lt;br /&gt;                        &amp;lt;/configuration&amp;gt;&lt;br /&gt;                    &amp;lt;/execution&amp;gt;&lt;br /&gt;                &amp;lt;/executions&amp;gt;&lt;br /&gt;            &amp;lt;/plugin&amp;gt;&lt;br /&gt;            &amp;lt;plugin&amp;gt;&lt;br /&gt;                &amp;lt;groupId&amp;gt;org.jvnet.jaxb2.maven2&amp;lt;/groupId&amp;gt;&lt;br /&gt;                &amp;lt;artifactId&amp;gt;maven-jaxb2-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;                &amp;lt;version&amp;gt;0.6.1&amp;lt;/version&amp;gt;&lt;br /&gt;                &amp;lt;executions&amp;gt;&lt;br /&gt;                    &amp;lt;execution&amp;gt;&lt;br /&gt;                        &amp;lt;goals&amp;gt;&lt;br /&gt;                            &amp;lt;goal&amp;gt;generate&amp;lt;/goal&amp;gt;&lt;br /&gt;                        &amp;lt;/goals&amp;gt;&lt;br /&gt;                    &amp;lt;/execution&amp;gt;&lt;br /&gt;                &amp;lt;/executions&amp;gt;&lt;br /&gt;                &amp;lt;configuration&amp;gt;&lt;br /&gt;                    &amp;lt;schemaDirectory&amp;gt;${project.build.directory}/classes&amp;lt;/schemaDirectory&amp;gt;&lt;br /&gt;                    &amp;lt;includeSchemas&amp;gt;&lt;br /&gt;                        &amp;lt;includeSchema&amp;gt;**/*.xsd&amp;lt;/includeSchema&amp;gt;&lt;br /&gt;                        &amp;lt;includeSchema&amp;gt;**/*.dtd&amp;lt;/includeSchema&amp;gt;&lt;br /&gt;                    &amp;lt;/includeSchemas&amp;gt;&lt;br /&gt;                    &amp;lt;excludeSchemas&amp;gt;&lt;br /&gt;                        &amp;lt;excludeSchema&amp;gt;test*.xsd&amp;lt;/excludeSchema&amp;gt;&lt;br /&gt;                    &amp;lt;/excludeSchemas&amp;gt;&lt;br /&gt;                    &amp;lt;includeBindings&amp;gt;&lt;br /&gt;                        &amp;lt;includeBinding&amp;gt;*.xjb&amp;lt;/includeBinding&amp;gt;&lt;br /&gt;                    &amp;lt;/includeBindings&amp;gt;&lt;br /&gt;                    &amp;lt;strict&amp;gt;false&amp;lt;/strict&amp;gt;&lt;br /&gt;                    &amp;lt;verbose&amp;gt;true&amp;lt;/verbose&amp;gt;&lt;br /&gt;                    &amp;lt;extension&amp;gt;true&amp;lt;/extension&amp;gt;&lt;br /&gt;                &amp;lt;/configuration&amp;gt;&lt;br /&gt;            &amp;lt;/plugin&amp;gt;&lt;br /&gt;            &amp;lt;plugin&amp;gt;&lt;br /&gt;                &amp;lt;inherited&amp;gt;true&amp;lt;/inherited&amp;gt;&lt;br /&gt;                &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;&lt;br /&gt;                &amp;lt;artifactId&amp;gt;maven-compiler-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;                &amp;lt;configuration&amp;gt;&lt;br /&gt;                    &amp;lt;source&amp;gt;1.5&amp;lt;/source&amp;gt;&lt;br /&gt;                    &amp;lt;target&amp;gt;1.5&amp;lt;/target&amp;gt;&lt;br /&gt;                &amp;lt;/configuration&amp;gt;&lt;br /&gt;            &amp;lt;/plugin&amp;gt;&lt;br /&gt;        &amp;lt;/plugins&amp;gt;&lt;br /&gt;    &amp;lt;/build&amp;gt;&lt;br /&gt;&amp;lt;/project&amp;gt;&lt;br /&gt;&lt;/pre&gt;Found at &lt;a href="https://jax-ws-commons.dev.java.net/jaxws-maven-plugin/usage.html"&gt;https://jax-ws-commons.dev.java.net/jaxws-maven-plugin/usage.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-6307373127461178666?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/6307373127461178666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=6307373127461178666' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/6307373127461178666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/6307373127461178666'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2009/08/jaxb-maven-wsimport.html' title='JAX-WS / Maven / WSIMPORT'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-3712058494310611116</id><published>2009-08-27T13:03:00.003-04:00</published><updated>2009-08-27T13:21:14.754-04:00</updated><title type='text'>When downloading torrents...</title><content type='html'>&lt;div&gt;Block any uploads/downloads from the URLs found here..&lt;/div&gt;&lt;a href="http://www.bluetack.co.uk/config/level1.gz"&gt;http://www.bluetack.co.uk/config/level1.gz&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Good Torrent Sites :&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;isohunt&lt;/li&gt;&lt;li&gt;demonoid (requires you to sign up)&lt;/li&gt;&lt;li&gt;pirate bay&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;Good Torrent Clients :&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Vuze (not sure if it works on Mac, saw it on linux)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Some Commonly Used Hacked Mac OSX Systems:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Kalyway&lt;/li&gt;&lt;li&gt;iAtkos&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-3712058494310611116?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/3712058494310611116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=3712058494310611116' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/3712058494310611116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/3712058494310611116'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2009/08/when-downloading-torrents.html' title='When downloading torrents...'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-1828561839578875259</id><published>2009-08-25T09:37:00.002-04:00</published><updated>2009-09-01T08:56:25.939-04:00</updated><title type='text'>WGET Flags for Entire Website</title><content type='html'>&lt;span class="Apple-style-span"  style="color: rgb(51, 51, 51);  line-height: 20px; font-size:13px;"&gt;&lt;pre&gt;From &lt;a href="http://prystash.blogspot.com/2009/08/downloading-entire-site-using-wget.html"&gt;Prystash's&lt;/a&gt; blog, args to wget to grab an entire site cleanly.&lt;/pre&gt;&lt;pre&gt;$ wget --recursive \&lt;br /&gt;     --no-clobber \&lt;br /&gt;     --page-requisites \&lt;br /&gt;     --html-extension \&lt;br /&gt;     --convert-links \&lt;br /&gt;     --restrict-file-names=windows \&lt;br /&gt;     --domains somesite.org \&lt;br /&gt;     --no-parent \&lt;br /&gt;         www.somesite.org&lt;/pre&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-1828561839578875259?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/1828561839578875259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=1828561839578875259' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/1828561839578875259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/1828561839578875259'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2009/08/wget-flags-for-entire-website.html' title='WGET Flags for Entire Website'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-8394343946717721785</id><published>2008-05-02T10:25:00.003-04:00</published><updated>2008-05-02T10:30:38.750-04:00</updated><title type='text'>Switching Bloggers</title><content type='html'>I've decided to switch to Wordpress.com.  I hated to do so after just starting to get the ball rolling on my posts here, but Wordpress has some really nice features and I thought it was better to do it now than wait until later.&lt;br /&gt;&lt;br /&gt;Most notably for me I like the tagging and the feedback you get, when someone comes to your site from the result of a search, you can see what they were searching on, when they came to your blog.  Also, they seems to have a wider variety of layouts, and they're editor is a little nicer.&lt;br /&gt;&lt;br /&gt;Sorry Blogspot :(  .. and finally, when I put :( on my Wordpress entry, it automatically changed it to an emoticon.  How cool is that!..  How nerdy am I :)&lt;br /&gt;&lt;br /&gt;My new blog is at &lt;a href="http://ericmaxwell.wordpress.com/"&gt;ericmaxwell.wordpress.com&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-8394343946717721785?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/8394343946717721785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=8394343946717721785' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/8394343946717721785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/8394343946717721785'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2008/05/switching-bloggers.html' title='Switching Bloggers'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-256601937877846806</id><published>2008-04-28T10:51:00.007-04:00</published><updated>2008-04-28T11:38:31.097-04:00</updated><title type='text'>Groovy Ignores Scope</title><content type='html'>Let me start out with..  I like Groovy.  I haven't used it extensively yet on any of my projects, but I have done odd jobs with it.&lt;br /&gt;&lt;br /&gt;With that said, there seems to be an important issue with Groovy in my opinion and I don't understand why there aren't many posts about it, or why it's not mentioned in the documentation, or why it still exists...  Groovy does not currently enforce scoping constraints.&lt;br /&gt;&lt;br /&gt;Take the following for example:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;class PrivateMethodClass {&lt;br /&gt;&lt;br /&gt;  private static String privateMessage = 'foo'&lt;br /&gt;  private static String getPrivateMessage() { 'boo' }&lt;br /&gt;&lt;br /&gt;  private String privateInstanceMessage = 'instanceFoo'&lt;br /&gt;  private String getPrivateInstanceMessage() { 'instanceBoo' }&lt;br /&gt;&lt;br /&gt;  private static void sayHelloStatic() { println('hello static') }&lt;br /&gt;  private void sayHelloInstance() { println('hello instance') }&lt;br /&gt;}&lt;span style="color: rgb(102, 102, 102); font-family: courier new;font-family:courier new;" &gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;If you were to attempt to call any of these private variables/methods in Java, outside of the PrivateMethodClass, you would get an error when attempting to compile.  In groovy on the other hand, this is totally acceptable to do.&lt;br /&gt;&lt;br /&gt;So in Groovy this:&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;  class PrivateMethodClassTest {&lt;br /&gt;&lt;br /&gt;    public static void main(String[] args) {&lt;br /&gt;   &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;    &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt; println 'attempt to call static.'&lt;br /&gt; &lt;br /&gt;  &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;    &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;  PrivateMethodClass.sayHelloStatic()&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;    &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;   &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;    &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;new PrivateMethodClass().sayHelloInstance()&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;  &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;    &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;  &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;println PrivateMethodClass.privateMessage&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;    &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;   &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;    &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;println PrivateMethodClass.getPrivateMessage()&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;    &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;    &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;println new PrivateMethodClass().privateInstanceMessage&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;   &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;    &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt; &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;println new PrivateMethodClass().getPrivateInstanceMessage()&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;    &lt;/span&gt;&lt;span style="color: rgb(102, 102, 102);font-size:85%;" &gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Yields:&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&lt;span style="color: rgb(102, 102, 102);"&gt;C:\projects\grovvyScopingFlaw&gt;groovy PrivateMethodClassTest.groovy&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;attempt to call static.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;hello static&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;hello instance&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;foo&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;boo&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;instanceBoo&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;instanceBoo&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There is a Jira issue for this at &lt;a href="http://jira.codehaus.org/browse/GROOVY-1875"&gt;http://jira.codehaus.org/browse/GROOVY-1875&lt;/a&gt; and it is supposed to be fixed in 2.0 if I'm reading the issue ticket correctly.&lt;br /&gt;&lt;br /&gt;I debated about whether I should post about this or not as I thought this might be old news, but as I mentioned this to people around me who are very interested in Groovy, I got a lot of surprised responses.  So there it is.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-256601937877846806?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/256601937877846806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=256601937877846806' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/256601937877846806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/256601937877846806'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2008/04/groovy-ignores-scope.html' title='Groovy Ignores Scope'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-1395216578677220173</id><published>2008-02-01T12:39:00.001-05:00</published><updated>2008-02-03T21:13:53.024-05:00</updated><title type='text'>Annotation @Override: Making the compiler work for you</title><content type='html'>&lt;p align="left"&gt;I was writing/running JUnit tests for a project at work today when I came accross some odd behavior with the assertEquals method. Before I go into the problem, let me over simplify the model I was working with.&lt;/p&gt;&lt;p align="left"&gt;I created a class Foo that extended a class Boo, written by another project team. Boo overrode the Object.equals method (or so I thought), as shown in the diagram below.&lt;/p&gt;&lt;p align="left"&gt;&lt;a href="http://bp1.blogger.com/_5Eg-lCZqWmI/R6NmiRpL0MI/AAAAAAAAAAM/rY3QkGYqPTo/s1600-h/fooObjectGraph.PNG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5162082336934449346" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://bp1.blogger.com/_5Eg-lCZqWmI/R6NmiRpL0MI/AAAAAAAAAAM/rY3QkGYqPTo/s320/fooObjectGraph.PNG" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p align="left"&gt;Now from the simple diagram, coupled with the fact that you know somethings up, you may have guessed that they didn't really override the equals method in Boo. They overloaded it by changing the signature from &lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:courier new;"&gt;boolean equals(Object boo)&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;to&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:courier new;"&gt;boolean equals(Boo boo)&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;This was a mistake on their part, an oversight on mine, and the result was the following statement in my JUnit test failed&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:courier new;"&gt;assertEquals( fooA, fooB ); &lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;Whereas the following statements passed without a problem.&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:courier new;"&gt;assertTrue( fooA.equals( fooB ) );&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-family:courier new;"&gt;assertTrue( fooB.equals( fooA ) );&lt;/span&gt;&lt;/p&gt;&lt;p align="left"&gt;It took me a while to take notice of the signature mismatch on Boo.equals. (no jokes or insults please :) ).&lt;/p&gt;&lt;p align="left"&gt;It passed on assertTrue because assertTrue invoked fooA.equals( fooB ), and when the JVM didn't find an exact signature match on the method in Foo, or a method of equal name but more general types, it went to the next closest match, which was the equals method of Boo taking a Boo for comparison.&lt;/p&gt;&lt;p align="left"&gt;It failed on assertEquals because assertEquals treated both objects passed in as java.lang.Objects. This meant that the equals method of Object, unless overridden, was going to be called. Since it wasn't overridden, the result was the equivelant of fooA == fooB.&lt;/p&gt;&lt;p align="left"&gt;&lt;span style="font-size:130%;"&gt;My Point&lt;/span&gt; &lt;/p&gt;&lt;p align="left"&gt;My point is that, if they had put an annotation tag @Override on their equals method, Boo wouldn't have compiled in the first place and I wouldn't have gone through this. And I thought it was worth brining attention to on my blog as I haven't seen many people use it yet since made available in Java 1.5.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-1395216578677220173?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericmaxwell.blogspot.com/feeds/1395216578677220173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5862178524406640164&amp;postID=1395216578677220173' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/1395216578677220173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/1395216578677220173'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2008/02/annotation-override-making-compiler.html' title='Annotation @Override: Making the compiler work for you'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_5Eg-lCZqWmI/R6NmiRpL0MI/AAAAAAAAAAM/rY3QkGYqPTo/s72-c/fooObjectGraph.PNG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5862178524406640164.post-2861520853032665891</id><published>2008-01-30T22:00:00.000-05:00</published><updated>2008-01-31T08:09:03.512-05:00</updated><title type='text'>My First Post</title><content type='html'>So I have a blog. What does one say on their first post?  I do not know.&lt;br /&gt;&lt;br /&gt;Weebles wobble, but they don't fall down!&lt;br /&gt;&lt;br /&gt;How's that. Future entries will hopefully be more technical in nature than this.&lt;br /&gt;&lt;br /&gt;That's all for now. Thanks for reading.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5862178524406640164-2861520853032665891?l=ericmaxwell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/2861520853032665891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5862178524406640164/posts/default/2861520853032665891'/><link rel='alternate' type='text/html' href='http://ericmaxwell.blogspot.com/2008/01/my-first-post.html' title='My First Post'/><author><name>Eric</name><uri>http://www.blogger.com/profile/10936088059656019577</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>
