Author: mrisaliti
Date: Fri Mar 4 23:43:00 2011
New Revision: 1078220
URL:
http://svn.apache.org/viewvc?rev=1078220&view=revLog:
Remove some warning in BirtWorker (OFBIZ-4102)
Modified:
ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java
Modified: ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java?rev=1078220&r1=1078219&r2=1078220&view=diff==============================================================================
--- ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java (original)
+++ ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java Fri Mar 4 23:43:00 2011
@@ -137,7 +137,7 @@ public class BirtWorker {
pdfOptions.setOption(IPDFRenderOption.PAGE_OVERFLOW, Boolean.TRUE );
} else if (options.getOutputFormat().equalsIgnoreCase("xls")) {
// set excel render options
- EXCELRenderOption excelOptions = new EXCELRenderOption(options);
+ new EXCELRenderOption(options);
}
options.setOutputStream(output);
task.setRenderOption(options);
@@ -153,6 +153,8 @@ public class BirtWorker {
HttpSession session = request.getSession();
ServletContext servletContext = session.getServletContext();
+ Map<String, Object> appContext = UtilGenerics.checkMap(engine.getConfig().getAppContext());
+
// set delegator
Delegator delegator = (Delegator) session.getAttribute("delegator");
if (UtilValidate.isEmpty(delegator)) {
@@ -162,7 +164,7 @@ public class BirtWorker {
delegator = (Delegator) request.getAttribute("delegator");
}
if (UtilValidate.isNotEmpty(delegator)) {
- engine.getConfig().getAppContext().put("delegator", delegator);
+ appContext.put("delegator", delegator);
}
// set delegator
@@ -174,7 +176,7 @@ public class BirtWorker {
dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
}
if (UtilValidate.isNotEmpty(dispatcher)) {
- engine.getConfig().getAppContext().put("dispatcher", dispatcher);
+ appContext.put("dispatcher", dispatcher);
}
// set security
@@ -186,7 +188,7 @@ public class BirtWorker {
security = (Security) request.getAttribute("security");
}
if (UtilValidate.isNotEmpty(security)) {
- engine.getConfig().getAppContext().put("security", security);
+ appContext.put("security", security);
}
}
}