mirror of
https://github.com/zxing/zxing.git
synced 2025-01-12 03:37:34 -08:00
Remove lang3 dependency as Guava can take over its one usage
git-svn-id: https://zxing.googlecode.com/svn/trunk@2991 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
4550d1d762
commit
4aa5348526
|
@ -37,11 +37,6 @@
|
|||
<artifactId>javaee-web-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
|
|
|
@ -16,12 +16,11 @@
|
|||
-->
|
||||
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1">
|
||||
<jsp:directive.page import="
|
||||
java.util.List,
|
||||
com.google.zxing.Result,
|
||||
com.google.zxing.client.result.ResultParser,
|
||||
com.google.zxing.client.result.ParsedResult,
|
||||
com.google.zxing.web.OutputUtils,
|
||||
org.apache.commons.lang3.StringEscapeUtils"/>
|
||||
com.google.common.xml.XmlEscapers"/>
|
||||
<jsp:directive.page contentType="text/html" session="false"/>
|
||||
<jsp:scriptlet>
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
|
@ -42,14 +41,14 @@
|
|||
<div id="main">
|
||||
<div id="header"><h1><img src="zxing-icon.png" height="32" width="32" alt=""/> Decode Succeeded</h1></div>
|
||||
<jsp:scriptlet>
|
||||
for (Result result : (List<Result>) request.getAttribute("results")) {
|
||||
for (Result result : (Iterable<Result>) request.getAttribute("results")) {
|
||||
ParsedResult parsedResult = ResultParser.parseResult(result);
|
||||
|
||||
String text = result.getText();
|
||||
if (text == null) {
|
||||
text = "(Not applicable)";
|
||||
} else {
|
||||
text = StringEscapeUtils.escapeXml(text);
|
||||
text = XmlEscapers.xmlContentEscaper().escape(text);
|
||||
}
|
||||
|
||||
byte[] rawBytes = result.getRawBytes();
|
||||
|
@ -64,7 +63,7 @@
|
|||
if (displayResult == null) {
|
||||
displayResult = "(Not applicable)";
|
||||
} else {
|
||||
displayResult = StringEscapeUtils.escapeXml(displayResult);
|
||||
displayResult = XmlEscapers.xmlContentEscaper().escape(displayResult);
|
||||
}
|
||||
</jsp:scriptlet>
|
||||
<table style="width:100%">
|
||||
|
|
Loading…
Reference in a new issue