changeset 1275:cc3dabc05f72

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 04 Dec 2018 21:42:11 -0700
parents 383f924dfe9d
children 623dfe0e2e73
files src/luan/modules/mail/SmtpCon.java
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/luan/modules/mail/SmtpCon.java	Tue Dec 04 06:08:20 2018 -0700
+++ b/src/luan/modules/mail/SmtpCon.java	Tue Dec 04 21:42:11 2018 -0700
@@ -25,7 +25,7 @@
 	private final Session session;
 
 	public SmtpCon(LuanTable paramsTbl) throws LuanException {
-		Map<Object,Object> params = new HashMap<Object,Object>(paramsTbl.asMap());
+		Map<Object,Object> params = paramsTbl.asMap();
 		Properties props = new Properties(System.getProperties());
 
 		String host = getString(params,"host");
@@ -81,7 +81,7 @@
 
 	public void send(LuanTable mailTbl) throws LuanException {
 		try {
-			Map<Object,Object> mailParams = new HashMap<Object,Object>(mailTbl.asMap());
+			Map<Object,Object> mailParams = mailTbl.asMap();
 			MimeMessage msg = new MimeMessage(session);
 
 			String from = getString(mailParams,"from");
@@ -113,7 +113,7 @@
 					bodyPart.setText((String)body);
 				} else if( body instanceof LuanTable ) {
 					LuanTable bodyTbl = (LuanTable)body;
-					Map<Object,Object> map = new HashMap<Object,Object>(bodyTbl.asMap());
+					Map<Object,Object> map = bodyTbl.asMap();
 					MimeMultipart mp = new MimeMultipart("alternative");
 					String text = (String)map.remove("text");
 					if( text != null ) {
@@ -146,7 +146,7 @@
 				for( Object attachment : attachmentsTbl.asList() ) {
 					if( !(attachment instanceof LuanTable) )
 						throw new LuanException( "each attachment must be a table" );
-					Map<Object,Object> attachmentMap = new HashMap<Object,Object>(((LuanTable)attachment).asMap());
+					Map<Object,Object> attachmentMap = ((LuanTable)attachment).asMap();
 					Object obj;
 
 					obj = attachmentMap.remove("filename");