svn commit: r1078192 - /ofbiz/trunk/framework/birt/src/org/ofbiz/birt/email/BirtEmailServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1078192 - /ofbiz/trunk/framework/birt/src/org/ofbiz/birt/email/BirtEmailServices.java

mrisaliti
Author: mrisaliti
Date: Fri Mar  4 22:44:55 2011
New Revision: 1078192

URL: http://svn.apache.org/viewvc?rev=1078192&view=rev
Log:
Remove some warning in BirtEmailService (OFBIZ-4102)

Modified:
    ofbiz/trunk/framework/birt/src/org/ofbiz/birt/email/BirtEmailServices.java

Modified: ofbiz/trunk/framework/birt/src/org/ofbiz/birt/email/BirtEmailServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/birt/src/org/ofbiz/birt/email/BirtEmailServices.java?rev=1078192&r1=1078191&r2=1078192&view=diff
==============================================================================
--- ofbiz/trunk/framework/birt/src/org/ofbiz/birt/email/BirtEmailServices.java (original)
+++ ofbiz/trunk/framework/birt/src/org/ofbiz/birt/email/BirtEmailServices.java Fri Mar  4 22:44:55 2011
@@ -23,6 +23,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.StringWriter;
 import java.sql.SQLException;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -158,9 +159,10 @@ public class BirtEmailServices {
                     birtContentType = "application/pdf";
                 }
                 IReportEngine engine = BirtContainer.getReportEngine();
-                engine.getConfig().getAppContext().put("delegator", delegator);
-                engine.getConfig().getAppContext().put("dispatcher", dispatcher);
-                engine.getConfig().getAppContext().put("security", security);
+                HashMap<String, Object> appContext = UtilGenerics.cast(engine.getConfig().getAppContext());
+                appContext.put("delegator", delegator);
+                appContext.put("dispatcher", dispatcher);
+                appContext.put("security", security);
                 
                 InputStream reportInputStream = BirtFactory.getReportInputStreamFromLocation(birtReportLocation);
                 IReportRunnable design = engine.openReportDesign(reportInputStream);