提交 98875cbe authored 作者: Thomas Mueller's avatar Thomas Mueller

Build: compatibility with Java 7

上级 ab76d363
...@@ -402,9 +402,10 @@ public class WebApp { ...@@ -402,9 +402,10 @@ public class WebApp {
} }
private String adminStartTranslate() { private String adminStartTranslate() {
Map<?, ?> p = Map.class.cast(session.map.get("text"));
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
Map<Object, Object> p = Map.class.cast(session.map.get("text")); Map<Object, Object> p2 = (Map<Object, Object>) p;
String file = server.startTranslate(p); String file = server.startTranslate(p2);
session.put("translationFile", file); session.put("translationFile", file);
return "helpTranslate.jsp"; return "helpTranslate.jsp";
} }
......
...@@ -91,7 +91,7 @@ public class WebServlet extends HttpServlet { ...@@ -91,7 +91,7 @@ public class WebServlet extends HttpServlet {
file = file.substring(1); file = file.substring(1);
} }
file = getAllowedFile(req, file); file = getAllowedFile(req, file);
// extract the request attributes // extract the request attributes
Properties attributes = new Properties(); Properties attributes = new Properties();
Enumeration<?> en = req.getAttributeNames(); Enumeration<?> en = req.getAttributeNames();
...@@ -106,7 +106,7 @@ public class WebServlet extends HttpServlet { ...@@ -106,7 +106,7 @@ public class WebServlet extends HttpServlet {
String value = req.getParameter(name); String value = req.getParameter(name);
attributes.put(name, value); attributes.put(name, value);
} }
WebSession session = null; WebSession session = null;
String sessionId = attributes.getProperty("jsessionid"); String sessionId = attributes.getProperty("jsessionid");
if (sessionId != null) { if (sessionId != null) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论