You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2012/12/04 20:17:52 UTC
svn commit: r1417125 -
/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/HtmlEmail.java
Author: sebb
Date: Tue Dec 4 19:17:51 2012
New Revision: 1417125
URL: http://svn.apache.org/viewvc?rev=1417125&view=rev
Log:
Fix more generics types, based on Javadoc where necessary
Modified:
commons/proper/email/trunk/src/main/java/org/apache/commons/mail/HtmlEmail.java
Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/HtmlEmail.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/HtmlEmail.java?rev=1417125&r1=1417124&r2=1417125&view=diff
==============================================================================
--- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/HtmlEmail.java (original)
+++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/HtmlEmail.java Tue Dec 4 19:17:51 2012
@@ -109,13 +109,13 @@ public class HtmlEmail extends MultiPart
* objects are now stored in {@link #inlineEmbeds}.
*/
@Deprecated
- protected List inlineImages;
+ protected List<InlineImage> inlineImages;
/**
* Embedded images Map<String, InlineImage> where the key is the
* user-defined image name.
*/
- protected Map inlineEmbeds = new HashMap();
+ protected Map<String, InlineImage> inlineEmbeds = new HashMap<String, InlineImage>();
/**
* Set the text content.
@@ -265,7 +265,7 @@ public class HtmlEmail extends MultiPart
// if so, return the cached CID value.
if (inlineEmbeds.containsKey(name))
{
- InlineImage ii = (InlineImage) inlineEmbeds.get(name);
+ InlineImage ii = inlineEmbeds.get(name);
URLDataSource urlDataSource = (URLDataSource) ii.getDataSource();
// make sure the supplied URL points to the same thing
// as the one already associated with this name.
@@ -376,7 +376,7 @@ public class HtmlEmail extends MultiPart
// if so, return the cached CID value.
if (inlineEmbeds.containsKey(file.getName()))
{
- InlineImage ii = (InlineImage) inlineEmbeds.get(file.getName());
+ InlineImage ii = inlineEmbeds.get(file.getName());
FileDataSource fileDataSource = (FileDataSource) ii.getDataSource();
// make sure the supplied file has the same canonical path
// as the one already associated with this name.
@@ -438,7 +438,7 @@ public class HtmlEmail extends MultiPart
// if so, return the cached CID value.
if (inlineEmbeds.containsKey(name))
{
- InlineImage ii = (InlineImage) inlineEmbeds.get(name);
+ InlineImage ii = inlineEmbeds.get(name);
// make sure the supplied URL points to the same thing
// as the one already associated with this name.
if (dataSource.equals(ii.getDataSource()))
@@ -583,10 +583,10 @@ public class HtmlEmail extends MultiPart
msgHtml.setContent(this.html, Email.TEXT_HTML);
}
- Iterator iter = this.inlineEmbeds.values().iterator();
+ Iterator<InlineImage> iter = this.inlineEmbeds.values().iterator();
while (iter.hasNext())
{
- InlineImage ii = (InlineImage) iter.next();
+ InlineImage ii = iter.next();
bodyEmbedsContainer.addBodyPart(ii.getMbp());
}
}