commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r915608 [21/34] - in /websites/production/commons/content/proper/commons-email: ./ apidocs/ apidocs/org/apache/commons/mail/ apidocs/org/apache/commons/mail/class-use/ apidocs/org/apache/commons/mail/resolver/ apidocs/org/apache/commons/mai...
Date Wed, 09 Jul 2014 20:46:28 GMT
Modified: websites/production/commons/content/proper/commons-email/xref-test/org/apache/commons/mail/EmailTest.html
==============================================================================
--- websites/production/commons/content/proper/commons-email/xref-test/org/apache/commons/mail/EmailTest.html (original)
+++ websites/production/commons/content/proper/commons-email/xref-test/org/apache/commons/mail/EmailTest.html Wed Jul  9 20:46:21 2014
@@ -56,7 +56,7 @@
 <a class="jxr_linenumber" name="L48" href="#L48">48</a>  <em class="jxr_javadoccomment"> * JUnit test case for Email Class</em>
 <a class="jxr_linenumber" name="L49" href="#L49">49</a>  <em class="jxr_javadoccomment"> *</em>
 <a class="jxr_linenumber" name="L50" href="#L50">50</a>  <em class="jxr_javadoccomment"> * @since 1.0</em>
-<a class="jxr_linenumber" name="L51" href="#L51">51</a>  <em class="jxr_javadoccomment"> * @version $Id: EmailTest.java 1507613 2013-07-27 09:26:41Z britter $</em>
+<a class="jxr_linenumber" name="L51" href="#L51">51</a>  <em class="jxr_javadoccomment"> * @version $Id: EmailTest.java 1606709 2014-06-30 12:26:06Z ggregory $</em>
 <a class="jxr_linenumber" name="L52" href="#L52">52</a>  <em class="jxr_javadoccomment"> */</em>
 <a class="jxr_linenumber" name="L53" href="#L53">53</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../org/apache/commons/mail/EmailTest.html">EmailTest</a> <strong class="jxr_keyword">extends</strong> <a href="../../../../org/apache/commons/mail/AbstractEmailTest.html">AbstractEmailTest</a>
 <a class="jxr_linenumber" name="L54" href="#L54">54</a>  {
@@ -90,7 +90,7 @@
 <a class="jxr_linenumber" name="L82" href="#L82">82</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testGetSetSession() <strong class="jxr_keyword">throws</strong> Exception
 <a class="jxr_linenumber" name="L83" href="#L83">83</a>      {
 <a class="jxr_linenumber" name="L84" href="#L84">84</a>  
-<a class="jxr_linenumber" name="L85" href="#L85">85</a>          Properties properties = <strong class="jxr_keyword">new</strong> Properties(System.getProperties());
+<a class="jxr_linenumber" name="L85" href="#L85">85</a>          <strong class="jxr_keyword">final</strong> Properties properties = <strong class="jxr_keyword">new</strong> Properties(System.getProperties());
 <a class="jxr_linenumber" name="L86" href="#L86">86</a>          properties.setProperty(EmailConstants.MAIL_TRANSPORT_PROTOCOL, EmailConstants.SMTP);
 <a class="jxr_linenumber" name="L87" href="#L87">87</a>  
 <a class="jxr_linenumber" name="L88" href="#L88">88</a>          properties.setProperty(
@@ -99,7 +99,7 @@
 <a class="jxr_linenumber" name="L91" href="#L91">91</a>          properties.setProperty(EmailConstants.MAIL_HOST, strTestMailServer);
 <a class="jxr_linenumber" name="L92" href="#L92">92</a>          properties.setProperty(EmailConstants.MAIL_DEBUG, String.valueOf(false));
 <a class="jxr_linenumber" name="L93" href="#L93">93</a>  
-<a class="jxr_linenumber" name="L94" href="#L94">94</a>          Session mySession = Session.getInstance(properties, <strong class="jxr_keyword">null</strong>);
+<a class="jxr_linenumber" name="L94" href="#L94">94</a>          <strong class="jxr_keyword">final</strong> Session mySession = Session.getInstance(properties, <strong class="jxr_keyword">null</strong>);
 <a class="jxr_linenumber" name="L95" href="#L95">95</a>  
 <a class="jxr_linenumber" name="L96" href="#L96">96</a>          email.setMailSession(mySession);
 <a class="jxr_linenumber" name="L97" href="#L97">97</a>          assertEquals(mySession, email.getMailSession());
@@ -110,13 +110,13 @@
 <a class="jxr_linenumber" name="L102" href="#L102">102</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testGetSetAuthentication()
 <a class="jxr_linenumber" name="L103" href="#L103">103</a>     {
 <a class="jxr_linenumber" name="L104" href="#L104">104</a>         <em class="jxr_comment">// setup</em>
-<a class="jxr_linenumber" name="L105" href="#L105">105</a>         String strUsername = <span class="jxr_string">"user.name"</span>;
-<a class="jxr_linenumber" name="L106" href="#L106">106</a>         String strPassword = <span class="jxr_string">"user.pwd"</span>;
+<a class="jxr_linenumber" name="L105" href="#L105">105</a>         <strong class="jxr_keyword">final</strong> String strUsername = <span class="jxr_string">"user.name"</span>;
+<a class="jxr_linenumber" name="L106" href="#L106">106</a>         <strong class="jxr_keyword">final</strong> String strPassword = <span class="jxr_string">"user.pwd"</span>;
 <a class="jxr_linenumber" name="L107" href="#L107">107</a>         email.setAuthentication(strUsername, strPassword);
 <a class="jxr_linenumber" name="L108" href="#L108">108</a> 
 <a class="jxr_linenumber" name="L109" href="#L109">109</a>         <em class="jxr_comment">// this is cast into DefaultAuthenticator for convenience</em>
 <a class="jxr_linenumber" name="L110" href="#L110">110</a>         <em class="jxr_comment">// and give us access to the getPasswordAuthentication fn</em>
-<a class="jxr_linenumber" name="L111" href="#L111">111</a>         DefaultAuthenticator retrievedAuth =
+<a class="jxr_linenumber" name="L111" href="#L111">111</a>         <strong class="jxr_keyword">final</strong> DefaultAuthenticator retrievedAuth =
 <a class="jxr_linenumber" name="L112" href="#L112">112</a>             (DefaultAuthenticator) email.getAuthenticator();
 <a class="jxr_linenumber" name="L113" href="#L113">113</a> 
 <a class="jxr_linenumber" name="L114" href="#L114">114</a>         <em class="jxr_comment">// tests</em>
@@ -132,15 +132,15 @@
 <a class="jxr_linenumber" name="L124" href="#L124">124</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testGetSetAuthenticator()
 <a class="jxr_linenumber" name="L125" href="#L125">125</a>     {
 <a class="jxr_linenumber" name="L126" href="#L126">126</a>         <em class="jxr_comment">// setup</em>
-<a class="jxr_linenumber" name="L127" href="#L127">127</a>         String strUsername = <span class="jxr_string">"user.name"</span>;
-<a class="jxr_linenumber" name="L128" href="#L128">128</a>         String strPassword = <span class="jxr_string">"user.pwd"</span>;
-<a class="jxr_linenumber" name="L129" href="#L129">129</a>         DefaultAuthenticator authenticator =
+<a class="jxr_linenumber" name="L127" href="#L127">127</a>         <strong class="jxr_keyword">final</strong> String strUsername = <span class="jxr_string">"user.name"</span>;
+<a class="jxr_linenumber" name="L128" href="#L128">128</a>         <strong class="jxr_keyword">final</strong> String strPassword = <span class="jxr_string">"user.pwd"</span>;
+<a class="jxr_linenumber" name="L129" href="#L129">129</a>         <strong class="jxr_keyword">final</strong> DefaultAuthenticator authenticator =
 <a class="jxr_linenumber" name="L130" href="#L130">130</a>             <strong class="jxr_keyword">new</strong> DefaultAuthenticator(strUsername, strPassword);
 <a class="jxr_linenumber" name="L131" href="#L131">131</a>         email.setAuthenticator(authenticator);
 <a class="jxr_linenumber" name="L132" href="#L132">132</a> 
 <a class="jxr_linenumber" name="L133" href="#L133">133</a>         <em class="jxr_comment">// this is cast into DefaultAuthenticator for convenience</em>
 <a class="jxr_linenumber" name="L134" href="#L134">134</a>         <em class="jxr_comment">// and give us access to the getPasswordAuthentication fn</em>
-<a class="jxr_linenumber" name="L135" href="#L135">135</a>         DefaultAuthenticator retrievedAuth =
+<a class="jxr_linenumber" name="L135" href="#L135">135</a>         <strong class="jxr_keyword">final</strong> DefaultAuthenticator retrievedAuth =
 <a class="jxr_linenumber" name="L136" href="#L136">136</a>             (DefaultAuthenticator) email.getAuthenticator();
 <a class="jxr_linenumber" name="L137" href="#L137">137</a> 
 <a class="jxr_linenumber" name="L138" href="#L138">138</a>         <em class="jxr_comment">// tests</em>
@@ -169,7 +169,7 @@
 <a class="jxr_linenumber" name="L161" href="#L161">161</a>     @Test
 <a class="jxr_linenumber" name="L162" href="#L162">162</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSetContentEmptyMimeMultipart()
 <a class="jxr_linenumber" name="L163" href="#L163">163</a>     {
-<a class="jxr_linenumber" name="L164" href="#L164">164</a>         MimeMultipart part = <strong class="jxr_keyword">new</strong> MimeMultipart();
+<a class="jxr_linenumber" name="L164" href="#L164">164</a>         <strong class="jxr_keyword">final</strong> MimeMultipart part = <strong class="jxr_keyword">new</strong> MimeMultipart();
 <a class="jxr_linenumber" name="L165" href="#L165">165</a>         email.setContent(part);
 <a class="jxr_linenumber" name="L166" href="#L166">166</a> 
 <a class="jxr_linenumber" name="L167" href="#L167">167</a>         assertEquals(part, email.getContentMimeMultipart());
@@ -178,7 +178,7 @@
 <a class="jxr_linenumber" name="L170" href="#L170">170</a>     @Test
 <a class="jxr_linenumber" name="L171" href="#L171">171</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSetContentMimeMultipart()
 <a class="jxr_linenumber" name="L172" href="#L172">172</a>     {
-<a class="jxr_linenumber" name="L173" href="#L173">173</a>         MimeMultipart part = <strong class="jxr_keyword">new</strong> MimeMultipart(<span class="jxr_string">"abc123"</span>);
+<a class="jxr_linenumber" name="L173" href="#L173">173</a>         <strong class="jxr_keyword">final</strong> MimeMultipart part = <strong class="jxr_keyword">new</strong> MimeMultipart(<span class="jxr_string">"abc123"</span>);
 <a class="jxr_linenumber" name="L174" href="#L174">174</a>         email.setContent(part);
 <a class="jxr_linenumber" name="L175" href="#L175">175</a> 
 <a class="jxr_linenumber" name="L176" href="#L176">176</a>         assertEquals(part, email.getContentMimeMultipart());
@@ -234,7 +234,7 @@
 <a class="jxr_linenumber" name="L226" href="#L226">226</a>     @Test
 <a class="jxr_linenumber" name="L227" href="#L227">227</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testGetSetHostName()
 <a class="jxr_linenumber" name="L228" href="#L228">228</a>     {
-<a class="jxr_linenumber" name="L229" href="#L229">229</a>         <strong class="jxr_keyword">for</strong> (String validChar : testCharsValid) {
+<a class="jxr_linenumber" name="L229" href="#L229">229</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> String validChar : testCharsValid) {
 <a class="jxr_linenumber" name="L230" href="#L230">230</a>             email.setHostName(validChar);
 <a class="jxr_linenumber" name="L231" href="#L231">231</a>             assertEquals(validChar, email.getHostName());
 <a class="jxr_linenumber" name="L232" href="#L232">232</a>         }
@@ -279,7 +279,7 @@
 <a class="jxr_linenumber" name="L271" href="#L271">271</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L272" href="#L272">272</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L273" href="#L273">273</a> 
-<a class="jxr_linenumber" name="L274" href="#L274">274</a>         List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L274" href="#L274">274</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L275" href="#L275">275</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>, <span class="jxr_string">"me@home.com"</span>));
 <a class="jxr_linenumber" name="L276" href="#L276">276</a>         arrExpected.add(
 <a class="jxr_linenumber" name="L277" href="#L277">277</a>             <strong class="jxr_keyword">new</strong> InternetAddress(
@@ -307,9 +307,9 @@
 <a class="jxr_linenumber" name="L299" href="#L299">299</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L300" href="#L300">300</a>         <em class="jxr_comment">// Test Success (with charset set)</em>
 <a class="jxr_linenumber" name="L301" href="#L301">301</a>         <em class="jxr_comment">// ====================================================================</em>
-<a class="jxr_linenumber" name="L302" href="#L302">302</a>         String testValidEmail = <span class="jxr_string">"me@home.com"</span>;
+<a class="jxr_linenumber" name="L302" href="#L302">302</a>         <strong class="jxr_keyword">final</strong> String testValidEmail = <span class="jxr_string">"me@home.com"</span>;
 <a class="jxr_linenumber" name="L303" href="#L303">303</a> 
-<a class="jxr_linenumber" name="L304" href="#L304">304</a>         InternetAddress inetExpected =
+<a class="jxr_linenumber" name="L304" href="#L304">304</a>         <strong class="jxr_keyword">final</strong> InternetAddress inetExpected =
 <a class="jxr_linenumber" name="L305" href="#L305">305</a>             <strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>, <span class="jxr_string">"me@home.com"</span>, EmailConstants.ISO_8859_1);
 <a class="jxr_linenumber" name="L306" href="#L306">306</a> 
 <a class="jxr_linenumber" name="L307" href="#L307">307</a>         <em class="jxr_comment">// set from</em>
@@ -326,8 +326,8 @@
 <a class="jxr_linenumber" name="L318" href="#L318">318</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L319" href="#L319">319</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L320" href="#L320">320</a>         <em class="jxr_comment">// ====================================================================</em>
-<a class="jxr_linenumber" name="L321" href="#L321">321</a>         String[] testEmailNames = {<span class="jxr_string">"Name1"</span>, <span class="jxr_string">""</span>, <strong class="jxr_keyword">null</strong>};
-<a class="jxr_linenumber" name="L322" href="#L322">322</a>         List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L321" href="#L321">321</a>         <strong class="jxr_keyword">final</strong> String[] testEmailNames = {<span class="jxr_string">"Name1"</span>, <span class="jxr_string">""</span>, <strong class="jxr_keyword">null</strong>};
+<a class="jxr_linenumber" name="L322" href="#L322">322</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L323" href="#L323">323</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>, <span class="jxr_string">"Name1"</span>));
 <a class="jxr_linenumber" name="L324" href="#L324">324</a>         arrExpected.add(
 <a class="jxr_linenumber" name="L325" href="#L325">325</a>             <strong class="jxr_keyword">new</strong> InternetAddress(
@@ -361,12 +361,12 @@
 <a class="jxr_linenumber" name="L353" href="#L353">353</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L354" href="#L354">354</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L355" href="#L355">355</a> 
-<a class="jxr_linenumber" name="L356" href="#L356">356</a>         List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L356" href="#L356">356</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L357" href="#L357">357</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>));
 <a class="jxr_linenumber" name="L358" href="#L358">358</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"joe.doe@apache.org"</span>));
 <a class="jxr_linenumber" name="L359" href="#L359">359</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"someone_here@work-address.com.au"</span>));
 <a class="jxr_linenumber" name="L360" href="#L360">360</a> 
-<a class="jxr_linenumber" name="L361" href="#L361">361</a>         <strong class="jxr_keyword">for</strong> (String address : VALID_EMAILS) {
+<a class="jxr_linenumber" name="L361" href="#L361">361</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> String address : VALID_EMAILS) {
 <a class="jxr_linenumber" name="L362" href="#L362">362</a>             email.addTo(address);
 <a class="jxr_linenumber" name="L363" href="#L363">363</a>         }
 <a class="jxr_linenumber" name="L364" href="#L364">364</a> 
@@ -382,7 +382,7 @@
 <a class="jxr_linenumber" name="L374" href="#L374">374</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L375" href="#L375">375</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L376" href="#L376">376</a> 
-<a class="jxr_linenumber" name="L377" href="#L377">377</a>         List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L377" href="#L377">377</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L378" href="#L378">378</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>));
 <a class="jxr_linenumber" name="L379" href="#L379">379</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"joe.doe@apache.org"</span>));
 <a class="jxr_linenumber" name="L380" href="#L380">380</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"someone_here@work-address.com.au"</span>));
@@ -401,10 +401,10 @@
 <a class="jxr_linenumber" name="L393" href="#L393">393</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L394" href="#L394">394</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L395" href="#L395">395</a>         <em class="jxr_comment">// ====================================================================</em>
-<a class="jxr_linenumber" name="L396" href="#L396">396</a>         String testCharset = EmailConstants.ISO_8859_1;
-<a class="jxr_linenumber" name="L397" href="#L397">397</a>         String[] testEmailNames = {<span class="jxr_string">"Name1"</span>, <span class="jxr_string">""</span>, <strong class="jxr_keyword">null</strong>};
+<a class="jxr_linenumber" name="L396" href="#L396">396</a>         <strong class="jxr_keyword">final</strong> String testCharset = EmailConstants.ISO_8859_1;
+<a class="jxr_linenumber" name="L397" href="#L397">397</a>         <strong class="jxr_keyword">final</strong> String[] testEmailNames = {<span class="jxr_string">"Name1"</span>, <span class="jxr_string">""</span>, <strong class="jxr_keyword">null</strong>};
 <a class="jxr_linenumber" name="L398" href="#L398">398</a> 
-<a class="jxr_linenumber" name="L399" href="#L399">399</a>         List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L399" href="#L399">399</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L400" href="#L400">400</a>         arrExpected.add(
 <a class="jxr_linenumber" name="L401" href="#L401">401</a>             <strong class="jxr_keyword">new</strong> InternetAddress(
 <a class="jxr_linenumber" name="L402" href="#L402">402</a>                 <span class="jxr_string">"me@home.com"</span>,
@@ -431,9 +431,9 @@
 <a class="jxr_linenumber" name="L423" href="#L423">423</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L424" href="#L424">424</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L425" href="#L425">425</a> 
-<a class="jxr_linenumber" name="L426" href="#L426">426</a>         String[] testEmailNames = {<span class="jxr_string">"Name1"</span>, <span class="jxr_string">""</span>, <strong class="jxr_keyword">null</strong>};
+<a class="jxr_linenumber" name="L426" href="#L426">426</a>         <strong class="jxr_keyword">final</strong> String[] testEmailNames = {<span class="jxr_string">"Name1"</span>, <span class="jxr_string">""</span>, <strong class="jxr_keyword">null</strong>};
 <a class="jxr_linenumber" name="L427" href="#L427">427</a> 
-<a class="jxr_linenumber" name="L428" href="#L428">428</a>         List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L428" href="#L428">428</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L429" href="#L429">429</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>, <span class="jxr_string">"Name1"</span>));
 <a class="jxr_linenumber" name="L430" href="#L430">430</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"joe.doe@apache.org"</span>));
 <a class="jxr_linenumber" name="L431" href="#L431">431</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"someone_here@work-address.com.au"</span>));
@@ -461,7 +461,7 @@
 <a class="jxr_linenumber" name="L453" href="#L453">453</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L454" href="#L454">454</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L455" href="#L455">455</a>         <em class="jxr_comment">// ====================================================================</em>
-<a class="jxr_linenumber" name="L456" href="#L456">456</a>         List&lt;InternetAddress&gt; testEmailValid2 = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L456" href="#L456">456</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; testEmailValid2 = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L457" href="#L457">457</a>         testEmailValid2.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>, <span class="jxr_string">"Name1"</span>));
 <a class="jxr_linenumber" name="L458" href="#L458">458</a>         testEmailValid2.add(
 <a class="jxr_linenumber" name="L459" href="#L459">459</a>             <strong class="jxr_keyword">new</strong> InternetAddress(
@@ -500,12 +500,12 @@
 <a class="jxr_linenumber" name="L492" href="#L492">492</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L493" href="#L493">493</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L494" href="#L494">494</a> 
-<a class="jxr_linenumber" name="L495" href="#L495">495</a>         List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L495" href="#L495">495</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L496" href="#L496">496</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>));
 <a class="jxr_linenumber" name="L497" href="#L497">497</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"joe.doe@apache.org"</span>));
 <a class="jxr_linenumber" name="L498" href="#L498">498</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"someone_here@work-address.com.au"</span>));
 <a class="jxr_linenumber" name="L499" href="#L499">499</a> 
-<a class="jxr_linenumber" name="L500" href="#L500">500</a>         <strong class="jxr_keyword">for</strong> (String address : VALID_EMAILS) {
+<a class="jxr_linenumber" name="L500" href="#L500">500</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> String address : VALID_EMAILS) {
 <a class="jxr_linenumber" name="L501" href="#L501">501</a>             email.addCc(address);
 <a class="jxr_linenumber" name="L502" href="#L502">502</a>         }
 <a class="jxr_linenumber" name="L503" href="#L503">503</a> 
@@ -521,7 +521,7 @@
 <a class="jxr_linenumber" name="L513" href="#L513">513</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L514" href="#L514">514</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L515" href="#L515">515</a> 
-<a class="jxr_linenumber" name="L516" href="#L516">516</a>         List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L516" href="#L516">516</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L517" href="#L517">517</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>));
 <a class="jxr_linenumber" name="L518" href="#L518">518</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"joe.doe@apache.org"</span>));
 <a class="jxr_linenumber" name="L519" href="#L519">519</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"someone_here@work-address.com.au"</span>));
@@ -540,10 +540,10 @@
 <a class="jxr_linenumber" name="L532" href="#L532">532</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L533" href="#L533">533</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L534" href="#L534">534</a>         <em class="jxr_comment">// ====================================================================</em>
-<a class="jxr_linenumber" name="L535" href="#L535">535</a>         String testCharset = EmailConstants.ISO_8859_1;
-<a class="jxr_linenumber" name="L536" href="#L536">536</a>         String[] testEmailNames = {<span class="jxr_string">"Name1"</span>, <span class="jxr_string">""</span>, <strong class="jxr_keyword">null</strong>};
+<a class="jxr_linenumber" name="L535" href="#L535">535</a>         <strong class="jxr_keyword">final</strong> String testCharset = EmailConstants.ISO_8859_1;
+<a class="jxr_linenumber" name="L536" href="#L536">536</a>         <strong class="jxr_keyword">final</strong> String[] testEmailNames = {<span class="jxr_string">"Name1"</span>, <span class="jxr_string">""</span>, <strong class="jxr_keyword">null</strong>};
 <a class="jxr_linenumber" name="L537" href="#L537">537</a> 
-<a class="jxr_linenumber" name="L538" href="#L538">538</a>         List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L538" href="#L538">538</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L539" href="#L539">539</a>         arrExpected.add(
 <a class="jxr_linenumber" name="L540" href="#L540">540</a>             <strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>, <span class="jxr_string">"Name1"</span>, testCharset));
 <a class="jxr_linenumber" name="L541" href="#L541">541</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"joe.doe@apache.org"</span>));
@@ -567,9 +567,9 @@
 <a class="jxr_linenumber" name="L559" href="#L559">559</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L560" href="#L560">560</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L561" href="#L561">561</a> 
-<a class="jxr_linenumber" name="L562" href="#L562">562</a>         String[] testEmailNames = {<span class="jxr_string">"Name1"</span>, <span class="jxr_string">""</span>, <strong class="jxr_keyword">null</strong>};
+<a class="jxr_linenumber" name="L562" href="#L562">562</a>         <strong class="jxr_keyword">final</strong> String[] testEmailNames = {<span class="jxr_string">"Name1"</span>, <span class="jxr_string">""</span>, <strong class="jxr_keyword">null</strong>};
 <a class="jxr_linenumber" name="L563" href="#L563">563</a> 
-<a class="jxr_linenumber" name="L564" href="#L564">564</a>         List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L564" href="#L564">564</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L565" href="#L565">565</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>, <span class="jxr_string">"Name1"</span>));
 <a class="jxr_linenumber" name="L566" href="#L566">566</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"joe.doe@apache.org"</span>));
 <a class="jxr_linenumber" name="L567" href="#L567">567</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"someone_here@work-address.com.au"</span>));
@@ -597,7 +597,7 @@
 <a class="jxr_linenumber" name="L589" href="#L589">589</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L590" href="#L590">590</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L591" href="#L591">591</a>         <em class="jxr_comment">// ====================================================================</em>
-<a class="jxr_linenumber" name="L592" href="#L592">592</a>         List&lt;InternetAddress&gt; testEmailValid2 = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L592" href="#L592">592</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; testEmailValid2 = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L593" href="#L593">593</a>         testEmailValid2.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"Name1 &lt;me@home.com&gt;"</span>));
 <a class="jxr_linenumber" name="L594" href="#L594">594</a>         testEmailValid2.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"\&quot;joe.doe@apache.org\&quot; &lt;joe.doe@apache.org&gt;"</span>));
 <a class="jxr_linenumber" name="L595" href="#L595">595</a>         testEmailValid2.add(
@@ -626,12 +626,12 @@
 <a class="jxr_linenumber" name="L618" href="#L618">618</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L619" href="#L619">619</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L620" href="#L620">620</a> 
-<a class="jxr_linenumber" name="L621" href="#L621">621</a>         List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L621" href="#L621">621</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L622" href="#L622">622</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>));
 <a class="jxr_linenumber" name="L623" href="#L623">623</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"joe.doe@apache.org"</span>));
 <a class="jxr_linenumber" name="L624" href="#L624">624</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"someone_here@work-address.com.au"</span>));
 <a class="jxr_linenumber" name="L625" href="#L625">625</a> 
-<a class="jxr_linenumber" name="L626" href="#L626">626</a>         <strong class="jxr_keyword">for</strong> (String address : VALID_EMAILS) {
+<a class="jxr_linenumber" name="L626" href="#L626">626</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> String address : VALID_EMAILS) {
 <a class="jxr_linenumber" name="L627" href="#L627">627</a>             email.addBcc(address);
 <a class="jxr_linenumber" name="L628" href="#L628">628</a>         }
 <a class="jxr_linenumber" name="L629" href="#L629">629</a> 
@@ -649,7 +649,7 @@
 <a class="jxr_linenumber" name="L641" href="#L641">641</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L642" href="#L642">642</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L643" href="#L643">643</a> 
-<a class="jxr_linenumber" name="L644" href="#L644">644</a>         List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L644" href="#L644">644</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L645" href="#L645">645</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>));
 <a class="jxr_linenumber" name="L646" href="#L646">646</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"joe.doe@apache.org"</span>));
 <a class="jxr_linenumber" name="L647" href="#L647">647</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"someone_here@work-address.com.au"</span>));
@@ -670,10 +670,10 @@
 <a class="jxr_linenumber" name="L662" href="#L662">662</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L663" href="#L663">663</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L664" href="#L664">664</a>         <em class="jxr_comment">// ====================================================================</em>
-<a class="jxr_linenumber" name="L665" href="#L665">665</a>         String testCharset = EmailConstants.ISO_8859_1;
-<a class="jxr_linenumber" name="L666" href="#L666">666</a>         String[] testEmailNames = {<span class="jxr_string">"Name1"</span>, <span class="jxr_string">""</span>, <strong class="jxr_keyword">null</strong>};
+<a class="jxr_linenumber" name="L665" href="#L665">665</a>         <strong class="jxr_keyword">final</strong> String testCharset = EmailConstants.ISO_8859_1;
+<a class="jxr_linenumber" name="L666" href="#L666">666</a>         <strong class="jxr_keyword">final</strong> String[] testEmailNames = {<span class="jxr_string">"Name1"</span>, <span class="jxr_string">""</span>, <strong class="jxr_keyword">null</strong>};
 <a class="jxr_linenumber" name="L667" href="#L667">667</a> 
-<a class="jxr_linenumber" name="L668" href="#L668">668</a>         List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L668" href="#L668">668</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L669" href="#L669">669</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>, <span class="jxr_string">"Name1"</span>, testCharset));
 <a class="jxr_linenumber" name="L670" href="#L670">670</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"joe.doe@apache.org"</span>));
 <a class="jxr_linenumber" name="L671" href="#L671">671</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"someone_here@work-address.com.au"</span>));
@@ -698,10 +698,10 @@
 <a class="jxr_linenumber" name="L690" href="#L690">690</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L691" href="#L691">691</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L692" href="#L692">692</a> 
-<a class="jxr_linenumber" name="L693" href="#L693">693</a>         String[] testEmailNames = {<span class="jxr_string">"Name1"</span>, <span class="jxr_string">""</span>, <strong class="jxr_keyword">null</strong>};
+<a class="jxr_linenumber" name="L693" href="#L693">693</a>         <strong class="jxr_keyword">final</strong> String[] testEmailNames = {<span class="jxr_string">"Name1"</span>, <span class="jxr_string">""</span>, <strong class="jxr_keyword">null</strong>};
 <a class="jxr_linenumber" name="L694" href="#L694">694</a> 
 <a class="jxr_linenumber" name="L695" href="#L695">695</a> 
-<a class="jxr_linenumber" name="L696" href="#L696">696</a>         List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L696" href="#L696">696</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L697" href="#L697">697</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>, <span class="jxr_string">"Name1"</span>));
 <a class="jxr_linenumber" name="L698" href="#L698">698</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"joe.doe@apache.org"</span>));
 <a class="jxr_linenumber" name="L699" href="#L699">699</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"someone_here@work-address.com.au"</span>));
@@ -731,7 +731,7 @@
 <a class="jxr_linenumber" name="L723" href="#L723">723</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L724" href="#L724">724</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L725" href="#L725">725</a>         <em class="jxr_comment">// ====================================================================</em>
-<a class="jxr_linenumber" name="L726" href="#L726">726</a>         List&lt;InternetAddress&gt; testInetEmailValid = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L726" href="#L726">726</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; testInetEmailValid = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L727" href="#L727">727</a>         testInetEmailValid.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>, <span class="jxr_string">"Name1"</span>));
 <a class="jxr_linenumber" name="L728" href="#L728">728</a>         testInetEmailValid.add(
 <a class="jxr_linenumber" name="L729" href="#L729">729</a>             <strong class="jxr_keyword">new</strong> InternetAddress(
@@ -765,12 +765,12 @@
 <a class="jxr_linenumber" name="L757" href="#L757">757</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L758" href="#L758">758</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L759" href="#L759">759</a> 
-<a class="jxr_linenumber" name="L760" href="#L760">760</a>         List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L760" href="#L760">760</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L761" href="#L761">761</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>));
 <a class="jxr_linenumber" name="L762" href="#L762">762</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"joe.doe@apache.org"</span>));
 <a class="jxr_linenumber" name="L763" href="#L763">763</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"someone_here@work-address.com.au"</span>));
 <a class="jxr_linenumber" name="L764" href="#L764">764</a> 
-<a class="jxr_linenumber" name="L765" href="#L765">765</a>         <strong class="jxr_keyword">for</strong> (String address : VALID_EMAILS) {
+<a class="jxr_linenumber" name="L765" href="#L765">765</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> String address : VALID_EMAILS) {
 <a class="jxr_linenumber" name="L766" href="#L766">766</a>             email.addReplyTo(address);
 <a class="jxr_linenumber" name="L767" href="#L767">767</a>         }
 <a class="jxr_linenumber" name="L768" href="#L768">768</a> 
@@ -787,10 +787,10 @@
 <a class="jxr_linenumber" name="L779" href="#L779">779</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L780" href="#L780">780</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L781" href="#L781">781</a>         <em class="jxr_comment">// ====================================================================</em>
-<a class="jxr_linenumber" name="L782" href="#L782">782</a>         String testCharset = EmailConstants.ISO_8859_1;
-<a class="jxr_linenumber" name="L783" href="#L783">783</a>         String[] testEmailNames = {<span class="jxr_string">"Name1"</span>, <span class="jxr_string">""</span>, <strong class="jxr_keyword">null</strong>};
+<a class="jxr_linenumber" name="L782" href="#L782">782</a>         <strong class="jxr_keyword">final</strong> String testCharset = EmailConstants.ISO_8859_1;
+<a class="jxr_linenumber" name="L783" href="#L783">783</a>         <strong class="jxr_keyword">final</strong> String[] testEmailNames = {<span class="jxr_string">"Name1"</span>, <span class="jxr_string">""</span>, <strong class="jxr_keyword">null</strong>};
 <a class="jxr_linenumber" name="L784" href="#L784">784</a> 
-<a class="jxr_linenumber" name="L785" href="#L785">785</a>         List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L785" href="#L785">785</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L786" href="#L786">786</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>, <span class="jxr_string">"Name1"</span>, testCharset));
 <a class="jxr_linenumber" name="L787" href="#L787">787</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"joe.doe@apache.org"</span>));
 <a class="jxr_linenumber" name="L788" href="#L788">788</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"someone_here@work-address.com.au"</span>));
@@ -815,9 +815,9 @@
 <a class="jxr_linenumber" name="L807" href="#L807">807</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L808" href="#L808">808</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L809" href="#L809">809</a> 
-<a class="jxr_linenumber" name="L810" href="#L810">810</a>         String[] testEmailNames = {<span class="jxr_string">"Name1"</span>, <span class="jxr_string">""</span>, <strong class="jxr_keyword">null</strong>};
+<a class="jxr_linenumber" name="L810" href="#L810">810</a>         <strong class="jxr_keyword">final</strong> String[] testEmailNames = {<span class="jxr_string">"Name1"</span>, <span class="jxr_string">""</span>, <strong class="jxr_keyword">null</strong>};
 <a class="jxr_linenumber" name="L811" href="#L811">811</a> 
-<a class="jxr_linenumber" name="L812" href="#L812">812</a>         List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L812" href="#L812">812</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; arrExpected = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L813" href="#L813">813</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>, <span class="jxr_string">"Name1"</span>));
 <a class="jxr_linenumber" name="L814" href="#L814">814</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"joe.doe@apache.org"</span>));
 <a class="jxr_linenumber" name="L815" href="#L815">815</a>         arrExpected.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"someone_here@work-address.com.au"</span>));
@@ -847,14 +847,14 @@
 <a class="jxr_linenumber" name="L839" href="#L839">839</a>         <em class="jxr_comment">// ====================================================================</em>
 <a class="jxr_linenumber" name="L840" href="#L840">840</a>         <em class="jxr_comment">// Test Success</em>
 <a class="jxr_linenumber" name="L841" href="#L841">841</a>         <em class="jxr_comment">// ====================================================================</em>
-<a class="jxr_linenumber" name="L842" href="#L842">842</a>         Map&lt;String, String&gt; headers = <strong class="jxr_keyword">new</strong> HashMap&lt;String, String&gt;();
+<a class="jxr_linenumber" name="L842" href="#L842">842</a>         <strong class="jxr_keyword">final</strong> Map&lt;String, String&gt; headers = <strong class="jxr_keyword">new</strong> HashMap&lt;String, String&gt;();
 <a class="jxr_linenumber" name="L843" href="#L843">843</a>         headers.put(<span class="jxr_string">"X-Priority"</span>, <span class="jxr_string">"1"</span>);
 <a class="jxr_linenumber" name="L844" href="#L844">844</a>         headers.put(<span class="jxr_string">"Disposition-Notification-To"</span>, <span class="jxr_string">"me@home.com"</span>);
 <a class="jxr_linenumber" name="L845" href="#L845">845</a>         headers.put(<span class="jxr_string">"X-Mailer"</span>, <span class="jxr_string">"Sendmail"</span>);
 <a class="jxr_linenumber" name="L846" href="#L846">846</a> 
-<a class="jxr_linenumber" name="L847" href="#L847">847</a>         <strong class="jxr_keyword">for</strong> (Map.Entry&lt;String, String&gt; header : headers.entrySet()) {
-<a class="jxr_linenumber" name="L848" href="#L848">848</a>             String name = header.getKey();
-<a class="jxr_linenumber" name="L849" href="#L849">849</a>             String value = header.getValue();
+<a class="jxr_linenumber" name="L847" href="#L847">847</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> Map.Entry&lt;String, String&gt; header : headers.entrySet()) {
+<a class="jxr_linenumber" name="L848" href="#L848">848</a>             <strong class="jxr_keyword">final</strong> String name = header.getKey();
+<a class="jxr_linenumber" name="L849" href="#L849">849</a>             <strong class="jxr_keyword">final</strong> String value = header.getValue();
 <a class="jxr_linenumber" name="L850" href="#L850">850</a>             email.addHeader(name, value);
 <a class="jxr_linenumber" name="L851" href="#L851">851</a>         }
 <a class="jxr_linenumber" name="L852" href="#L852">852</a> 
@@ -889,7 +889,7 @@
 <a class="jxr_linenumber" name="L881" href="#L881">881</a>     @Test
 <a class="jxr_linenumber" name="L882" href="#L882">882</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSetHeaders()
 <a class="jxr_linenumber" name="L883" href="#L883">883</a>     {
-<a class="jxr_linenumber" name="L884" href="#L884">884</a>         Map&lt;String, String&gt; ht = <strong class="jxr_keyword">new</strong> Hashtable&lt;String, String&gt;();
+<a class="jxr_linenumber" name="L884" href="#L884">884</a>         <strong class="jxr_keyword">final</strong> Map&lt;String, String&gt; ht = <strong class="jxr_keyword">new</strong> Hashtable&lt;String, String&gt;();
 <a class="jxr_linenumber" name="L885" href="#L885">885</a>         ht.put(<span class="jxr_string">"X-Priority"</span>, <span class="jxr_string">"1"</span>);
 <a class="jxr_linenumber" name="L886" href="#L886">886</a>         ht.put(<span class="jxr_string">"Disposition-Notification-To"</span>, <span class="jxr_string">"me@home.com"</span>);
 <a class="jxr_linenumber" name="L887" href="#L887">887</a>         ht.put(<span class="jxr_string">"X-Mailer"</span>, <span class="jxr_string">"Sendmail"</span>);
@@ -918,14 +918,14 @@
 <a class="jxr_linenumber" name="L910" href="#L910">910</a>         
 <a class="jxr_linenumber" name="L911" href="#L911">911</a>         email.buildMimeMessage();
 <a class="jxr_linenumber" name="L912" href="#L912">912</a> 
-<a class="jxr_linenumber" name="L913" href="#L913">913</a>         MimeMessage msg = email.getMimeMessage();
+<a class="jxr_linenumber" name="L913" href="#L913">913</a>         <strong class="jxr_keyword">final</strong> MimeMessage msg = email.getMimeMessage();
 <a class="jxr_linenumber" name="L914" href="#L914">914</a>         msg.saveChanges();
 <a class="jxr_linenumber" name="L915" href="#L915">915</a>         
-<a class="jxr_linenumber" name="L916" href="#L916">916</a>         String[] values = msg.getHeader(<span class="jxr_string">"X-LongHeader"</span>);
+<a class="jxr_linenumber" name="L916" href="#L916">916</a>         <strong class="jxr_keyword">final</strong> String[] values = msg.getHeader(<span class="jxr_string">"X-LongHeader"</span>);
 <a class="jxr_linenumber" name="L917" href="#L917">917</a>         assertEquals(1, values.length);
 <a class="jxr_linenumber" name="L918" href="#L918">918</a>         
 <a class="jxr_linenumber" name="L919" href="#L919">919</a>         <em class="jxr_comment">// the header should be split in two lines</em>
-<a class="jxr_linenumber" name="L920" href="#L920">920</a>         String[] lines = values[0].split(<span class="jxr_string">"&#92;&#92;r&#92;&#92;n"</span>);
+<a class="jxr_linenumber" name="L920" href="#L920">920</a>         <strong class="jxr_keyword">final</strong> String[] lines = values[0].split(<span class="jxr_string">"&#92;&#92;r&#92;&#92;n"</span>);
 <a class="jxr_linenumber" name="L921" href="#L921">921</a>         assertEquals(2, lines.length);
 <a class="jxr_linenumber" name="L922" href="#L922">922</a>         
 <a class="jxr_linenumber" name="L923" href="#L923">923</a>         <em class="jxr_comment">// there should only be one line-break</em>
@@ -959,7 +959,7 @@
 <a class="jxr_linenumber" name="L951" href="#L951">951</a>     @Test
 <a class="jxr_linenumber" name="L952" href="#L952">952</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSetSubject()
 <a class="jxr_linenumber" name="L953" href="#L953">953</a>     {
-<a class="jxr_linenumber" name="L954" href="#L954">954</a>         <strong class="jxr_keyword">for</strong> (String validChar : testCharsValid) {
+<a class="jxr_linenumber" name="L954" href="#L954">954</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> String validChar : testCharsValid) {
 <a class="jxr_linenumber" name="L955" href="#L955">955</a>             email.setSubject(validChar);
 <a class="jxr_linenumber" name="L956" href="#L956">956</a>             assertEquals(validChar, email.getSubject());
 <a class="jxr_linenumber" name="L957" href="#L957">957</a>         }
@@ -997,7 +997,7 @@
 <a class="jxr_linenumber" name="L989" href="#L989">989</a>             email.send();
 <a class="jxr_linenumber" name="L990" href="#L990">990</a>             fail(<span class="jxr_string">"Should have thrown an exception"</span>);
 <a class="jxr_linenumber" name="L991" href="#L991">991</a>         }
-<a class="jxr_linenumber" name="L992" href="#L992">992</a>         <strong class="jxr_keyword">catch</strong> (EmailException e)
+<a class="jxr_linenumber" name="L992" href="#L992">992</a>         <strong class="jxr_keyword">catch</strong> (<strong class="jxr_keyword">final</strong> EmailException e)
 <a class="jxr_linenumber" name="L993" href="#L993">993</a>         {
 <a class="jxr_linenumber" name="L994" href="#L994">994</a>             assertTrue(e.getCause() instanceof ParseException);
 <a class="jxr_linenumber" name="L995" href="#L995">995</a>             fakeMailServer.stop();
@@ -1060,7 +1060,7 @@
 <a class="jxr_linenumber" name="L1052" href="#L1052">1052</a>             email.send();
 <a class="jxr_linenumber" name="L1053" href="#L1053">1053</a>             fail(<span class="jxr_string">"Should have thrown an exception"</span>);
 <a class="jxr_linenumber" name="L1054" href="#L1054">1054</a>         }
-<a class="jxr_linenumber" name="L1055" href="#L1055">1055</a>         <strong class="jxr_keyword">catch</strong> (EmailException e)
+<a class="jxr_linenumber" name="L1055" href="#L1055">1055</a>         <strong class="jxr_keyword">catch</strong> (<strong class="jxr_keyword">final</strong> EmailException e)
 <a class="jxr_linenumber" name="L1056" href="#L1056">1056</a>         {
 <a class="jxr_linenumber" name="L1057" href="#L1057">1057</a>             assertTrue(e.getMessage().contains(<span class="jxr_string">"bad.host.com:465"</span>));
 <a class="jxr_linenumber" name="L1058" href="#L1058">1058</a>             fakeMailServer.stop();
@@ -1072,14 +1072,14 @@
 <a class="jxr_linenumber" name="L1064" href="#L1064">1064</a>     {
 <a class="jxr_linenumber" name="L1065" href="#L1065">1065</a>         <em class="jxr_comment">// with input date</em>
 <a class="jxr_linenumber" name="L1066" href="#L1066">1066</a> 
-<a class="jxr_linenumber" name="L1067" href="#L1067">1067</a>         Date dtTest = Calendar.getInstance().getTime();
+<a class="jxr_linenumber" name="L1067" href="#L1067">1067</a>         <strong class="jxr_keyword">final</strong> Date dtTest = Calendar.getInstance().getTime();
 <a class="jxr_linenumber" name="L1068" href="#L1068">1068</a>         email.setSentDate(dtTest);
 <a class="jxr_linenumber" name="L1069" href="#L1069">1069</a>         assertEquals(dtTest, email.getSentDate());
 <a class="jxr_linenumber" name="L1070" href="#L1070">1070</a> 
 <a class="jxr_linenumber" name="L1071" href="#L1071">1071</a>         <em class="jxr_comment">// with null input (this is a fudge :D)</em>
 <a class="jxr_linenumber" name="L1072" href="#L1072">1072</a>         email.setSentDate(<strong class="jxr_keyword">null</strong>);
 <a class="jxr_linenumber" name="L1073" href="#L1073">1073</a> 
-<a class="jxr_linenumber" name="L1074" href="#L1074">1074</a>         Date sentDate = email.getSentDate();
+<a class="jxr_linenumber" name="L1074" href="#L1074">1074</a>         <strong class="jxr_keyword">final</strong> Date sentDate = email.getSentDate();
 <a class="jxr_linenumber" name="L1075" href="#L1075">1075</a> 
 <a class="jxr_linenumber" name="L1076" href="#L1076">1076</a>         <em class="jxr_comment">// Date objects are millisecond specific. If you have a slow processor,</em>
 <a class="jxr_linenumber" name="L1077" href="#L1077">1077</a>         <em class="jxr_comment">// time passes between the generation of dtTest and the new Date() in</em>
@@ -1091,7 +1091,7 @@
 <a class="jxr_linenumber" name="L1083" href="#L1083">1083</a>     @Test
 <a class="jxr_linenumber" name="L1084" href="#L1084">1084</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testToInternetAddressArray() <strong class="jxr_keyword">throws</strong> Exception
 <a class="jxr_linenumber" name="L1085" href="#L1085">1085</a>     {
-<a class="jxr_linenumber" name="L1086" href="#L1086">1086</a>         List&lt;InternetAddress&gt; testInetEmailValid = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
+<a class="jxr_linenumber" name="L1086" href="#L1086">1086</a>         <strong class="jxr_keyword">final</strong> List&lt;InternetAddress&gt; testInetEmailValid = <strong class="jxr_keyword">new</strong> ArrayList&lt;InternetAddress&gt;();
 <a class="jxr_linenumber" name="L1087" href="#L1087">1087</a> 
 <a class="jxr_linenumber" name="L1088" href="#L1088">1088</a>         testInetEmailValid.add(<strong class="jxr_keyword">new</strong> InternetAddress(<span class="jxr_string">"me@home.com"</span>, <span class="jxr_string">"Name1"</span>));
 <a class="jxr_linenumber" name="L1089" href="#L1089">1089</a>         testInetEmailValid.add(
@@ -1113,10 +1113,10 @@
 <a class="jxr_linenumber" name="L1105" href="#L1105">1105</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSetPopBeforeSmtp()
 <a class="jxr_linenumber" name="L1106" href="#L1106">1106</a>     {
 <a class="jxr_linenumber" name="L1107" href="#L1107">1107</a>         <em class="jxr_comment">// simple test (can be improved)</em>
-<a class="jxr_linenumber" name="L1108" href="#L1108">1108</a>         <strong class="jxr_keyword">boolean</strong> boolPopBeforeSmtp = <strong class="jxr_keyword">true</strong>;
-<a class="jxr_linenumber" name="L1109" href="#L1109">1109</a>         String strHost = <span class="jxr_string">"mail.home.com"</span>;
-<a class="jxr_linenumber" name="L1110" href="#L1110">1110</a>         String strUsername = <span class="jxr_string">"user.name"</span>;
-<a class="jxr_linenumber" name="L1111" href="#L1111">1111</a>         String strPassword = <span class="jxr_string">"user.passwd"</span>;
+<a class="jxr_linenumber" name="L1108" href="#L1108">1108</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">boolean</strong> boolPopBeforeSmtp = <strong class="jxr_keyword">true</strong>;
+<a class="jxr_linenumber" name="L1109" href="#L1109">1109</a>         <strong class="jxr_keyword">final</strong> String strHost = <span class="jxr_string">"mail.home.com"</span>;
+<a class="jxr_linenumber" name="L1110" href="#L1110">1110</a>         <strong class="jxr_keyword">final</strong> String strUsername = <span class="jxr_string">"user.name"</span>;
+<a class="jxr_linenumber" name="L1111" href="#L1111">1111</a>         <strong class="jxr_keyword">final</strong> String strPassword = <span class="jxr_string">"user.passwd"</span>;
 <a class="jxr_linenumber" name="L1112" href="#L1112">1112</a> 
 <a class="jxr_linenumber" name="L1113" href="#L1113">1113</a>         email.setPopBeforeSmtp(
 <a class="jxr_linenumber" name="L1114" href="#L1114">1114</a>             boolPopBeforeSmtp,
@@ -1155,7 +1155,7 @@
 <a class="jxr_linenumber" name="L1147" href="#L1147">1147</a>         email.setCharset(<span class="jxr_string">"ISO-8859-1"</span>);
 <a class="jxr_linenumber" name="L1148" href="#L1148">1148</a>         email.setContent(<span class="jxr_string">"test content"</span>, <span class="jxr_string">"text/plain"</span>);
 <a class="jxr_linenumber" name="L1149" href="#L1149">1149</a>         email.buildMimeMessage();
-<a class="jxr_linenumber" name="L1150" href="#L1150">1150</a>         MimeMessage msg = email.getMimeMessage();
+<a class="jxr_linenumber" name="L1150" href="#L1150">1150</a>         <strong class="jxr_keyword">final</strong> MimeMessage msg = email.getMimeMessage();
 <a class="jxr_linenumber" name="L1151" href="#L1151">1151</a>         msg.saveChanges();
 <a class="jxr_linenumber" name="L1152" href="#L1152">1152</a>         assertEquals(<span class="jxr_string">"text/plain; charset=ISO-8859-1"</span>, msg.getContentType());
 <a class="jxr_linenumber" name="L1153" href="#L1153">1153</a>     }
@@ -1179,7 +1179,7 @@
 <a class="jxr_linenumber" name="L1171" href="#L1171">1171</a>         email.setCharset(<span class="jxr_string">"ISO-8859-1"</span>);
 <a class="jxr_linenumber" name="L1172" href="#L1172">1172</a>         email.setContent(<span class="jxr_string">"test content"</span>, <span class="jxr_string">"text/plain; charset=US-ASCII"</span>);
 <a class="jxr_linenumber" name="L1173" href="#L1173">1173</a>         email.buildMimeMessage();
-<a class="jxr_linenumber" name="L1174" href="#L1174">1174</a>         MimeMessage msg = email.getMimeMessage();
+<a class="jxr_linenumber" name="L1174" href="#L1174">1174</a>         <strong class="jxr_keyword">final</strong> MimeMessage msg = email.getMimeMessage();
 <a class="jxr_linenumber" name="L1175" href="#L1175">1175</a>         msg.saveChanges();
 <a class="jxr_linenumber" name="L1176" href="#L1176">1176</a>         assertEquals(<span class="jxr_string">"text/plain; charset=US-ASCII"</span>, msg.getContentType());
 <a class="jxr_linenumber" name="L1177" href="#L1177">1177</a>     }
@@ -1202,7 +1202,7 @@
 <a class="jxr_linenumber" name="L1194" href="#L1194">1194</a>         email.setCharset(<span class="jxr_string">"ISO-8859-1"</span>);
 <a class="jxr_linenumber" name="L1195" href="#L1195">1195</a>         email.setContent(<span class="jxr_string">"test content"</span>, <span class="jxr_string">"application/octet-stream"</span>);
 <a class="jxr_linenumber" name="L1196" href="#L1196">1196</a>         email.buildMimeMessage();
-<a class="jxr_linenumber" name="L1197" href="#L1197">1197</a>         MimeMessage msg = email.getMimeMessage();
+<a class="jxr_linenumber" name="L1197" href="#L1197">1197</a>         <strong class="jxr_keyword">final</strong> MimeMessage msg = email.getMimeMessage();
 <a class="jxr_linenumber" name="L1198" href="#L1198">1198</a>         msg.saveChanges();
 <a class="jxr_linenumber" name="L1199" href="#L1199">1199</a>         assertEquals(<span class="jxr_string">"application/octet-stream"</span>, msg.getContentType());
 <a class="jxr_linenumber" name="L1200" href="#L1200">1200</a>     }
@@ -1217,10 +1217,10 @@
 <a class="jxr_linenumber" name="L1209" href="#L1209">1209</a>         email.setSubject(<span class="jxr_string">"test mail"</span>);
 <a class="jxr_linenumber" name="L1210" href="#L1210">1210</a> 
 <a class="jxr_linenumber" name="L1211" href="#L1211">1211</a>         email.setCharset(<span class="jxr_string">"ISO-8859-1"</span>);
-<a class="jxr_linenumber" name="L1212" href="#L1212">1212</a>         File png = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"./target/test-classes/images/logos/maven-feather.png"</span>);
+<a class="jxr_linenumber" name="L1212" href="#L1212">1212</a>         <strong class="jxr_keyword">final</strong> File png = <strong class="jxr_keyword">new</strong> File(<span class="jxr_string">"./target/test-classes/images/logos/maven-feather.png"</span>);
 <a class="jxr_linenumber" name="L1213" href="#L1213">1213</a>         email.setContent(png, <span class="jxr_string">"image/png"</span>);
 <a class="jxr_linenumber" name="L1214" href="#L1214">1214</a>         email.buildMimeMessage();
-<a class="jxr_linenumber" name="L1215" href="#L1215">1215</a>         MimeMessage msg = email.getMimeMessage();
+<a class="jxr_linenumber" name="L1215" href="#L1215">1215</a>         <strong class="jxr_keyword">final</strong> MimeMessage msg = email.getMimeMessage();
 <a class="jxr_linenumber" name="L1216" href="#L1216">1216</a>         msg.saveChanges();
 <a class="jxr_linenumber" name="L1217" href="#L1217">1217</a>         assertEquals(<span class="jxr_string">"image/png"</span>, msg.getContentType());
 <a class="jxr_linenumber" name="L1218" href="#L1218">1218</a>     }    



Mime
View raw message