fix: reference to Base64 is ambiguous, both class java.util.Base64 in java.util and class helma.util.Base64 in helma.util match (Java 8)
This commit is contained in:
parent
948dc9a76b
commit
dd822d4e24
2 changed files with 11 additions and 11 deletions
|
@ -675,7 +675,7 @@ public final class ResponseTrans extends Writer implements Serializable {
|
||||||
|
|
||||||
// if debug buffer exists, append it to main buffer
|
// if debug buffer exists, append it to main buffer
|
||||||
if (contentType != null &&
|
if (contentType != null &&
|
||||||
contentType.startsWith("text/html") &&
|
contentType.startsWith("text/html") &&
|
||||||
debugBuffer != null) {
|
debugBuffer != null) {
|
||||||
debugBuffer.append("</div>");
|
debugBuffer.append("</div>");
|
||||||
if (buffer == null) {
|
if (buffer == null) {
|
||||||
|
@ -714,7 +714,7 @@ public final class ResponseTrans extends Writer implements Serializable {
|
||||||
// if (contentType != null)
|
// if (contentType != null)
|
||||||
// digest.update (contentType.getBytes());
|
// digest.update (contentType.getBytes());
|
||||||
byte[] b = digest.digest(response);
|
byte[] b = digest.digest(response);
|
||||||
etag = "\"" + new String(Base64.encode(b)) + "\"";
|
etag = "\"" + new String(helma.util.Base64.encode(b)) + "\"";
|
||||||
// only set response to 304 not modified if no cookies were set
|
// only set response to 304 not modified if no cookies were set
|
||||||
if (reqtrans.hasETag(etag) && countCookies() == 0) {
|
if (reqtrans.hasETag(etag) && countCookies() == 0) {
|
||||||
response = new byte[0];
|
response = new byte[0];
|
||||||
|
@ -891,7 +891,7 @@ public final class ResponseTrans extends Writer implements Serializable {
|
||||||
// generation sensitive to changes in the app
|
// generation sensitive to changes in the app
|
||||||
byte[] b = digest.digest(MD5Encoder.toBytes(app.getChecksum()));
|
byte[] b = digest.digest(MD5Encoder.toBytes(app.getChecksum()));
|
||||||
|
|
||||||
setETag(new String(Base64.encode(b)));
|
setETag(new String(helma.util.Base64.encode(b)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1164,4 +1164,4 @@ public final class ResponseTrans extends Writer implements Serializable {
|
||||||
public void setRealm(String realm) {
|
public void setRealm(String realm) {
|
||||||
this.realm = realm;
|
this.realm = realm;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,7 +200,7 @@ public abstract class AbstractServletClient extends HttpServlet {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String host = (String) reqtrans.get("http_host");
|
String host = (String) reqtrans.get("http_host");
|
||||||
// http_host is guaranteed to be lower case
|
// http_host is guaranteed to be lower case
|
||||||
if (host != null && host.indexOf(resCookieDomain) == -1) {
|
if (host != null && host.indexOf(resCookieDomain) == -1) {
|
||||||
resCookieDomain = null;
|
resCookieDomain = null;
|
||||||
}
|
}
|
||||||
|
@ -472,11 +472,11 @@ public abstract class AbstractServletClient extends HttpServlet {
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
OutputStream out = res.getOutputStream();
|
OutputStream out = res.getOutputStream();
|
||||||
|
|
||||||
int bufferSize = 4096;
|
int bufferSize = 4096;
|
||||||
byte buffer[] = new byte[bufferSize];
|
byte buffer[] = new byte[bufferSize];
|
||||||
int l;
|
int l;
|
||||||
|
|
||||||
while (length > 0) {
|
while (length > 0) {
|
||||||
if (length < bufferSize) {
|
if (length < bufferSize) {
|
||||||
l = in.read(buffer, 0, length);
|
l = in.read(buffer, 0, length);
|
||||||
|
@ -486,7 +486,7 @@ public abstract class AbstractServletClient extends HttpServlet {
|
||||||
if (l == -1) {
|
if (l == -1) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
length -= l;
|
length -= l;
|
||||||
out.write(buffer, 0, l);
|
out.write(buffer, 0, l);
|
||||||
}
|
}
|
||||||
|
@ -510,7 +510,7 @@ public abstract class AbstractServletClient extends HttpServlet {
|
||||||
checksum[i] = (byte) (n);
|
checksum[i] = (byte) (n);
|
||||||
n >>>= 8;
|
n >>>= 8;
|
||||||
}
|
}
|
||||||
String etag = "\"" + new String(Base64.encode(checksum)) + "\"";
|
String etag = "\"" + new String(helma.util.Base64.encode(checksum)) + "\"";
|
||||||
res.setHeader("ETag", etag);
|
res.setHeader("ETag", etag);
|
||||||
String etagHeader = req.getHeader("If-None-Match");
|
String etagHeader = req.getHeader("If-None-Match");
|
||||||
if (etagHeader != null) {
|
if (etagHeader != null) {
|
||||||
|
@ -574,7 +574,7 @@ public abstract class AbstractServletClient extends HttpServlet {
|
||||||
String id = null;
|
String id = null;
|
||||||
while (id == null || app.getSession(id) != null) {
|
while (id == null || app.getSession(id) != null) {
|
||||||
long l = secureRandom ?
|
long l = secureRandom ?
|
||||||
random.nextLong() :
|
random.nextLong() :
|
||||||
random.nextLong() + Runtime.getRuntime().freeMemory() ^ hashCode();
|
random.nextLong() + Runtime.getRuntime().freeMemory() ^ hashCode();
|
||||||
if (l < 0)
|
if (l < 0)
|
||||||
l = -l;
|
l = -l;
|
||||||
|
@ -781,7 +781,7 @@ public abstract class AbstractServletClient extends HttpServlet {
|
||||||
key = new String(data, 0, ox, encoding);
|
key = new String(data, 0, ox, encoding);
|
||||||
ox = 0;
|
ox = 0;
|
||||||
} else {
|
} else {
|
||||||
data[ox++] = c;
|
data[ox++] = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue