It's deprecated, so don't use it.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2795 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -221,8 +221,8 @@ public class JDBCUtil
|
|||||||
*/
|
*/
|
||||||
public static String escape (String text)
|
public static String escape (String text)
|
||||||
{
|
{
|
||||||
text = StringUtil.replace(text, "\\", "\\\\");
|
text = text.replace("\\", "\\\\");
|
||||||
return "'" + StringUtil.replace(text, "'", "\\'") + "'";
|
return "'" + text.replace("'", "\\'") + "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -284,7 +284,7 @@ public class JDBCUtil
|
|||||||
*/
|
*/
|
||||||
public static String safeJigger (String text)
|
public static String safeJigger (String text)
|
||||||
{
|
{
|
||||||
return StringUtil.replace(jigger(text), "'", "\\'");
|
return jigger(text).replace("'", "\\'");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ public class UserManager
|
|||||||
if (user == null) {
|
if (user == null) {
|
||||||
// first construct the redirect URL
|
// first construct the redirect URL
|
||||||
String eurl = RequestUtils.getLocationEncoded(req);
|
String eurl = RequestUtils.getLocationEncoded(req);
|
||||||
String target = StringUtil.replace(_loginURL, "%R", eurl);
|
String target = _loginURL.replace("%R", eurl);
|
||||||
if (USERMGR_DEBUG) {
|
if (USERMGR_DEBUG) {
|
||||||
log.info("No user found in require, redirecting", "to", target);
|
log.info("No user found in require, redirecting", "to", target);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,8 +24,6 @@ import java.io.*;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import com.samskivert.util.ConfigUtil;
|
import com.samskivert.util.ConfigUtil;
|
||||||
import com.samskivert.util.StringUtil;
|
|
||||||
|
|
||||||
import static com.samskivert.Log.log;
|
import static com.samskivert.Log.log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -150,7 +148,7 @@ public class ExceptionMap
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return StringUtil.replace(msg, MESSAGE_MARKER, ex.getMessage());
|
return msg.replace(MESSAGE_MARKER, ex.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static List<Class<?>> _keys;
|
protected static List<Class<?>> _keys;
|
||||||
|
|||||||
@@ -46,14 +46,14 @@ public class HTMLUtil
|
|||||||
// (first we turn the entified versions normal so that if text is
|
// (first we turn the entified versions normal so that if text is
|
||||||
// repeatedly run through this it doesn't keep changing successive
|
// repeatedly run through this it doesn't keep changing successive
|
||||||
// &'s into "&".
|
// &'s into "&".
|
||||||
text = StringUtil.replace(text, """, "\"");
|
text = text.replace(""", "\"");
|
||||||
text = StringUtil.replace(text, ">", ">");
|
text = text.replace(">", ">");
|
||||||
text = StringUtil.replace(text, "<", "<");
|
text = text.replace("<", "<");
|
||||||
text = StringUtil.replace(text, "&", "&");
|
text = text.replace("&", "&");
|
||||||
text = StringUtil.replace(text, "&", "&");
|
text = text.replace("&", "&");
|
||||||
text = StringUtil.replace(text, "<", "<");
|
text = text.replace("<", "<");
|
||||||
text = StringUtil.replace(text, ">", ">");
|
text = text.replace(">", ">");
|
||||||
text = StringUtil.replace(text, "\"", """);
|
text = text.replace("\"", """);
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,8 +66,8 @@ public class HTMLUtil
|
|||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
// handle both line ending formats
|
// handle both line ending formats
|
||||||
text = StringUtil.replace(text, "\n\n", "\n<p>\n");
|
text = text.replace("\n\n", "\n<p>\n");
|
||||||
text = StringUtil.replace(text, "\r\n\r\n", "\r\n<p>\r\n");
|
text = text.replace("\r\n\r\n", "\r\n<p>\r\n");
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ public class HTMLUtil
|
|||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
// handle both line ending formats
|
// handle both line ending formats
|
||||||
text = StringUtil.replace(text, "\n", "<br>\n");
|
text = text.replace("\n", "<br>\n");
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,9 +113,9 @@ public class HTMLUtil
|
|||||||
StringBuilder lbuf = new StringBuilder();
|
StringBuilder lbuf = new StringBuilder();
|
||||||
|
|
||||||
boolean inpara = false, inlist = false;
|
boolean inpara = false, inlist = false;
|
||||||
for (int ii = 0; ii < lines.length; ii++) {
|
for (String line2 : lines) {
|
||||||
String line = lines[ii];
|
String line = line2;
|
||||||
if (StringUtil.isBlank(lines[ii])) {
|
if (StringUtil.isBlank(line2)) {
|
||||||
if (inlist) {
|
if (inlist) {
|
||||||
lbuf.append("</ul>");
|
lbuf.append("</ul>");
|
||||||
inlist = false;
|
inlist = false;
|
||||||
@@ -212,8 +212,8 @@ public class HTMLUtil
|
|||||||
|
|
||||||
ArrayList<String> list = new ArrayList<String>();
|
ArrayList<String> list = new ArrayList<String>();
|
||||||
list.add(src);
|
list.add(src);
|
||||||
for (int ii=0, nn = regexes.length; ii < nn; ii++) {
|
for (String regexe : regexes) {
|
||||||
Pattern p = Pattern.compile(regexes[ii], Pattern.CASE_INSENSITIVE);
|
Pattern p = Pattern.compile(regexe, Pattern.CASE_INSENSITIVE);
|
||||||
for (int jj=0; jj < list.size(); jj += 2) {
|
for (int jj=0; jj < list.size(); jj += 2) {
|
||||||
String piece = list.get(jj);
|
String piece = list.get(jj);
|
||||||
Matcher m = p.matcher(piece);
|
Matcher m = p.matcher(piece);
|
||||||
@@ -231,8 +231,8 @@ public class HTMLUtil
|
|||||||
for (int jj=0, nn = list.size(); jj < nn; jj++) {
|
for (int jj=0, nn = list.size(); jj < nn; jj++) {
|
||||||
String s = list.get(jj);
|
String s = list.get(jj);
|
||||||
if (jj % 2 == 0) {
|
if (jj % 2 == 0) {
|
||||||
s = StringUtil.replace(s, "<", "<");
|
s = s.replace("<", "<");
|
||||||
s = StringUtil.replace(s, ">", ">");
|
s = s.replace(">", ">");
|
||||||
}
|
}
|
||||||
buf.append(s);
|
buf.append(s);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class GenUtil
|
|||||||
} else {
|
} else {
|
||||||
Package pkg = clazz.getPackage();
|
Package pkg = clazz.getPackage();
|
||||||
int offset = (pkg == null) ? 0 : pkg.getName().length()+1;
|
int offset = (pkg == null) ? 0 : pkg.getName().length()+1;
|
||||||
return StringUtil.replace(clazz.getName().substring(offset), "$", ".");
|
return clazz.getName().substring(offset).replace("$", ".");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (type instanceof ParameterizedType) {
|
} else if (type instanceof ParameterizedType) {
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ public class Application
|
|||||||
path = path.substring(0, ldidx);
|
path = path.substring(0, ldidx);
|
||||||
}
|
}
|
||||||
// convert slashes to dots
|
// convert slashes to dots
|
||||||
path = StringUtil.replace(path, "/", ".");
|
path.replace("/", ".");
|
||||||
// prepend the base logic package and we're all set
|
// prepend the base logic package and we're all set
|
||||||
return _logicPkg + path;
|
return _logicPkg + path;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user