Pastebin
Paste #217:
< previous paste - next paste>
Pasted by tdn
Log:
2006-09-24 20:46:19 [INFO][ClientConnection(10)] Got GET request (/testfile)
Exception in thread "Thread-3" java.lang.NullPointerException
at dk.thomasdamgaard.diku.distsys.webserver.ClientConnection.handleGetRequest(ClientConnection.java:360)
at dk.thomasdamgaard.diku.distsys.webserver.ClientConnection.run(ClientConnection.java:276)
at java.lang.Thread.run(Unknown Source)
Code snippet fra linie 360 og frem i ClientConnection.java:
if (cache.contains(uri)) {
CacheItem cf = cache.get(uri);
// and if the cache is expired
if (cf.getExpireTime() > System.currentTimeMillis()) {
// The cached version of the page is not expired.
// Send this to the client
logger.debug("Serving file from cache");
fileContent = cache.get(uri).getBody();
} else {
// The cached version is expired
logger.debug("Cache for " + uri + " is expired");
fileContent = fs.readFile(uri);
CacheItem ci = new CacheItem(uri, fileContent);
cache.add(uri, ci);
}
} else {
// The cached version is either expired or does not exist
// Get a new version from the file server
New Paste
Go to most recent paste.