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:
Tobi Schäfer 2015-12-22 19:35:16 +01:00
parent 948dc9a76b
commit dd822d4e24
2 changed files with 11 additions and 11 deletions

View file

@ -675,7 +675,7 @@ public final class ResponseTrans extends Writer implements Serializable {
// if debug buffer exists, append it to main buffer
if (contentType != null &&
contentType.startsWith("text/html") &&
contentType.startsWith("text/html") &&
debugBuffer != null) {
debugBuffer.append("</div>");
if (buffer == null) {
@ -714,7 +714,7 @@ public final class ResponseTrans extends Writer implements Serializable {
// if (contentType != null)
// digest.update (contentType.getBytes());
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
if (reqtrans.hasETag(etag) && countCookies() == 0) {
response = new byte[0];
@ -891,7 +891,7 @@ public final class ResponseTrans extends Writer implements Serializable {
// generation sensitive to changes in the app
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) {
this.realm = realm;
}
}
}

View file

@ -200,7 +200,7 @@ public abstract class AbstractServletClient extends HttpServlet {
}
} else {
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) {
resCookieDomain = null;
}
@ -472,11 +472,11 @@ public abstract class AbstractServletClient extends HttpServlet {
}
try {
OutputStream out = res.getOutputStream();
int bufferSize = 4096;
byte buffer[] = new byte[bufferSize];
int l;
while (length > 0) {
if (length < bufferSize) {
l = in.read(buffer, 0, length);
@ -486,7 +486,7 @@ public abstract class AbstractServletClient extends HttpServlet {
if (l == -1) {
break;
}
length -= l;
out.write(buffer, 0, l);
}
@ -510,7 +510,7 @@ public abstract class AbstractServletClient extends HttpServlet {
checksum[i] = (byte) (n);
n >>>= 8;
}
String etag = "\"" + new String(Base64.encode(checksum)) + "\"";
String etag = "\"" + new String(helma.util.Base64.encode(checksum)) + "\"";
res.setHeader("ETag", etag);
String etagHeader = req.getHeader("If-None-Match");
if (etagHeader != null) {
@ -574,7 +574,7 @@ public abstract class AbstractServletClient extends HttpServlet {
String id = null;
while (id == null || app.getSession(id) != null) {
long l = secureRandom ?
random.nextLong() :
random.nextLong() :
random.nextLong() + Runtime.getRuntime().freeMemory() ^ hashCode();
if (l < 0)
l = -l;
@ -781,7 +781,7 @@ public abstract class AbstractServletClient extends HttpServlet {
key = new String(data, 0, ox, encoding);
ox = 0;
} else {
data[ox++] = c;
data[ox++] = c;
}
break;