Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

Added 'final' for all exception blocks as this helps the Java compiler to optimize memory usage

Roland Haeder841a28ae767e
diff --git a/htroot/AccessTracker_p.java b/htroot/AccessTracker_p.java
index d8bd93673..d3b3cee8f 100644
--- a/htroot/AccessTracker_p.java
+++ b/htroot/AccessTracker_p.java
@@ -153,7 +153,7 @@ public class AccessTracker_p {
while (ai.hasNext()) {
try {
query = ai.next();
- } catch (ConcurrentModificationException e) {
+ } catch (final ConcurrentModificationException e) {
break;
}
// put values in template
diff --git a/htroot/Bookmarks.java b/htroot/Bookmarks.java
index 1233deb77..7db0c3a71 100644
--- a/htroot/Bookmarks.java
+++ b/htroot/Bookmarks.java
@@ -196,7 +196,7 @@ public class Bookmarks {
BookmarksDB.Bookmark bookmark = null;
try {
bookmark = sb.bookmarksDB.getBookmark(urlHash);
- } catch (IOException e1) {
+ } catch (final IOException e1) {
}
if (bookmark == null) {
// try to get the bookmark from the LURL database
@@ -313,7 +313,7 @@ public class Bookmarks {
Bookmark bookmark = null;
try {
bookmark = sb.bookmarksDB.getBookmark(it.next());
- } catch (IOException e) {
+ } catch (final IOException e) {
}
if (bookmark != null){
@@ -437,7 +437,7 @@ public class Bookmarks {
Bookmark bookmark = null;
try {
bookmark = sb.bookmarksDB.getBookmark(bit.next());
- } catch (IOException e) {
+ } catch (final IOException e) {
}
if (bookmark == null) break;
prop.put("display_folderlist_" + count + "_folder", "<li><a href=\"" + bookmark.getUrl() + "\" title=\"" + bookmark.getDescription() + "\">" + bookmark.getTitle() + "</a></li>");
diff --git a/htroot/CacheResource_p.java b/htroot/CacheResource_p.java
index f56780d06..3cb2ec835 100644
--- a/htroot/CacheResource_p.java
+++ b/htroot/CacheResource_p.java
@@ -47,7 +47,7 @@ public class CacheResource_p {
DigestURI url;
try {
url = new DigestURI(u);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
ConcurrentLog.logException(e);
return prop;
}
diff --git a/htroot/ConfigHeuristics_p.java b/htroot/ConfigHeuristics_p.java
index b7da94769..8ea27b15c 100644
--- a/htroot/ConfigHeuristics_p.java
+++ b/htroot/ConfigHeuristics_p.java
@@ -130,7 +130,7 @@ public class ConfigHeuristics_p {
}
try {
sb.index.fulltext().getWebgraphConfiguration().commit();
- } catch (IOException e) {
+ } catch (final IOException e) {
}
sb.setConfig(SwitchboardConstants.CORE_SERVICE_WEBGRAPH, true);
}
@@ -144,7 +144,7 @@ public class ConfigHeuristics_p {
if (!osdConfig.exists() && osdDefaultConfig.exists()) {
try {
Files.copy(osdDefaultConfig, osdConfig);
- } catch (IOException ex) {
+ } catch (final IOException ex) {
osderrmsg = "file I/O error during copy";
}
} else {osderrmsg = "config file exists or default doesn't exist";}
@@ -186,7 +186,7 @@ public class ConfigHeuristics_p {
c++;
}
prop.put("osdcfg", c);
- } catch (IOException e1) {
+ } catch (final IOException e1) {
ConcurrentLog.logException(e1);
prop.put("osdcfg", 0);
}
@@ -230,10 +230,10 @@ public class ConfigHeuristics_p {
if (modified) { // save settings to config file if modified
try {
cfg.commit();
- } catch (IOException ex) {
+ } catch (final IOException ex) {
}
}
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
diff --git a/htroot/ContentIntegrationPHPBB3_p.java b/htroot/ContentIntegrationPHPBB3_p.java
index 053fe4c56..0f0cc441b 100644
--- a/htroot/ContentIntegrationPHPBB3_p.java
+++ b/htroot/ContentIntegrationPHPBB3_p.java
@@ -86,7 +86,7 @@ public class ContentIntegrationPHPBB3_p {
prop.putHTML("check_first", db.first().toString());
prop.putHTML("check_last", db.latest().toString());
db.close();
- } catch (Exception e) {
+ } catch (final Exception e) {
ConcurrentLog.logException(e);
prop.put("check", 2);
prop.put("check_error", e.getMessage());
@@ -110,7 +110,7 @@ public class ContentIntegrationPHPBB3_p {
prop.put("export", 1);
prop.put("export_files", files);
db.close();
- } catch (Exception e) {
+ } catch (final Exception e) {
ConcurrentLog.logException(e);
prop.put("export", 2);
prop.put("export_error", e.getMessage());
@@ -135,7 +135,7 @@ public class ContentIntegrationPHPBB3_p {
importer.imp(f);
prop.put("import", 1);
importer.close();
- } catch (Exception e) {
+ } catch (final Exception e) {
ConcurrentLog.logException(e);
prop.put("import", 2);
prop.put("import_error", e.getMessage());
diff --git a/htroot/CrawlCheck_p.java b/htroot/CrawlCheck_p.java
index aaa4247d0..38e661eed 100644
--- a/htroot/CrawlCheck_p.java
+++ b/htroot/CrawlCheck_p.java
@@ -63,7 +63,7 @@ public class CrawlCheck_p {
try {
DigestURI crawlingStartURL = new DigestURI(crawlingStart);
rootURLs.add(crawlingStartURL);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
ConcurrentLog.logException(e);
}
}
diff --git a/htroot/CrawlStartScanner_p.java b/htroot/CrawlStartScanner_p.java
index 80296e8df..b831f9414 100644
--- a/htroot/CrawlStartScanner_p.java
+++ b/htroot/CrawlStartScanner_p.java
@@ -112,7 +112,7 @@ public class CrawlStartScanner_p
ReversibleScoreMap<String> hostscore = null;
try {
hostscore = sb.index.fulltext().getDefaultConnector().getFacets(AbstractSolrConnector.CATCHALL_TERM, 1000, CollectionSchema.host_s.getSolrFieldName()).get(CollectionSchema.host_s.getSolrFieldName());
- } catch (IOException e) {}
+ } catch (final IOException e) {}
if (hostscore != null) {
for (String s: hostscore) hostSet.add(s);
}
@@ -200,7 +200,7 @@ public class CrawlStartScanner_p
try {
uu = u.url();
pkmap.put(uu.hash(), uu);
- } catch ( final MalformedURLException e ) {
+ } catch (final MalformedURLException e ) {
ConcurrentLog.logException(e);
}
}
@@ -265,11 +265,11 @@ public class CrawlStartScanner_p
path,
u.hash());
}
- } catch ( final MalformedURLException e ) {
+ } catch (final MalformedURLException e ) {
ConcurrentLog.logException(e);
}
}
- } catch ( final ConcurrentModificationException e ) {
+ } catch (final ConcurrentModificationException e ) {
}
}
diff --git a/htroot/Crawler_p.java b/htroot/Crawler_p.java
index b0733b786..5253d9e8f 100644
--- a/htroot/Crawler_p.java
+++ b/htroot/Crawler_p.java
@@ -187,7 +187,7 @@ public class Crawler_p {
crawlName += ((crawlingStartURL.getHost() == null) ? crawlingStartURL.toNormalform(true) : crawlingStartURL.getHost()) + ',';
if (crawlingStartURL != null && (crawlingStartURL.isFile() || crawlingStartURL.isSMB())) storeHTCache = false;
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
ConcurrentLog.logException(e);
}
} else {
@@ -292,7 +292,7 @@ public class Crawler_p {
for (DigestURI u: scraper.getAnchors().keySet()) {
newRootURLs.add(u);
}
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -378,7 +378,7 @@ public class Crawler_p {
// before we fire up a new crawl, we make sure that another crawl with the same name is not running
sb.crawler.removeActive(handle);
sb.crawler.removePassive(handle);
- try {sb.crawlQueues.noticeURL.removeByProfileHandle(profile.handle(), 10000);} catch (SpaceExceededException e1) {}
+ try {sb.crawlQueues.noticeURL.removeByProfileHandle(profile.handle(), 10000);} catch (final SpaceExceededException e1) {}
// delete all error urls for that domain
List<byte[]> hosthashes = new ArrayList<byte[]>();
@@ -389,7 +389,7 @@ public class Crawler_p {
for (byte[] hosthash: hosthashes) {
try {
sb.index.fulltext().getDefaultConnector().deleteByQuery(CollectionSchema.host_id_s.getSolrFieldName() + ":\"" + ASCII.String(hosthash) + "\" AND " + CollectionSchema.failreason_s.getSolrFieldName() + ":[* TO *]");
- } catch (IOException e) {ConcurrentLog.logException(e);}
+ } catch (final IOException e) {ConcurrentLog.logException(e);}
}
sb.index.fulltext().commit(true);
diff --git a/htroot/HostBrowser.java b/htroot/HostBrowser.java
index 40c816500..7cfdc8a52 100644
--- a/htroot/HostBrowser.java
+++ b/htroot/HostBrowser.java
@@ -116,7 +116,7 @@ public class HostBrowser {
prop.put("delete", admin && path.length() > 0 ? 1 : 0);
DigestURI pathURI = null;
- try {pathURI = new DigestURI(path);} catch (MalformedURLException e) {}
+ try {pathURI = new DigestURI(path);} catch (final MalformedURLException e) {}
String load = post.get("load", "");
boolean wait = false;
@@ -140,9 +140,9 @@ public class HostBrowser {
prop.put("result", reasonString == null ? ("added url to indexer: " + load) : ("not indexed url '" + load + "': " + reasonString));
if (wait) for (int i = 0; i < 30; i++) {
if (sb.index.exists(ASCII.String(url.hash()))) break;
- try {Thread.sleep(100);} catch (InterruptedException e) {}
+ try {Thread.sleep(100);} catch (final InterruptedException e) {}
}
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
prop.put("result", "bad url '" + load + "'");
}
}
@@ -158,7 +158,7 @@ public class HostBrowser {
ConcurrentLog.info ("HostBrowser:", "delete documents with failtype_s = excl");
prop.putNum("ucount", fulltext.collectionSize());
return prop;
- } catch (IOException ex) {
+ } catch (final IOException ex) {
ConcurrentLog.logException(ex);
}
}
@@ -216,7 +216,7 @@ public class HostBrowser {
}
prop.put("hosts_list", c);
prop.put("hosts", 1);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -331,7 +331,7 @@ public class HostBrowser {
}
lks.set(u, u.length());
}
- } catch (MalformedURLException e) {}
+ } catch (final MalformedURLException e) {}
}
}
if (System.currentTimeMillis() > timeoutList) break;
@@ -422,7 +422,7 @@ public class HostBrowser {
prop.put("files_list_" + c + "_type", 0);
prop.put("files_list_" + c + "_type_url", entry.getKey());
StoreType type = (StoreType) entry.getValue();
- try {uri = new DigestURI(entry.getKey());} catch (MalformedURLException e) {uri = null;}
+ try {uri = new DigestURI(entry.getKey());} catch (final MalformedURLException e) {uri = null;}
HarvestProcess process = uri == null ? null : sb.crawlQueues.urlExists(uri.hash());
boolean loading = load.equals(entry.getKey()) || (process != null && process != HarvestProcess.ERRORS);
boolean error = process == HarvestProcess.ERRORS || type == StoreType.EXCLUDED || type == StoreType.FAILED;
@@ -499,7 +499,7 @@ public class HostBrowser {
prop.put("outbound", 0);
}
- } catch (Throwable e) {
+ } catch (final Throwable e) {
ConcurrentLog.logException(e);
}
}
@@ -549,7 +549,7 @@ public class HostBrowser {
DigestURI u = fulltext.getURL(ASCII.getBytes(id));
if (u != null) references_external_urls.add(u.toNormalform(true));
}
- } catch (IOException e) {
+ } catch (final IOException e) {
}
}
diff --git a/htroot/IndexControlRWIs_p.java b/htroot/IndexControlRWIs_p.java
index 1e7066df3..b85c6c0be 100644
--- a/htroot/IndexControlRWIs_p.java
+++ b/htroot/IndexControlRWIs_p.java
@@ -117,7 +117,7 @@ public class IndexControlRWIs_p {
for ( final String s : urls ) {
try {
urlb.put(s.getBytes());
- } catch ( final SpaceExceededException e ) {
+ } catch (final SpaceExceededException e ) {
ConcurrentLog.logException(e);
}
}
@@ -171,7 +171,7 @@ public class IndexControlRWIs_p {
while ( en.hasNext() ) {
try {
urlb.put(en.next().urlhash());
- } catch ( final SpaceExceededException e ) {
+ } catch (final SpaceExceededException e ) {
ConcurrentLog.logException(e);
}
}
@@ -190,7 +190,7 @@ public class IndexControlRWIs_p {
}
post.remove("keyhashdeleteall");
post.put("urllist", "generated");
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
}
}
@@ -214,7 +214,7 @@ public class IndexControlRWIs_p {
for ( final byte[] b : urlb ) {
try {
urlHashes.put(b);
- } catch ( final SpaceExceededException e ) {
+ } catch (final SpaceExceededException e ) {
ConcurrentLog.logException(e);
}
}
@@ -223,7 +223,7 @@ public class IndexControlRWIs_p {
// thinks that it was called for a list presentation
post.remove("keyhashdelete");
post.put("urllist", "generated");
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
}
}
@@ -324,7 +324,7 @@ public class IndexControlRWIs_p {
} else {
prop.put("result", "Peer " + host + " not found");
}
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
}
}
@@ -354,7 +354,7 @@ public class IndexControlRWIs_p {
prop.put("keyhashsimilar_rows_" + rows + "_cols", cols);
prop.put("keyhashsimilar_rows", rows + 1);
prop.put("result", "");
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
}
}
@@ -377,7 +377,7 @@ public class IndexControlRWIs_p {
for ( final byte[] b : urlb ) {
try {
urlHashes.put(b);
- } catch ( final SpaceExceededException e ) {
+ } catch (final SpaceExceededException e ) {
ConcurrentLog.logException(e);
}
url = segment.fulltext().getURL(b);
@@ -398,7 +398,7 @@ public class IndexControlRWIs_p {
}
}
pw.close();
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
}
}
@@ -411,7 +411,7 @@ public class IndexControlRWIs_p {
for ( final byte[] b : urlb ) {
try {
urlHashes.put(b);
- } catch ( final SpaceExceededException e ) {
+ } catch (final SpaceExceededException e ) {
ConcurrentLog.logException(e);
}
url = segment.fulltext().getURL(b);
@@ -431,12 +431,12 @@ public class IndexControlRWIs_p {
}
}
pw.close();
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
}
}
try {
segment.termIndex().remove(keyhash, urlHashes);
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
}
}
@@ -652,7 +652,7 @@ public class IndexControlRWIs_p {
false,
0.0d, 0.0d, 0.0d);
final SearchEvent theSearch = SearchEventCache.getEvent(query, sb.peers, sb.tables, null, false, sb.loader, Integer.MAX_VALUE, Long.MAX_VALUE, (int) sb.getConfigLong(SwitchboardConstants.DHT_BURST_ROBINSON, 0), (int) sb.getConfigLong(SwitchboardConstants.DHT_BURST_MULTIWORD, 0));
- if (theSearch.rwiProcess != null && theSearch.rwiProcess.isAlive()) try {theSearch.rwiProcess.join();} catch (InterruptedException e) {}
+ if (theSearch.rwiProcess != null && theSearch.rwiProcess.isAlive()) try {theSearch.rwiProcess.join();} catch (final InterruptedException e) {}
if (theSearch.local_rwi_available.get() == 0) {
prop.put("searchresult", 2);
prop.put("searchresult_wordhash", keyhash);
diff --git a/htroot/IndexControlURLs_p.java b/htroot/IndexControlURLs_p.java
index 1cb080a3f..19a3c7ee7 100644
--- a/htroot/IndexControlURLs_p.java
+++ b/htroot/IndexControlURLs_p.java
@@ -144,17 +144,17 @@ public class IndexControlURLs_p {
// delete everything
if ( post.containsKey("deletecomplete") ) {
if ( post.get("deleteIndex", "").equals("on") ) {
- try {segment.fulltext().clearURLIndex();} catch (IOException e) {}
- try {segment.fulltext().clearLocalSolr();} catch (IOException e) {}
+ try {segment.fulltext().clearURLIndex();} catch (final IOException e) {}
+ try {segment.fulltext().clearLocalSolr();} catch (final IOException e) {}
}
if ( post.get("deleteRemoteSolr", "").equals("on")) {
- try {segment.fulltext().clearRemoteSolr();} catch (IOException e) {}
+ try {segment.fulltext().clearRemoteSolr();} catch (final IOException e) {}
}
if ( post.get("deleteRWI", "").equals("on")) {
- if (segment.termIndex() != null) try {segment.termIndex().clear();} catch (IOException e) {}
+ if (segment.termIndex() != null) try {segment.termIndex().clear();} catch (final IOException e) {}
}
if ( post.get("deleteCitation", "").equals("on")) {
- if (segment.urlCitation() != null) try {segment.urlCitation().clear();} catch (IOException e) {}
+ if (segment.urlCitation() != null) try {segment.urlCitation().clear();} catch (final IOException e) {}
}
if ( post.get("deleteCrawlQueues", "").equals("on") ) {
sb.crawlQueues.clear();
@@ -168,7 +168,7 @@ public class IndexControlURLs_p {
Cache.clear();
}
if ( post.get("deleteRobots", "").equals("on") ) {
- try {sb.robots.clear();} catch (IOException e) {}
+ try {sb.robots.clear();} catch (final IOException e) {}
}
if ( post.get("deleteSearchFl", "").equals("on") ) {
sb.tables.clear(WorkTables.TABLE_SEARCH_FAILURE_NAME);
diff --git a/htroot/IndexDeletion_p.java b/htroot/IndexDeletion_p.java
index 6c47457bb..7daf62548 100644
--- a/htroot/IndexDeletion_p.java
+++ b/htroot/IndexDeletion_p.java
@@ -94,7 +94,7 @@ public class IndexDeletion_p {
c++;
}
prop.put("collectiondelete-select_list", c );
- } catch (IOException e1) {
+ } catch (final IOException e1) {
prop.put("collectiondelete-select", 0);
}
} else {
@@ -137,9 +137,9 @@ public class IndexDeletion_p {
String url = (String) doc.getFieldValue(CollectionSchema.sku.getSolrFieldName());
if (url.startsWith(urlStub)) ids.add((String) doc.getFieldValue(CollectionSchema.id.getSolrFieldName()));
}
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
}
- } catch (MalformedURLException e) {}
+ } catch (final MalformedURLException e) {}
}
if (simulate) {
@@ -156,14 +156,14 @@ public class IndexDeletion_p {
if (simulate) {
try {
count = (int) defaultConnector.getCountByQuery(regexquery);
- } catch (IOException e) {
+ } catch (final IOException e) {
}
prop.put("urldelete-active", count == 0 ? 2 : 1);
} else {
try {
defaultConnector.deleteByQuery(regexquery);
sb.tables.recordAPICall(post, "IndexDeletion_p.html", WorkTables.TABLE_API_TYPE_DELETION, "deletion, regex match = " + urldelete);
- } catch (IOException e) {
+ } catch (final IOException e) {
}
prop.put("urldelete-active", 2);
}
@@ -181,7 +181,7 @@ public class IndexDeletion_p {
if (simulate) {
try {
count = (int) defaultConnector.getCountByQuery(collection1Query);
- } catch (IOException e) {
+ } catch (final IOException e) {
}
prop.put("timedelete-active", count == 0 ? 2 : 1);
} else {
@@ -189,7 +189,7 @@ public class IndexDeletion_p {
defaultConnector.deleteByQuery(collection1Query);
webgraphConnector.deleteByQuery(webgraphQuery);
sb.tables.recordAPICall(post, "IndexDeletion_p.html", WorkTables.TABLE_API_TYPE_DELETION, "deletion, docs older than " + timedelete_number + " " + timedelete_unit);
- } catch (IOException e) {
+ } catch (final IOException e) {
}
prop.put("timedelete-active", 2);
}
@@ -203,14 +203,14 @@ public class IndexDeletion_p {
if (simulate) {
try {
count = (int) defaultConnector.getCountByQuery(query);
- } catch (IOException e) {
+ } catch (final IOException e) {
}
prop.put("collectiondelete-active", count == 0 ? 2 : 1);
} else {
try {
defaultConnector.deleteByQuery(query);
sb.tables.recordAPICall(post, "IndexDeletion_p.html", WorkTables.TABLE_API_TYPE_DELETION, "deletion, collection " + collectiondelete);
- } catch (IOException e) {
+ } catch (final IOException e) {
}
prop.put("collectiondelete-active", 2);
}
@@ -222,14 +222,14 @@ public class IndexDeletion_p {
if (simulate) {
try {
count = (int) defaultConnector.getCountByQuery(querydelete);
- } catch (IOException e) {
+ } catch (final IOException e) {
}
prop.put("querydelete-active", count == 0 ? 2 : 1);
} else {
try {
defaultConnector.deleteByQuery(querydelete);
sb.tables.recordAPICall(post, "IndexDeletion_p.html", WorkTables.TABLE_API_TYPE_DELETION, "deletion, solr query, q = " + querydelete);
- } catch (IOException e) {
+ } catch (final IOException e) {
}
prop.put("querydelete-active", 2);
}
diff --git a/htroot/IndexFederated_p.java b/htroot/IndexFederated_p.java
index cb70634ff..673c54d07 100644
--- a/htroot/IndexFederated_p.java
+++ b/htroot/IndexFederated_p.java
@@ -56,7 +56,7 @@ public class IndexFederated_p {
final int wordCacheMaxCount = (int) sb.getConfigLong(SwitchboardConstants.WORDCACHE_MAX_COUNT, 20000);
final long fileSizeMax = (OS.isWindows) ? sb.getConfigLong("filesize.max.win", Integer.MAX_VALUE) : sb.getConfigLong( "filesize.max.other", Integer.MAX_VALUE);
sb.index.connectRWI(wordCacheMaxCount, fileSizeMax);
- } catch (IOException e) { ConcurrentLog.logException(e); } // switch on
+ } catch (final IOException e) { ConcurrentLog.logException(e); } // switch on
boolean post_core_citation = post.getBoolean(SwitchboardConstants.CORE_SERVICE_CITATION);
final boolean previous_core_citation = sb.index.connectedCitation() && env.getConfigBool(SwitchboardConstants.CORE_SERVICE_CITATION, false);
@@ -66,7 +66,7 @@ public class IndexFederated_p {
final int wordCacheMaxCount = (int) sb.getConfigLong(SwitchboardConstants.WORDCACHE_MAX_COUNT, 20000);
final long fileSizeMax = (OS.isWindows) ? sb.getConfigLong("filesize.max.win", Integer.MAX_VALUE) : sb.getConfigLong( "filesize.max.other", Integer.MAX_VALUE);
sb.index.connectCitation(wordCacheMaxCount, fileSizeMax);
- } catch (IOException e) { ConcurrentLog.logException(e); } // switch on
+ } catch (final IOException e) { ConcurrentLog.logException(e); } // switch on
boolean post_core_fulltext = post.getBoolean(SwitchboardConstants.CORE_SERVICE_FULLTEXT);
final boolean previous_core_fulltext = sb.index.fulltext().connectedLocalSolr() && env.getConfigBool(SwitchboardConstants.CORE_SERVICE_FULLTEXT, false);
@@ -80,7 +80,7 @@ public class IndexFederated_p {
if (!previous_core_fulltext && post_core_fulltext) {
// switch on
sb.index.connectUrlDb(sb.useTailCache, sb.exceed134217727);
- try { sb.index.fulltext().connectLocalSolr(); } catch (IOException e) { ConcurrentLog.logException(e); }
+ try { sb.index.fulltext().connectLocalSolr(); } catch (final IOException e) { ConcurrentLog.logException(e); }
}
boolean webgraph = post.getBoolean(SwitchboardConstants.CORE_SERVICE_WEBGRAPH);
@@ -118,7 +118,7 @@ public class IndexFederated_p {
// switch off
try {
sb.index.fulltext().disconnectRemoteSolr();
- } catch (Throwable e) {
+ } catch (final Throwable e) {
ConcurrentLog.logException(e);
}
}
@@ -138,11 +138,11 @@ public class IndexFederated_p {
ConcurrentLog.logException(e);
try {
sb.index.fulltext().disconnectRemoteSolr();
- } catch (Throwable ee) {
+ } catch (final Throwable ee) {
ConcurrentLog.logException(ee);
}
}
- } catch (SolrException e) {
+ } catch (final SolrException e) {
ConcurrentLog.severe("IndexFederated_p", "change of solr connection failed", e);
}
diff --git a/htroot/IndexSchema_p.java b/htroot/IndexSchema_p.java
index 6f75a35a4..fb26239a7 100644
--- a/htroot/IndexSchema_p.java
+++ b/htroot/IndexSchema_p.java
@@ -73,7 +73,7 @@ public class IndexSchema_p {
sb.index.fulltext().getDefaultConfiguration().commit();
sb.index.fulltext().getWebgraphConfiguration().commit();
modified = false;
- } catch (IOException ex) {}
+ } catch (final IOException ex) {}
}
}
@@ -93,7 +93,7 @@ public class IndexSchema_p {
etr.setEnable(solrConfigurationInit.contains(etr.key()));
}
cs.commit();
- } catch (IOException ex) {
+ } catch (final IOException ex) {
ConcurrentLog.warn("IndexSchema", "file " + solrInitFile.getAbsolutePath() + " not found");
}
}
diff --git a/htroot/RankingSolr_p.java b/htroot/RankingSolr_p.java
index fe2ac34ae..4eeb8db0c 100644
--- a/htroot/RankingSolr_p.java
+++ b/htroot/RankingSolr_p.java
@@ -56,7 +56,7 @@ public class RankingSolr_p {
float boost = Float.parseFloat(fieldValue);
if (boostString.length() > 0) boostString.append(',');
boostString.append(field.getSolrFieldName()).append('^').append(Float.toString(boost));
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
continue;
}
}
diff --git a/htroot/RegexTest.java b/htroot/RegexTest.java
index d4dc398a6..6902e93af 100644
--- a/htroot/RegexTest.java
+++ b/htroot/RegexTest.java
@@ -34,7 +34,7 @@ public class RegexTest {
Boolean match = null;
try {
match = text.matches(regex);
- } catch (PatternSyntaxException e) {
+ } catch (final PatternSyntaxException e) {
error = e.getMessage();
}
diff --git a/htroot/ServerScannerList.java b/htroot/ServerScannerList.java
index 563523df3..af5e23f0f 100644
--- a/htroot/ServerScannerList.java
+++ b/htroot/ServerScannerList.java
@@ -78,14 +78,14 @@ public class ServerScannerList {
prop.put("servertable_list_" + i + "_process", Scanner.inIndex(apiCommentCache, urlString) == null ? 0 : 1);
prop.put("servertable_list_" + i + "_edit_preselected", host.getValue() == Access.granted && Scanner.inIndex(apiCommentCache, urlString) == null ? 1 : 0);
i++;
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
ConcurrentLog.logException(e);
}
}
prop.put("servertable_list", i);
prop.put("servertable_edit_num", i);
break table;
- } catch (ConcurrentModificationException e) {
+ } catch (final ConcurrentModificationException e) {
continue table;
}
}
diff --git a/htroot/Table_API_p.java b/htroot/Table_API_p.java
index a477760c8..6b3689343 100644
--- a/htroot/Table_API_p.java
+++ b/htroot/Table_API_p.java
@@ -144,7 +144,7 @@ public class Table_API_p {
WorkTables.calculateAPIScheduler(row, false);
sb.tables.update(WorkTables.TABLE_API_NAME, row);
}
- } catch (Throwable e) { ConcurrentLog.logException(e); }
+ } catch (final Throwable e) { ConcurrentLog.logException(e); }
}
if (post != null && !post.get("deleterows", "").isEmpty()) {
@@ -152,7 +152,7 @@ public class Table_API_p {
if (entry.getValue().startsWith("mark_")) {
try {
sb.tables.delete(WorkTables.TABLE_API_NAME, entry.getValue().substring(5).getBytes());
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -191,7 +191,7 @@ public class Table_API_p {
}
}
sb.tables.recordAPICall(post, "Table_API_p.html", WorkTables.TABLE_API_TYPE_STEERING, "delete API calls older than " + days + " days");
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -368,7 +368,7 @@ public class Table_API_p {
} else {
prop.put("showschedulerhint", 0);
}
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
prop.put("showtable_list", count);
diff --git a/htroot/Table_YMark_p.java b/htroot/Table_YMark_p.java
index e32e8962c..d02d935cd 100644
--- a/htroot/Table_YMark_p.java
+++ b/htroot/Table_YMark_p.java
@@ -83,9 +83,9 @@ public class Table_YMark_p {
count++;
}
prop.put("showselection_folders", count);
- } catch (IOException e) {
+ } catch (final IOException e) {
Log.logException(e);
- } catch (RowSpaceExceededException e) {
+ } catch (final RowSpaceExceededException e) {
Log.logException(e);
}
*/
@@ -139,7 +139,7 @@ public class Table_YMark_p {
if (!post.get("rebuildindex", "").isEmpty()) try {
sb.tables.bookmarks.folders.rebuildIndex(bmk_user);
sb.tables.bookmarks.tags.rebuildIndex(bmk_user);
- } catch (IOException e) {
+ } catch (final IOException e) {
Log.logException(e);
}
*/
diff --git a/htroot/Threaddump_p.java b/htroot/Threaddump_p.java
index ba8c37e28..c60ef6d0f 100644
--- a/htroot/Threaddump_p.java
+++ b/htroot/Threaddump_p.java
@@ -75,7 +75,7 @@ public class Threaddump_p {
for (int i = 0; i < multipleCount; i++) {
try {
traces.add(ThreadDump.getAllStackTraces());
- } catch (OutOfMemoryError e) {
+ } catch (final OutOfMemoryError e) {
break;
}
}
@@ -86,7 +86,7 @@ public class Threaddump_p {
if (ThreadDump.canProduceLockedBy(logFile)) {
try {
new ThreadDump(logFile).appendBlockTraces(buffer, plain);
- } catch (IOException e) {
+ } catch (final IOException e) {
e.printStackTrace();
}
} else if (OS.canExecUnix) {
diff --git a/htroot/Triple_p.java b/htroot/Triple_p.java
index aba2cd271..11cee0daf 100644
--- a/htroot/Triple_p.java
+++ b/htroot/Triple_p.java
@@ -77,9 +77,9 @@ public class Triple_p {
System.out.println (newurl);
}
JenaTripleStore.load(newurl);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
ConcurrentLog.logException(e);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -132,7 +132,7 @@ public class Triple_p {
}
- } catch (Exception e) {
+ } catch (final Exception e) {
prop.putHTML("mode_rdfdump", "error");
}
diff --git a/htroot/Vocabulary_p.java b/htroot/Vocabulary_p.java
index 8b35afb8c..baaeddf87 100644
--- a/htroot/Vocabulary_p.java
+++ b/htroot/Vocabulary_p.java
@@ -60,7 +60,7 @@ public class Vocabulary_p {
if (discovername != null && discovername.length() > 0) {
String discoverobjectspace = post.get("discoverobjectspace", "");
MultiProtocolURI discoveruri = null;
- if (discoverobjectspace.length() > 0) try {discoveruri = new MultiProtocolURI(discoverobjectspace);} catch (MalformedURLException e) {}
+ if (discoverobjectspace.length() > 0) try {discoveruri = new MultiProtocolURI(discoverobjectspace);} catch (final MalformedURLException e) {}
if (discoveruri == null) discoverobjectspace = "";
Map<String, Tagging.SOTuple> table = new TreeMap<String, Tagging.SOTuple>();
File propFile = LibraryProvider.autotagging.getVocabularyFile(discovername);
@@ -132,7 +132,7 @@ public class Vocabulary_p {
String objectlink = post.get("newobjectlink", "");
if (objectlink.length() > 0) try {
objectlink = new MultiProtocolURI(objectlink).toNormalform(true);
- } catch (MalformedURLException e) {}
+ } catch (final MalformedURLException e) {}
vocabulary.put(post.get("newterm", ""), post.get("newsynonyms", ""), objectlink);
}
@@ -166,7 +166,7 @@ public class Vocabulary_p {
vocabularyName = null;
}
}
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
diff --git a/htroot/YMarks.java b/htroot/YMarks.java
index 6f8f1dd6e..7b3b99d1a 100644
--- a/htroot/YMarks.java
+++ b/htroot/YMarks.java
@@ -38,8 +38,8 @@ public class YMarks {
try {
bmk_row = sb.tables.select(bmk_table, urlHash);
rdf.addBookmark(bmk_user, bmk_row);
- } catch (IOException e) {
- } catch (SpaceExceededException e) {
+ } catch (final IOException e) {
+ } catch (final SpaceExceededException e) {
}
}
} else {
@@ -52,7 +52,7 @@ public class YMarks {
try {
// TODO select only public bookmarks
rdf.addBookmarks(bmk_user, sb.tables.iterator(bmk_table));
- } catch (IOException e) {
+ } catch (final IOException e) {
// TODO exception handling
}
}
@@ -68,7 +68,7 @@ public class YMarks {
int size;
try {
size = sb.tables.bookmarks.getSize(bmk_user);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
size = 0;
}
diff --git a/htroot/api/bookmarks/get_bookmarks.java b/htroot/api/bookmarks/get_bookmarks.java
index 21059dd2a..4b3c724a0 100644
--- a/htroot/api/bookmarks/get_bookmarks.java
+++ b/htroot/api/bookmarks/get_bookmarks.java
@@ -187,7 +187,7 @@ public class get_bookmarks {
count++;
}
- } catch (IOException e) {
+ } catch (final IOException e) {
}
}
// eliminate the trailing comma for Json output
@@ -285,7 +285,7 @@ public class get_bookmarks {
count++;
prop.put("display_xbel_"+count+"_elements", "</bookmark>");
count++;
- } catch (IOException e) {
+ } catch (final IOException e) {
}
}
return count;
diff --git a/htroot/api/bookmarks/get_folders.java b/htroot/api/bookmarks/get_folders.java
index 5f8eb0e26..90f44efe7 100644
--- a/htroot/api/bookmarks/get_folders.java
+++ b/htroot/api/bookmarks/get_folders.java
@@ -93,7 +93,7 @@ public class get_folders {
prop.put("folders_"+count+"_hasChildren", "false");
prop.put("folders_"+count+"_comma", ",");
count++;
- } catch (IOException e) {
+ } catch (final IOException e) {
}
}
diff --git a/htroot/api/bookmarks/posts/all.java b/htroot/api/bookmarks/posts/all.java
index 4ae815c19..2a3b63dd1 100644
--- a/htroot/api/bookmarks/posts/all.java
+++ b/htroot/api/bookmarks/posts/all.java
@@ -48,7 +48,7 @@ public class all {
prop.put("posts_"+count+"_isExtended_private", Boolean.toString(!bookmark.getPublic()));
}
count++;
- } catch (IOException e) {
+ } catch (final IOException e) {
}
}
prop.put("posts", count);
diff --git a/htroot/api/bookmarks/posts/get.java b/htroot/api/bookmarks/posts/get.java
index 9ec1dace7..f95cd391c 100644
--- a/htroot/api/bookmarks/posts/get.java
+++ b/htroot/api/bookmarks/posts/get.java
@@ -66,7 +66,7 @@ public class get {
}
count++;
}
- } catch (IOException e) {
+ } catch (final IOException e) {
}
}
prop.put("posts", count);
diff --git a/htroot/api/bookmarks/tags/addTag_p.java b/htroot/api/bookmarks/tags/addTag_p.java
index 5b966abe1..89efe0833 100644
--- a/htroot/api/bookmarks/tags/addTag_p.java
+++ b/htroot/api/bookmarks/tags/addTag_p.java
@@ -28,7 +28,7 @@ public class addTag_p {
bm = switchboard.bookmarksDB.getBookmark(post.get("urlhash"));
bm.addTag(post.get("addTag"));
prop.put("result", "1");//success
- } catch (IOException e) {
+ } catch (final IOException e) {
prop.put("result", "0");//success
}
}
diff --git a/htroot/api/bookmarks/xbel/xbel.java b/htroot/api/bookmarks/xbel/xbel.java
index c66986d1d..eaa4b408d 100644
--- a/htroot/api/bookmarks/xbel/xbel.java
+++ b/htroot/api/bookmarks/xbel/xbel.java
@@ -138,7 +138,7 @@ public class xbel {
count++;
prop.put("xbel_"+count+"_elements", "</bookmark>");
count++;
- } catch (IOException e) {
+ } catch (final IOException e) {
}
}
return count;
diff --git a/htroot/api/citation.java b/htroot/api/citation.java
index 573e29af8..e77e44746 100644
--- a/htroot/api/citation.java
+++ b/htroot/api/citation.java
@@ -83,7 +83,7 @@ public class citation {
try {
uri = new DigestURI(url, null);
hash = ASCII.String(uri.hash());
- } catch (MalformedURLException e) {}
+ } catch (final MalformedURLException e) {}
}
if (uri == null && hash.length() > 0) {
uri = sb.getURL(ASCII.getBytes(hash));
@@ -100,7 +100,7 @@ public class citation {
SolrDocument doc;
try {
doc = segment.fulltext().getDefaultConnector().getDocumentById(hash, CollectionSchema.title.getSolrFieldName(), CollectionSchema.text_t.getSolrFieldName());
- } catch (IOException e1) {
+ } catch (final IOException e1) {
return prop;
}
@SuppressWarnings("unchecked")
@@ -135,11 +135,11 @@ public class citation {
String u = (String) d.getFieldValue(CollectionSchema.sku.getSolrFieldName());
if (u == null || u.equals(url)) continue;
scores.inc(u);
- try {list.add(new DigestURI(u, null));} catch (MalformedURLException e) {}
+ try {list.add(new DigestURI(u, null));} catch (final MalformedURLException e) {}
}
sentenceOcc.put(sentence, list);
}
- } catch (Throwable ee) {
+ } catch (final Throwable ee) {
}
}
@@ -178,7 +178,7 @@ public class citation {
}
prop.put("citations_" + i + "_dd", dd.toString());
i++;
- } catch (MalformedURLException e) {}
+ } catch (final MalformedURLException e) {}
}
prop.put("citations", i);
@@ -191,7 +191,7 @@ public class citation {
if (uu.getOrganization().equals(uri.getOrganization())) continue;
prop.put("similar_links_" + i + "_url", u);
i++;
- } catch (MalformedURLException e) {}
+ } catch (final MalformedURLException e) {}
}
prop.put("similar_links", i);
prop.put("similar", i > 0 ? 1 : 0);
diff --git a/htroot/api/timeline.java b/htroot/api/timeline.java
index 75bdcba41..ce068ecf6 100644
--- a/htroot/api/timeline.java
+++ b/htroot/api/timeline.java
@@ -87,7 +87,7 @@ public final class timeline {
TermSearch<WordReference> search = null;
try {
search = segment.termIndex().query(q, qg.getExcludeHashes(), null, Segment.wordReferenceFactory, maxdist);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
}
ReferenceContainer<WordReference> index = search.joined();
diff --git a/htroot/api/webstructure.java b/htroot/api/webstructure.java
index ba95001d3..1720b5a6f 100644
--- a/htroot/api/webstructure.java
+++ b/htroot/api/webstructure.java
@@ -71,7 +71,7 @@ public class webstructure {
url = new DigestURI(about.indexOf("://") >= 0 ? about : "http://" + about); // accept also domains
urlhash = url.hash();
hosthash = ASCII.String(urlhash, 6, 6);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
}
}
if (hosthash != null) {
@@ -142,7 +142,7 @@ public class webstructure {
// citationReferences.count(urlhash) would give to the number of references good for ranking
try {
citations = citationReferences != null ? citationReferences.get(urlhash, null) : null;
- } catch (IOException e) {
+ } catch (final IOException e) {
}
if (citations != null) {
prop.put("citations_count", 1);
diff --git a/htroot/api/ymarks/import_ymark.java b/htroot/api/ymarks/import_ymark.java
index 9a2ed0795..daceeefb4 100644
--- a/htroot/api/ymarks/import_ymark.java
+++ b/htroot/api/ymarks/import_ymark.java
@@ -195,7 +195,7 @@ public class import_ymark {
} catch (final IOException e) {
ConcurrentLog.logException(e);
}
- } catch (IOException e1) {
+ } catch (final IOException e1) {
}
}
} else if(post.containsKey("importer") && post.get("importer").equals("dmoz")) {
@@ -220,7 +220,7 @@ public class import_ymark {
InstantBusyThread.oneTimeJob(DMOZImporter.getConsumer(sb, bmk_user, autoTaggingQueue, autotag, empty, indexing, medialink), 0);
prop.put("status", "1");
- } catch (Exception e) {
+ } catch (final Exception e) {
ConcurrentLog.logException(e);
}
}
diff --git a/htroot/api/ynetSearch.java b/htroot/api/ynetSearch.java
index 9a65089a4..cc6cd23f6 100644
--- a/htroot/api/ynetSearch.java
+++ b/htroot/api/ynetSearch.java
@@ -48,11 +48,11 @@ public class ynetSearch {
is = url.openStream();
final String httpout = new Scanner(is).useDelimiter( "\\Z" ).next();
prop.put("http", httpout);
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
prop.put("url", "error!");
} finally {
if ( is != null )
- try { is.close(); } catch ( final IOException e ) { }
+ try { is.close(); } catch (final IOException e ) { }
}
}
return prop;
diff --git a/htroot/gsa/searchresult.java b/htroot/gsa/searchresult.java
index 1ef6fb6d3..a3b1fb45c 100644
--- a/htroot/gsa/searchresult.java
+++ b/htroot/gsa/searchresult.java
@@ -186,7 +186,7 @@ public class searchresult {
SolrQueryRequest req = connector.request(post.toSolrParams(null));
SolrQueryResponse response = null;
Exception e = null;
- try {response = connector.query(req);} catch (SolrException ee) {e = ee;}
+ try {response = connector.query(req);} catch (final SolrException ee) {e = ee;}
if (response != null) e = response.getException();
if (e != null) {
ConcurrentLog.logException(e);
@@ -211,11 +211,11 @@ public class searchresult {
try {
responseWriter.write(ow, req, response);
ow.flush();
- } catch (IOException e1) {
+ } catch (final IOException e1) {
} finally {
req.close();
SolrRequestInfo.clearRequestInfo();
- try {ow.close();} catch (IOException e1) {}
+ try {ow.close();} catch (final IOException e1) {}
}
// log result
diff --git a/htroot/interaction/GetRDF.java b/htroot/interaction/GetRDF.java
index 88e1003a8..4c704c7df 100644
--- a/htroot/interaction/GetRDF.java
+++ b/htroot/interaction/GetRDF.java
@@ -68,7 +68,7 @@ public class GetRDF {
try {
prop.put("resultXML", fout.toString(UTF8.charset.name()));
- } catch (UnsupportedEncodingException e) {
+ } catch (final UnsupportedEncodingException e) {
}
} else {
@@ -83,7 +83,7 @@ public class GetRDF {
try {
prop.put("resultXML", fout.toString(UTF8.charset.name()));
- } catch (UnsupportedEncodingException e) {
+ } catch (final UnsupportedEncodingException e) {
}
} else {
diff --git a/htroot/processing/domaingraph/applet/domaingraph.java b/htroot/processing/domaingraph/applet/domaingraph.java
index c7759fd29..1e04d0b4f 100644
--- a/htroot/processing/domaingraph/applet/domaingraph.java
+++ b/htroot/processing/domaingraph/applet/domaingraph.java
@@ -53,7 +53,7 @@ public void setup() {
URL url = null;
try {
url = getDocumentBase();
- } catch (NullPointerException e) {}
+ } catch (final NullPointerException e) {}
if (url == null) {
host="localhost";
port=8090;
@@ -163,7 +163,7 @@ public void processCitation(String host, HashMap props) {
String id = (String) props.get("id"); if (id == null) id = "";
try {
String counts = (String) props.get("count"); if (counts != null) count = Integer.parseInt(counts);
- } catch (NumberFormatException e) {}
+ } catch (final NumberFormatException e) {}
// find the two nodes that have a relation
host h = (host) nodes.get(id);
if (h == null) {
diff --git a/htroot/solr/select.java b/htroot/solr/select.java
index 0a1dd1605..735a99a07 100644
--- a/htroot/solr/select.java
+++ b/htroot/solr/select.java
@@ -77,7 +77,7 @@ public class select {
private static SolrServlet solrServlet = new SolrServlet();
private final static Map<String, QueryResponseWriter> RESPONSE_WRITER = new HashMap<String, QueryResponseWriter>();
static {
- try {solrServlet.init(null);} catch (ServletException e) {}
+ try {solrServlet.init(null);} catch (final ServletException e) {}
RESPONSE_WRITER.putAll(SolrCore.DEFAULT_RESPONSE_WRITERS);
XSLTResponseWriter xsltWriter = new XSLTResponseWriter();
OpensearchResponseWriter opensearchResponseWriter = new OpensearchResponseWriter();
@@ -218,7 +218,7 @@ public class select {
SolrQueryRequest req = connector.request(params);
SolrQueryResponse response = null;
Exception e = null;
- try {response = connector.query(req);} catch (SolrException ee) {e = ee;}
+ try {response = connector.query(req);} catch (final SolrException ee) {e = ee;}
if (response != null) e = response.getException();
if (e != null) {
ConcurrentLog.logException(e);
@@ -232,11 +232,11 @@ public class select {
try {
responseWriter.write(ow, req, response);
ow.flush();
- } catch (IOException e1) {
+ } catch (final IOException e1) {
} finally {
req.close();
SolrRequestInfo.clearRequestInfo();
- try {ow.close();} catch (IOException e1) {}
+ try {ow.close();} catch (final IOException e1) {}
}
// log result
diff --git a/htroot/suggest.java b/htroot/suggest.java
index be0b409f7..d9a1a53be 100644
--- a/htroot/suggest.java
+++ b/htroot/suggest.java
@@ -85,7 +85,7 @@ public class suggest {
}
prop.put("suggestions_" + c + "_eol", 0);
c++;
- } catch (ConcurrentModificationException e) {}
+ } catch (final ConcurrentModificationException e) {}
}
}
}
diff --git a/htroot/yacy/search.java b/htroot/yacy/search.java
index cc9793738..ad4dd94c6 100644
--- a/htroot/yacy/search.java
+++ b/htroot/yacy/search.java
@@ -284,8 +284,8 @@ public final class search {
} else {
// retrieve index containers from search request
RowHandleSet allHashes = new RowHandleSet(WordReferenceRow.urlEntryRow.primaryKeyLength, WordReferenceRow.urlEntryRow.objectOrder, 0);
- try {allHashes.putAll(queryhashes);} catch (SpaceExceededException e) {}
- try {allHashes.putAll(excludehashes);} catch (SpaceExceededException e) {}
+ try {allHashes.putAll(queryhashes);} catch (final SpaceExceededException e) {}
+ try {allHashes.putAll(excludehashes);} catch (final SpaceExceededException e) {}
QueryGoal qg = new QueryGoal(queryhashes, excludehashes, allHashes);
theQuery = new QueryParams(
qg,
@@ -322,7 +322,7 @@ public final class search {
// make event
theSearch = SearchEventCache.getEvent(theQuery, sb.peers, sb.tables, null, abstracts.length() > 0, sb.loader, count, maxtime, (int) sb.getConfigLong(SwitchboardConstants.DHT_BURST_ROBINSON, 0), (int) sb.getConfigLong(SwitchboardConstants.DHT_BURST_MULTIWORD, 0));
- if (theSearch.rwiProcess != null && theSearch.rwiProcess.isAlive()) try {theSearch.rwiProcess.join();} catch (InterruptedException e) {}
+ if (theSearch.rwiProcess != null && theSearch.rwiProcess.isAlive()) try {theSearch.rwiProcess.join();} catch (final InterruptedException e) {}
// set statistic details of search result and find best result index set
prop.put("joincount", Integer.toString(theSearch.getResultCount()));
diff --git a/htroot/yacy/transferRWI.java b/htroot/yacy/transferRWI.java
index fe92ae40e..5d05627fd 100644
--- a/htroot/yacy/transferRWI.java
+++ b/htroot/yacy/transferRWI.java
@@ -214,7 +214,7 @@ public final class transferRWI {
} else {
unknownURL.put(ASCII.getBytes(id));
}
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
sb.getLog().warn("transferRWI: DB-Error while trying to determine if URL with hash '" + id + "' is known.", e);
}
}
diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java
index 37bf24790..12c794eb7 100644
--- a/htroot/yacysearch.java
+++ b/htroot/yacysearch.java
@@ -474,7 +474,7 @@ public class yacysearch {
lat = Double.parseDouble(sp[0]);
lon = Double.parseDouble(sp[1]);
rad = Double.parseDouble(sp[2]);
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
lon = 0.0d; lat = 0.0d; rad = 0.0d;
}
}
@@ -559,7 +559,7 @@ public class yacysearch {
// delete the search history since this still shows the entry
SearchEventCache.delete(delHash);
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
}
}
@@ -580,8 +580,8 @@ public class yacysearch {
sb.loader.request(urlentry.url(), true, false),
CacheStrategy.IFEXIST,
Integer.MAX_VALUE, BlacklistType.SEARCH, TextSnippet.snippetMinLoadDelay, ClientIdentification.DEFAULT_TIMEOUT);
- } catch ( final IOException e ) {
- } catch ( final Parser.Failure e ) {
+ } catch (final IOException e ) {
+ } catch (final Parser.Failure e ) {
}
if ( documents != null ) {
// create a news message
@@ -617,7 +617,7 @@ public class yacysearch {
true,
"searchresult",
"/search");
- } catch ( final Throwable e ) {
+ } catch (final Throwable e ) {
}
}
}
@@ -625,7 +625,7 @@ public class yacysearch {
// check filters
try {
Pattern.compile(urlmask);
- } catch ( final PatternSyntaxException ex ) {
+ } catch (final PatternSyntaxException ex ) {
SearchEvent.log.warn("Illegal URL mask, not a valid regex: " + urlmask);
prop.put("urlmaskerror", 1);
prop.putHTML("urlmaskerror_urlmask", urlmask);
@@ -634,7 +634,7 @@ public class yacysearch {
try {
Pattern.compile(prefermask);
- } catch ( final PatternSyntaxException ex ) {
+ } catch (final PatternSyntaxException ex ) {
SearchEvent.log.warn("Illegal prefer mask, not a valid regex: " + prefermask);
prop.put("prefermaskerror", 1);
prop.putHTML("prefermaskerror_prefermask", prefermask);
@@ -783,9 +783,9 @@ public class yacysearch {
suggestion).toString());
prop.put("didYouMean_suggestions_" + meanCount + "_sep", "|");
meanCount++;
- } catch (ConcurrentModificationException e) {break meanCollect;}
+ } catch (final ConcurrentModificationException e) {break meanCollect;}
}
- } catch (ConcurrentModificationException e) {}
+ } catch (final ConcurrentModificationException e) {}
prop.put("didYouMean_suggestions_" + (meanCount - 1) + "_sep", "");
prop.put("didYouMean", meanCount > 0 ? 1 : 0);
prop.put("didYouMean_suggestions", meanCount);
@@ -829,7 +829,7 @@ public class yacysearch {
if ( MemoryControl.shortStatus() ) {
sb.localSearchTracker.clear();
}
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
ConcurrentLog.logException(e);
}
diff --git a/htroot/yacysearchitem.java b/htroot/yacysearchitem.java
index c9adc6f5d..e59701475 100644
--- a/htroot/yacysearchitem.java
+++ b/htroot/yacysearchitem.java
@@ -169,7 +169,7 @@ public class yacysearchitem {
if (sb.crawlStacker.urlInAcceptedDomain(new DigestURI (modifyURL)) == null) {
modifyURL = "./proxy.html?url="+modifyURL;
}
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
@@ -180,7 +180,7 @@ public class yacysearchitem {
if ((new DigestURI (modifyURL).getHost().endsWith(".yacy"))) {
modifyURL = "./proxy.html?url="+modifyURL;
}
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
diff --git a/libbuild/GitRevTask/GitRevTask.java b/libbuild/GitRevTask/GitRevTask.java
index 87dc77341..78cd8df80 100644
--- a/libbuild/GitRevTask/GitRevTask.java
+++ b/libbuild/GitRevTask/GitRevTask.java
@@ -128,6 +128,6 @@ public class GitRevTask extends org.apache.tools.ant.Task {
w.append("DSTAMP=" + commitDate + "\n");
w.close();
- } catch (IOException ex) {}
+ } catch (final IOException ex) {}
}
}
diff --git a/libbuild/svnRevNr/svnRevNrParser.java b/libbuild/svnRevNr/svnRevNrParser.java
index f21389441..73720f1df 100644
--- a/libbuild/svnRevNr/svnRevNrParser.java
+++ b/libbuild/svnRevNr/svnRevNrParser.java
@@ -47,7 +47,7 @@ public class svnRevNrParser extends org.apache.tools.ant.Task{
FileInputStream input = new FileInputStream(entriesFile);
input.read(data);
dataStr = new String(data);
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new BuildException("Unable to read the SVN entries file '" + this.fileName + "'");
}
diff --git a/source/net/yacy/YaCySearchClient.java b/source/net/yacy/YaCySearchClient.java
index 2306c8496..77db5a4cf 100644
--- a/source/net/yacy/YaCySearchClient.java
+++ b/source/net/yacy/YaCySearchClient.java
@@ -81,10 +81,10 @@ public class YaCySearchClient {
.append(YaCySearchClient.this.offset)
.append("&maximumRecords=10&resource=local&query=")
.append(CommonPattern.SPACE.matcher(YaCySearchClient.this.query).replaceAll("+")).toString();
- try { url = new URL(u); } catch (MalformedURLException e) { throw new IOException (e); }
+ try { url = new URL(u); } catch (final MalformedURLException e) { throw new IOException (e); }
try { doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(url.openStream()); }
- catch (ParserConfigurationException e) { throw new IOException (e); }
- catch (SAXException e) { throw new IOException (e); }
+ catch (final ParserConfigurationException e) { throw new IOException (e); }
+ catch (final SAXException e) { throw new IOException (e); }
final NodeList nodes = doc.getElementsByTagName("item");
for (int i = 0; i < nodes.getLength(); i++)
this.add(new RSSEntry((Element) nodes.item(i)));
@@ -137,7 +137,7 @@ public class YaCySearchClient {
System.out.println("Search result for '" + query + "':");
System.out.print(search.next().toString()); // get 10 results; you may repeat this for next 10
System.out.println("Search Time: " + (System.currentTimeMillis() - t) + " milliseconds\n");
- } catch (IOException e) {
+ } catch (final IOException e) {
e.printStackTrace();
}
}
diff --git a/source/net/yacy/contentcontrol/ContentControlFilterUpdateThread.java b/source/net/yacy/contentcontrol/ContentControlFilterUpdateThread.java
index d938a149a..8f82b8e42 100644
--- a/source/net/yacy/contentcontrol/ContentControlFilterUpdateThread.java
+++ b/source/net/yacy/contentcontrol/ContentControlFilterUpdateThread.java
@@ -67,7 +67,7 @@ public class ContentControlFilterUpdateThread {
}
}
- } catch (IOException e) {
+ } catch (final IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
diff --git a/source/net/yacy/contentcontrol/SMWListImporter.java b/source/net/yacy/contentcontrol/SMWListImporter.java
index 2fa092913..228a5aa57 100644
--- a/source/net/yacy/contentcontrol/SMWListImporter.java
+++ b/source/net/yacy/contentcontrol/SMWListImporter.java
@@ -87,7 +87,7 @@ public class SMWListImporter implements Runnable, ContentHandler{
try {
this.listEntries.put(this.row);
//this.count++;
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
}
this.obj.clear();
@@ -137,16 +137,16 @@ public class SMWListImporter implements Runnable, ContentHandler{
ConcurrentLog.info("SMWLISTSYNC", "Importer run()");
this.parser.parse(this.importFile, this, true);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (ParseException e) {
+ } catch (final ParseException e) {
ConcurrentLog.logException(e);
} finally {
try {
ConcurrentLog.info("SMWLISTSYNC", "Importer inserted poison pill in queue");
this.listEntries.put(SMWListRow.POISON);
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
}
}
@@ -155,7 +155,7 @@ public class SMWListImporter implements Runnable, ContentHandler{
public SMWListRow take() {
try {
return this.listEntries.take();
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
return null;
}
diff --git a/source/net/yacy/contentcontrol/SMWListImporterFormatObsolete.java b/source/net/yacy/contentcontrol/SMWListImporterFormatObsolete.java
index b41d6703d..85351c040 100644
--- a/source/net/yacy/contentcontrol/SMWListImporterFormatObsolete.java
+++ b/source/net/yacy/contentcontrol/SMWListImporterFormatObsolete.java
@@ -42,16 +42,16 @@ public class SMWListImporterFormatObsolete implements Runnable{
this.parseItem (iterator.next());
}
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (ParseException e) {
+ } catch (final ParseException e) {
ConcurrentLog.logException(e);
} finally {
try {
ConcurrentLog.info("SMWLISTSYNC", "Importer inserted poison pill in queue");
this.listEntries.put(SMWListRow.POISON);
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
}
}
@@ -81,7 +81,7 @@ public class SMWListImporterFormatObsolete implements Runnable{
this.listEntries.put(row);
- } catch (Exception e) {
+ } catch (final Exception e) {
ConcurrentLog.info("SMWLISTSYNC", "import of entry failed");
}
@@ -109,7 +109,7 @@ public class SMWListImporterFormatObsolete implements Runnable{
public SMWListRow take() {
try {
return this.listEntries.take();
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
return null;
}
diff --git a/source/net/yacy/contentcontrol/SMWListSyncThread.java b/source/net/yacy/contentcontrol/SMWListSyncThread.java
index f30501f78..f416a615f 100644
--- a/source/net/yacy/contentcontrol/SMWListSyncThread.java
+++ b/source/net/yacy/contentcontrol/SMWListSyncThread.java
@@ -102,10 +102,10 @@ public class SMWListSyncThread {
ConcurrentLog.warn("SMWLISTSYNC",
"No SMWimport URL defined");
}
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
- } catch (IOException e) {
+ } catch (final IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
@@ -145,7 +145,7 @@ public class SMWListSyncThread {
try {
reader = new InputStreamReader(
urlImport.openStream(), "UTF-8");
- } catch (Exception e) {
+ } catch (final Exception e) {
ConcurrentLog.logException(e);
this.runningjob = false;
}
@@ -173,7 +173,7 @@ public class SMWListSyncThread {
dirty = true;
- } catch (Exception e) {
+ } catch (final Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
@@ -183,7 +183,7 @@ public class SMWListSyncThread {
}
- } catch (MalformedURLException e2) {
+ } catch (final MalformedURLException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
}
diff --git a/source/net/yacy/cora/ai/example/testorder.java b/source/net/yacy/cora/ai/example/testorder.java
index 28f40a592..f9a414c5a 100644
--- a/source/net/yacy/cora/ai/example/testorder.java
+++ b/source/net/yacy/cora/ai/example/testorder.java
@@ -53,7 +53,7 @@ public class testorder implements Comparable<testorder> {
while (!q.isEmpty())
try {
System.out.println(q.take().toString());
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
e.printStackTrace();
}
diff --git a/source/net/yacy/cora/ai/greedy/Agent.java b/source/net/yacy/cora/ai/greedy/Agent.java
index 0dd211298..c6e68d140 100644
--- a/source/net/yacy/cora/ai/greedy/Agent.java
+++ b/source/net/yacy/cora/ai/greedy/Agent.java
@@ -146,7 +146,7 @@ public class Agent<
// they will attempt to assign different priorities as rankings from the
// leaf of the search tree. Therefore the findings must be cloned.
finding = (SpecificFinding) getResultFinding().clone();
- } catch (CloneNotSupportedException e) {
+ } catch (final CloneNotSupportedException e) {
e.printStackTrace();
}
finding.setPriority(this.model.getRanking(this.pathlength, this.context.initialRole()));
diff --git a/source/net/yacy/cora/ai/greedy/Attempts.java b/source/net/yacy/cora/ai/greedy/Attempts.java
index e2beb926a..f4254d75d 100644
--- a/source/net/yacy/cora/ai/greedy/Attempts.java
+++ b/source/net/yacy/cora/ai/greedy/Attempts.java
@@ -55,7 +55,7 @@ public class Attempts<SpecificRole extends Role> {
try {
q.put(element);
this.stack.put(weight, q);
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
e.printStackTrace();
}
}
diff --git a/source/net/yacy/cora/ai/greedy/Context.java b/source/net/yacy/cora/ai/greedy/Context.java
index ebcf48065..3deb4a06f 100644
--- a/source/net/yacy/cora/ai/greedy/Context.java
+++ b/source/net/yacy/cora/ai/greedy/Context.java
@@ -157,7 +157,7 @@ public class Context<
// if this state is reached then all possible findings will cause a lost situation
return null;
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
return null;
}
}
@@ -210,7 +210,7 @@ public class Context<
} else {
System.out.println("timed-out termination");
}
- } catch (InterruptedException e) {}
+ } catch (final InterruptedException e) {}
if (announceCompletionAfterTimeOut) announceCompletion();
}
diff --git a/source/net/yacy/cora/ai/greedy/Engine.java b/source/net/yacy/cora/ai/greedy/Engine.java
index a4588ccf3..989f19595 100644
--- a/source/net/yacy/cora/ai/greedy/Engine.java
+++ b/source/net/yacy/cora/ai/greedy/Engine.java
@@ -112,7 +112,7 @@ public class Engine<
}
//while (!challengeQueue.isEmpty()) System.out.println("finding: " + challengeQueue.take().getChallenge().getFinding().toString());
}
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
e.printStackTrace();
}
}
@@ -159,7 +159,7 @@ public class Engine<
// generate model clone and apply finding
try {
nextModel = (SpecificModel) agent.getModel().clone();
- } catch (CloneNotSupportedException e) {
+ } catch (final CloneNotSupportedException e) {
e.printStackTrace();
}
nextModel.applyFinding(challenge.getFinding());
@@ -170,7 +170,7 @@ public class Engine<
// generate model clone and apply finding
try {
nextModel = (SpecificModel) agent.getModel().clone();
- } catch (CloneNotSupportedException e) {
+ } catch (final CloneNotSupportedException e) {
e.printStackTrace();
}
nextModel.applyFinding(challenge.getFinding());
@@ -256,7 +256,7 @@ public class Engine<
// using the priority of the next role
agentQueue.put(nextAgent);
}
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
e.printStackTrace();
}
}
diff --git a/source/net/yacy/cora/document/JSONArray.java b/source/net/yacy/cora/document/JSONArray.java
index 71be94e58..7590b1b95 100644
--- a/source/net/yacy/cora/document/JSONArray.java
+++ b/source/net/yacy/cora/document/JSONArray.java
@@ -229,7 +229,7 @@ public class JSONArray {
return o instanceof Number ?
((Number)o).doubleValue() :
Float.valueOf((String)o).floatValue();
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new JSONException("JSONArray[" + index + "] is not a number.");
}
}
@@ -422,7 +422,7 @@ public class JSONArray {
public String toString() {
try {
return '[' + join(",") + ']';
- } catch (Exception e) {
+ } catch (final Exception e) {
return null;
}
}
@@ -502,7 +502,7 @@ public class JSONArray {
}
writer.write(']');
return writer;
- } catch (IOException e) {
+ } catch (final IOException e) {
throw new JSONException(e);
}
}
diff --git a/source/net/yacy/cora/document/JSONObject.java b/source/net/yacy/cora/document/JSONObject.java
index c077dd597..8afbbfdc4 100644
--- a/source/net/yacy/cora/document/JSONObject.java
+++ b/source/net/yacy/cora/document/JSONObject.java
@@ -170,7 +170,7 @@ public class JSONObject {
for (String name : names) {
try {
putOnce(name, jo.opt(name));
- } catch (Exception ignore) {
+ } catch (final Exception ignore) {
}
}
}
@@ -298,7 +298,7 @@ public class JSONObject {
for (String name : names) {
try {
putOpt(name, c.getField(name).get(object));
- } catch (Exception ignore) {
+ } catch (final Exception ignore) {
}
}
}
@@ -453,7 +453,7 @@ public class JSONObject {
return o instanceof Number ?
((Number)o).floatValue() :
Float.valueOf((String)o).floatValue();
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new JSONException("JSONObject[" + quote(key) +
"] is not a number.");
}
@@ -474,7 +474,7 @@ public class JSONObject {
return o instanceof Number ?
((Number)o).intValue() :
Integer.parseInt((String)o);
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new JSONException("JSONObject[" + quote(key) +
"] is not an int.");
}
@@ -531,7 +531,7 @@ public class JSONObject {
return o instanceof Number ?
((Number)o).longValue() :
Long.parseLong((String)o);
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new JSONException("JSONObject[" + quote(key) +
"] is not a long.");
}
@@ -744,7 +744,7 @@ public class JSONObject {
public boolean optBoolean(String key, boolean defaultValue) {
try {
return getBoolean(key);
- } catch (Exception e) {
+ } catch (final Exception e) {
return defaultValue;
}
}
@@ -779,7 +779,7 @@ public class JSONObject {
Object o = opt(key);
return o instanceof Number ? ((Number)o).floatValue() :
new Float((String)o).floatValue();
- } catch (Exception e) {
+ } catch (final Exception e) {
return defaultValue;
}
}
@@ -812,7 +812,7 @@ public class JSONObject {
public int optInt(String key, int defaultValue) {
try {
return getInt(key);
- } catch (Exception e) {
+ } catch (final Exception e) {
return defaultValue;
}
}
@@ -873,7 +873,7 @@ public class JSONObject {
public long optLong(String key, long defaultValue) {
try {
return getLong(key);
- } catch (Exception e) {
+ } catch (final Exception e) {
return defaultValue;
}
}
@@ -945,7 +945,7 @@ public class JSONObject {
this.map.put(key, wrap(result));
}
}
- } catch (Exception ignore) {
+ } catch (final Exception ignore) {
}
}
}
@@ -1218,7 +1218,7 @@ public class JSONObject {
(s.charAt(1) == 'x' || s.charAt(1) == 'X')) {
try {
return new Integer(Integer.parseInt(s.substring(2), 16));
- } catch (Exception ignore) {
+ } catch (final Exception ignore) {
}
}
try {
@@ -1231,7 +1231,7 @@ public class JSONObject {
return new Integer(myLong.intValue());
}
return myLong;
- } catch (Exception ignore) {
+ } catch (final Exception ignore) {
}
}
return s;
@@ -1308,7 +1308,7 @@ public class JSONObject {
}
sb.append('}');
return sb.toString();
- } catch (Exception e) {
+ } catch (final Exception e) {
return null;
}
}
@@ -1461,7 +1461,7 @@ public class JSONObject {
if (value instanceof String) {
return (String) value;
}
- } catch (Exception ignore) {
+ } catch (final Exception ignore) {
}
if (value instanceof Number) {
return numberToString((Number) value);
@@ -1572,7 +1572,7 @@ public class JSONObject {
}
writer.write('}');
return writer;
- } catch (IOException exception) {
+ } catch (final IOException exception) {
throw new JSONException(exception);
}
}
diff --git a/source/net/yacy/cora/document/JSONTokener.java b/source/net/yacy/cora/document/JSONTokener.java
index e71ce109f..e35f74111 100644
--- a/source/net/yacy/cora/document/JSONTokener.java
+++ b/source/net/yacy/cora/document/JSONTokener.java
@@ -144,7 +144,7 @@ public class JSONTokener {
} else {
try {
c = this.reader.read();
- } catch (IOException exception) {
+ } catch (final IOException exception) {
throw new JSONException(exception);
}
@@ -408,7 +408,7 @@ public class JSONTokener {
return c;
}
} while (c != to);
- } catch (IOException exc) {
+ } catch (final IOException exc) {
throw new JSONException(exc);
}
diff --git a/source/net/yacy/cora/document/RSSFeed.java b/source/net/yacy/cora/document/RSSFeed.java
index cb688e39a..508b36009 100644
--- a/source/net/yacy/cora/document/RSSFeed.java
+++ b/source/net/yacy/cora/document/RSSFeed.java
@@ -82,7 +82,7 @@ public class RSSFeed implements Iterable<RSSMessage> {
public Set<MultiProtocolURI> getLinks() {
Set<MultiProtocolURI> links = new HashSet<MultiProtocolURI>();
for (RSSMessage message: this.messages.values()) {
- try {links.add(new MultiProtocolURI(message.getLink()));} catch (MalformedURLException e) {}
+ try {links.add(new MultiProtocolURI(message.getLink()));} catch (final MalformedURLException e) {}
}
return links;
}
@@ -145,7 +145,7 @@ public class RSSFeed implements Iterable<RSSMessage> {
this.t--; // ensure termination
try {
this.lastGUID = this.GUIDiterator.next();
- } catch (ConcurrentModificationException e) {
+ } catch (final ConcurrentModificationException e) {
return null;
}
if (this.lastGUID == null) return null;
diff --git a/source/net/yacy/cora/document/RSSReader.java b/source/net/yacy/cora/document/RSSReader.java
index 5bcc6e284..7496ac122 100644
--- a/source/net/yacy/cora/document/RSSReader.java
+++ b/source/net/yacy/cora/document/RSSReader.java
@@ -64,7 +64,7 @@ public class RSSReader extends DefaultHandler {
if (parser == null) {
try {
parser = SAXParserFactory.newInstance().newSAXParser();
- } catch (ParserConfigurationException e) {
+ } catch (final ParserConfigurationException e) {
throw new SAXException(e.getMessage(), e);
}
tlSax.set(parser);
diff --git a/source/net/yacy/cora/federate/opensearch/OpenSearchConnector.java b/source/net/yacy/cora/federate/opensearch/OpenSearchConnector.java
index a37549de8..9355a4850 100644
--- a/source/net/yacy/cora/federate/opensearch/OpenSearchConnector.java
+++ b/source/net/yacy/cora/federate/opensearch/OpenSearchConnector.java
@@ -78,13 +78,13 @@ public class OpenSearchConnector {
row.put("url", urlstr);
try {
sb.tables.insert("opensearchsys", row);
- } catch (SpaceExceededException ex) {
+ } catch (final SpaceExceededException ex) {
ConcurrentLog.logException(ex);
}
}
}
size = sb.tables.size("opensearchsys");
- } catch (IOException ex) {
+ } catch (final IOException ex) {
ConcurrentLog.logException(ex);
}
}
@@ -111,7 +111,7 @@ public class OpenSearchConnector {
// querystring is inserted/replaced inside heuristicRSS
sb.heuristicRSS(parseSearchTemplate(osurl, "$", 0, theSearch.query.itemsPerPage), theSearch, "opensearch:" + name);
}
- } catch (IOException ex) {
+ } catch (final IOException ex) {
ConcurrentLog.warn("OpenSearchConnector.query", "failed reading table opensearchsys");
}
}
@@ -151,12 +151,12 @@ public class OpenSearchConnector {
conf.put(name, e);
try {
conf.commit();
- } catch (IOException ex) {
+ } catch (final IOException ex) {
ConcurrentLog.warn("OpenSearchConnector.add", "config file write error");
}
return true;
}
- } catch (IOException e1) {
+ } catch (final IOException e1) {
ConcurrentLog.logException(e1);
return false;
}
@@ -208,7 +208,7 @@ public class OpenSearchConnector {
return true;
}
ConcurrentLog.info("OpenSearchConnector.Discover", "start checking " + Long.toString(numfound) + " found index results");
- } catch (IOException ex) {
+ } catch (final IOException ex) {
ConcurrentLog.logException(ex);
return false;
}
@@ -251,7 +251,7 @@ public class OpenSearchConnector {
ConcurrentLog.info("OpenSearchConnector.Discover", "osd.xml check failed (no RSS or Atom support) for " + hrefurltxt);
}
}
- } catch (MalformedURLException ex) {
+ } catch (final MalformedURLException ex) {
}
}
} else {
@@ -259,7 +259,7 @@ public class OpenSearchConnector {
}
}
ConcurrentLog.info("OpenSearchConnector.Discover", "finisched Solr query (checked " + Integer.toString(dblmem.size()) + " unique opensearchdescription links found in " + Long.toString(numfound) + " results)");
- } catch (IOException ex) {
+ } catch (final IOException ex) {
ConcurrentLog.logException(ex);
}
}
diff --git a/source/net/yacy/cora/federate/solr/SchemaConfiguration.java b/source/net/yacy/cora/federate/solr/SchemaConfiguration.java
index aedfd80e1..f16a56725 100644
--- a/source/net/yacy/cora/federate/solr/SchemaConfiguration.java
+++ b/source/net/yacy/cora/federate/solr/SchemaConfiguration.java
@@ -70,7 +70,7 @@ public class SchemaConfiguration extends Configuration implements Serializable {
if (enew != null) {
try {
commit();
- } catch (IOException ex) {
+ } catch (final IOException ex) {
log.warn(ex);
}
}
@@ -87,7 +87,7 @@ public class SchemaConfiguration extends Configuration implements Serializable {
sid.setField(clickdepthfield.getSolrFieldName(), clickdepth);
return true;
}
- } catch (IOException e) {
+ } catch (final IOException e) {
}
return false;
}
@@ -136,7 +136,7 @@ public class SchemaConfiguration extends Configuration implements Serializable {
change = true;
}
return change;
- } catch (IOException e) {
+ } catch (final IOException e) {
}
return false;
}
diff --git a/source/net/yacy/cora/federate/solr/SolrServlet.java b/source/net/yacy/cora/federate/solr/SolrServlet.java
index a0657b50c..6e3ebca81 100644
--- a/source/net/yacy/cora/federate/solr/SolrServlet.java
+++ b/source/net/yacy/cora/federate/solr/SolrServlet.java
@@ -174,7 +174,7 @@ public class SolrServlet implements Filter {
out.flush();
return;
- } catch (Throwable ex) {
+ } catch (final Throwable ex) {
sendError(hresponse, ex);
return;
} finally {
@@ -202,7 +202,7 @@ public class SolrServlet implements Filter {
try {
InputStream stream = url.openStream();
stream.close();
- } catch (IOException e) {
+ } catch (final IOException e) {
ex=e;
Thread.sleep(200);
continue;
diff --git a/source/net/yacy/cora/federate/solr/connector/AbstractSolrConnector.java b/source/net/yacy/cora/federate/solr/connector/AbstractSolrConnector.java
index 97cbca85c..1795899e3 100644
--- a/source/net/yacy/cora/federate/solr/connector/AbstractSolrConnector.java
+++ b/source/net/yacy/cora/federate/solr/connector/AbstractSolrConnector.java
@@ -113,18 +113,18 @@ public abstract class AbstractSolrConnector implements SolrConnector {
try {
SolrDocumentList sdl = getDocumentListByQuery(querystring, o, pagesize, fields);
for (SolrDocument d: sdl) {
- try {queue.put(d);} catch (InterruptedException e) {break;}
+ try {queue.put(d);} catch (final InterruptedException e) {break;}
count++;
}
if (sdl.size() < pagesize) break;
o += pagesize;
- } catch (SolrException e) {
+ } catch (final SolrException e) {
break;
- } catch (IOException e) {
+ } catch (final IOException e) {
break;
}
}
- try {queue.put(AbstractSolrConnector.POISON_DOCUMENT);} catch (InterruptedException e1) {}
+ try {queue.put(AbstractSolrConnector.POISON_DOCUMENT);} catch (final InterruptedException e1) {}
}
};
t.start();
@@ -143,17 +143,17 @@ public abstract class AbstractSolrConnector implements SolrConnector {
try {
SolrDocumentList sdl = getDocumentListByQuery(querystring, o, pagesize, CollectionSchema.id.getSolrFieldName());
for (SolrDocument d: sdl) {
- try {queue.put((String) d.getFieldValue(CollectionSchema.id.getSolrFieldName()));} catch (InterruptedException e) {break;}
+ try {queue.put((String) d.getFieldValue(CollectionSchema.id.getSolrFieldName()));} catch (final InterruptedException e) {break;}
}
if (sdl.size() < pagesize) break;
o += pagesize;
- } catch (SolrException e) {
+ } catch (final SolrException e) {
break;
- } catch (IOException e) {
+ } catch (final IOException e) {
break;
}
}
- try {queue.put(AbstractSolrConnector.POISON_ID);} catch (InterruptedException e1) {}
+ try {queue.put(AbstractSolrConnector.POISON_ID);} catch (final InterruptedException e1) {}
}
};
t.start();
@@ -170,7 +170,7 @@ public abstract class AbstractSolrConnector implements SolrConnector {
String s = queue.poll(60000, TimeUnit.MILLISECONDS);
if (s == AbstractSolrConnector.POISON_ID) return null;
return s;
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
return null;
}
}
diff --git a/source/net/yacy/cora/federate/solr/connector/ConcurrentUpdateSolrConnector.java b/source/net/yacy/cora/federate/solr/connector/ConcurrentUpdateSolrConnector.java
index 1e014f92c..a4edab1fe 100644
--- a/source/net/yacy/cora/federate/solr/connector/ConcurrentUpdateSolrConnector.java
+++ b/source/net/yacy/cora/federate/solr/connector/ConcurrentUpdateSolrConnector.java
@@ -71,11 +71,11 @@ public class ConcurrentUpdateSolrConnector implements SolrConnector {
removeIdFromUpdateQueue(id);
ConcurrentUpdateSolrConnector.this.connector.deleteById(id);
ConcurrentUpdateSolrConnector.this.idCache.remove(ASCII.getBytes(id));
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
}
}
@@ -90,11 +90,11 @@ public class ConcurrentUpdateSolrConnector implements SolrConnector {
try {
updateIdCache((String) doc.getFieldValue(CollectionSchema.id.getSolrFieldName()));
ConcurrentUpdateSolrConnector.this.connector.add(doc);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
}
}
@@ -192,7 +192,7 @@ public class ConcurrentUpdateSolrConnector implements SolrConnector {
if (this.idCache.size() >= this.idCacheCapacity || MemoryControl.shortStatus()) this.idCache.clear();
try {
this.idCache.put(ASCII.getBytes(id));
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
this.idCache.clear();
}
}
@@ -229,12 +229,12 @@ public class ConcurrentUpdateSolrConnector implements SolrConnector {
long timeout = System.currentTimeMillis() + 1000;
ensureAliveDeletionHandler();
while (this.deleteQueue.size() > 0) {
- try {Thread.sleep(10);} catch (InterruptedException e) {}
+ try {Thread.sleep(10);} catch (final InterruptedException e) {}
if (System.currentTimeMillis() > timeout) break;
}
ensureAliveUpdateHandler();
while (this.updateQueue.size() > 0) {
- try {Thread.sleep(10);} catch (InterruptedException e) {}
+ try {Thread.sleep(10);} catch (final InterruptedException e) {}
if (System.currentTimeMillis() > timeout) break;
}
}
@@ -249,11 +249,11 @@ public class ConcurrentUpdateSolrConnector implements SolrConnector {
@Override
public void close() {
ensureAliveDeletionHandler();
- try {this.deleteQueue.put(POISON_ID);} catch (InterruptedException e) {}
+ try {this.deleteQueue.put(POISON_ID);} catch (final InterruptedException e) {}
ensureAliveUpdateHandler();
- try {this.updateQueue.put(POISON_DOCUMENT);} catch (InterruptedException e) {}
- try {this.deletionHandler.join();} catch (InterruptedException e) {}
- try {this.updateHandler.join();} catch (InterruptedException e) {}
+ try {this.updateQueue.put(POISON_DOCUMENT);} catch (final InterruptedException e) {}
+ try {this.deletionHandler.join();} catch (final InterruptedException e) {}
+ try {this.updateHandler.join();} catch (final InterruptedException e) {}
this.connector.close();
this.idCache.clear();
}
@@ -262,8 +262,8 @@ public class ConcurrentUpdateSolrConnector implements SolrConnector {
public void clear() throws IOException {
this.deleteQueue.clear();
this.updateQueue.clear();
- try {this.updateQueue.put(POISON_DOCUMENT);} catch (InterruptedException e) {}
- try {this.updateHandler.join();} catch (InterruptedException e) {}
+ try {this.updateQueue.put(POISON_DOCUMENT);} catch (final InterruptedException e) {}
+ try {this.updateHandler.join();} catch (final InterruptedException e) {}
this.connector.clear();
this.idCache.clear();
}
@@ -273,7 +273,7 @@ public class ConcurrentUpdateSolrConnector implements SolrConnector {
removeIdFromUpdateQueue(id);
this.idCache.remove(ASCII.getBytes(id));
if (this.deletionHandler.isAlive()) {
- try {this.deleteQueue.put(id);} catch (InterruptedException e) {}
+ try {this.deleteQueue.put(id);} catch (final InterruptedException e) {}
} else {
this.connector.deleteById(id);
}
@@ -286,7 +286,7 @@ public class ConcurrentUpdateSolrConnector implements SolrConnector {
this.idCache.remove(ASCII.getBytes(id));
}
if (this.deletionHandler.isAlive()) {
- for (String id: ids) try {this.deleteQueue.put(id);} catch (InterruptedException e) {}
+ for (String id: ids) try {this.deleteQueue.put(id);} catch (final InterruptedException e) {}
} else {
this.connector.deleteByIds(ids);
}
@@ -300,7 +300,7 @@ public class ConcurrentUpdateSolrConnector implements SolrConnector {
try {
ConcurrentUpdateSolrConnector.this.connector.deleteByQuery(querystring);
ConcurrentUpdateSolrConnector.this.idCache.clear();
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.severe("ConcurrentUpdateSolrConnector", e.getMessage(), e);
}
ConcurrentUpdateSolrConnector.this.connector.commit(true);
@@ -351,7 +351,7 @@ public class ConcurrentUpdateSolrConnector implements SolrConnector {
removeIdFromDeleteQueue(id);
updateIdCache(id);
if (this.updateHandler.isAlive()) {
- try {this.updateQueue.put(solrdoc);} catch (InterruptedException e) {}
+ try {this.updateQueue.put(solrdoc);} catch (final InterruptedException e) {}
} else {
this.connector.add(solrdoc);
}
@@ -365,7 +365,7 @@ public class ConcurrentUpdateSolrConnector implements SolrConnector {
updateIdCache(id);
}
if (this.updateHandler.isAlive()) {
- for (SolrInputDocument doc: solrdocs) try {this.updateQueue.put(doc);} catch (InterruptedException e) {}
+ for (SolrInputDocument doc: solrdocs) try {this.updateQueue.put(doc);} catch (final InterruptedException e) {}
} else {
this.connector.add(solrdocs);
}
diff --git a/source/net/yacy/cora/federate/solr/connector/EmbeddedSolrConnector.java b/source/net/yacy/cora/federate/solr/connector/EmbeddedSolrConnector.java
index 99c7d9136..290bde785 100644
--- a/source/net/yacy/cora/federate/solr/connector/EmbeddedSolrConnector.java
+++ b/source/net/yacy/cora/federate/solr/connector/EmbeddedSolrConnector.java
@@ -142,9 +142,9 @@ public class EmbeddedSolrConnector extends SolrServerConnector implements SolrCo
@Override
public synchronized void close() {
- try {this.commit(false);} catch (Throwable e) {ConcurrentLog.logException(e);}
- try {super.close();} catch (Throwable e) {ConcurrentLog.logException(e);}
- try {this.core.close();} catch (Throwable e) {ConcurrentLog.logException(e);}
+ try {this.commit(false);} catch (final Throwable e) {ConcurrentLog.logException(e);}
+ try {super.close();} catch (final Throwable e) {ConcurrentLog.logException(e);}
+ try {this.core.close();} catch (final Throwable e) {ConcurrentLog.logException(e);}
}
public SolrQueryRequest request(final SolrParams params) {
@@ -196,9 +196,9 @@ public class EmbeddedSolrConnector extends SolrServerConnector implements SolrCo
if (q != null) Thread.currentThread().setName(threadname);
if (rsp != null) log.fine(rsp.getResults().getNumFound() + " results for q=" + q);
return rsp;
- } catch (SolrServerException e) {
+ } catch (final SolrServerException e) {
throw new IOException(e);
- } catch (Throwable e) {
+ } catch (final Throwable e) {
throw new IOException("Error executing query", e);
}
}
diff --git a/source/net/yacy/cora/federate/solr/connector/MirrorSolrConnector.java b/source/net/yacy/cora/federate/solr/connector/MirrorSolrConnector.java
index 1c36a99cf..dd03b3f9c 100644
--- a/source/net/yacy/cora/federate/solr/connector/MirrorSolrConnector.java
+++ b/source/net/yacy/cora/federate/solr/connector/MirrorSolrConnector.java
@@ -283,7 +283,7 @@ public class MirrorSolrConnector extends AbstractSolrConnector implements SolrCo
public void run() {
try {
count.addAndGet(MirrorSolrConnector.this.solr0.getCountByQuery(querystring));
- } catch (IOException e) {}
+ } catch (final IOException e) {}
}
};
t0.start();
@@ -292,12 +292,12 @@ public class MirrorSolrConnector extends AbstractSolrConnector implements SolrCo
public void run() {
try {
count.addAndGet(MirrorSolrConnector.this.solr1.getCountByQuery(querystring));
- } catch (IOException e) {}
+ } catch (final IOException e) {}
}
};
t1.start();
- try {t0.join();} catch (InterruptedException e) {}
- try {t1.join();} catch (InterruptedException e) {}
+ try {t0.join();} catch (final InterruptedException e) {}
+ try {t1.join();} catch (final InterruptedException e) {}
return count.get();
}
diff --git a/source/net/yacy/cora/federate/solr/connector/RemoteSolrConnector.java b/source/net/yacy/cora/federate/solr/connector/RemoteSolrConnector.java
index 8f2d1a338..4e2a9369f 100644
--- a/source/net/yacy/cora/federate/solr/connector/RemoteSolrConnector.java
+++ b/source/net/yacy/cora/federate/solr/connector/RemoteSolrConnector.java
@@ -85,7 +85,7 @@ public class RemoteSolrConnector extends SolrServerConnector implements SolrConn
NamedList<Object> result = null;
try {
result = this.server.request(request);
- } catch (Throwable e) {
+ } catch (final Throwable e) {
//Log.logException(e);
throw new IOException(e.getMessage());
/*
@@ -94,7 +94,7 @@ public class RemoteSolrConnector extends SolrServerConnector implements SolrConn
super.init(server);
try {
result = server.request(request);
- } catch (Throwable e1) {
+ } catch (final Throwable e1) {
throw new IOException(e1.getMessage());
}
*/
diff --git a/source/net/yacy/cora/federate/solr/connector/ShardSelection.java b/source/net/yacy/cora/federate/solr/connector/ShardSelection.java
index 860f9eaec..16aeb3f1a 100644
--- a/source/net/yacy/cora/federate/solr/connector/ShardSelection.java
+++ b/source/net/yacy/cora/federate/solr/connector/ShardSelection.java
@@ -65,7 +65,7 @@ public class ShardSelection {
final String url = (String) sif.getValue();
try {
return selectURL(url);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
return 0;
}
diff --git a/source/net/yacy/cora/federate/solr/connector/SolrServerConnector.java b/source/net/yacy/cora/federate/solr/connector/SolrServerConnector.java
index 54313fa44..26e43e028 100644
--- a/source/net/yacy/cora/federate/solr/connector/SolrServerConnector.java
+++ b/source/net/yacy/cora/federate/solr/connector/SolrServerConnector.java
@@ -68,7 +68,7 @@ public abstract class SolrServerConnector extends AbstractSolrConnector implemen
try {
this.server.commit(true, true, softCommit);
//if (this.server instanceof HttpSolrServer) ((HttpSolrServer) this.server).shutdown();
- } catch (Throwable e) {
+ } catch (final Throwable e) {
//Log.logException(e);
}
}
@@ -83,7 +83,7 @@ public abstract class SolrServerConnector extends AbstractSolrConnector implemen
synchronized (this.server) {
try {
this.server.optimize(true, true, maxSegments);
- } catch (Throwable e) {
+ } catch (final Throwable e) {
ConcurrentLog.logException(e);
}
}
@@ -95,7 +95,7 @@ public abstract class SolrServerConnector extends AbstractSolrConnector implemen
try {
if (this.server instanceof EmbeddedSolrServer) synchronized (this.server) {this.server.commit(true, true, false);}
this.server = null;
- } catch (Throwable e) {
+ } catch (final Throwable e) {
ConcurrentLog.logException(e);
}
}
@@ -197,27 +197,27 @@ public abstract class SolrServerConnector extends AbstractSolrConnector implemen
try {
if (solrdoc.containsKey("_version_")) solrdoc.setField("_version_",0L); // prevent Solr "version conflict"
this.server.add(solrdoc, -1);
- } catch (Throwable e) {
+ } catch (final Throwable e) {
ConcurrentLog.logException(e);
// catches "version conflict for": try this again and delete the document in advance
try {
this.server.deleteById((String) solrdoc.getFieldValue(CollectionSchema.id.getSolrFieldName()));
- } catch (SolrServerException e1) {
+ } catch (final SolrServerException e1) {
ConcurrentLog.logException(e1);
}
try {
this.server.add(solrdoc, -1);
- } catch (Throwable ee) {
+ } catch (final Throwable ee) {
ConcurrentLog.logException(ee);
try {
this.server.commit();
- } catch (Throwable eee) {
+ } catch (final Throwable eee) {
ConcurrentLog.logException(eee);
// a time-out may occur here
}
try {
this.server.add(solrdoc, -1);
- } catch (Throwable eee) {
+ } catch (final Throwable eee) {
ConcurrentLog.logException(eee);
throw new IOException(eee);
}
@@ -235,25 +235,25 @@ public abstract class SolrServerConnector extends AbstractSolrConnector implemen
if (solrdoc.containsKey("_version_")) solrdoc.setField("_version_",0L); // prevent Solr "version conflict"
}
this.server.add(solrdocs, -1);
- } catch (Throwable e) {
+ } catch (final Throwable e) {
ConcurrentLog.logException(e);
// catches "version conflict for": try this again and delete the document in advance
List<String> ids = new ArrayList<String>();
for (SolrInputDocument solrdoc : solrdocs) ids.add((String) solrdoc.getFieldValue(CollectionSchema.id.getSolrFieldName()));
try {
this.server.deleteById(ids);
- } catch (SolrServerException e1) {
+ } catch (final SolrServerException e1) {
ConcurrentLog.logException(e1);
}
try {
this.server.commit();
- } catch (Throwable eee) {
+ } catch (final Throwable eee) {
ConcurrentLog.logException(eee);
// a time-out may occur here
}
try {
this.server.add(solrdocs, -1);
- } catch (Throwable ee) {
+ } catch (final Throwable ee) {
ConcurrentLog.logException(ee);
log.warn(e.getMessage() + " IDs=" + ids.toString());
throw new IOException(ee);
diff --git a/source/net/yacy/cora/federate/solr/instance/EmbeddedInstance.java b/source/net/yacy/cora/federate/solr/instance/EmbeddedInstance.java
index b22e58285..04baa2649 100644
--- a/source/net/yacy/cora/federate/solr/instance/EmbeddedInstance.java
+++ b/source/net/yacy/cora/federate/solr/instance/EmbeddedInstance.java
@@ -122,7 +122,7 @@ public class EmbeddedInstance implements SolrInstance {
for (String cfl: source.list()) {
try {
Files.copy(new File(source, cfl), new File(target, cfl));
- } catch (IOException e) {
+ } catch (final IOException e) {
e.printStackTrace();
}
}
@@ -131,7 +131,7 @@ public class EmbeddedInstance implements SolrInstance {
target.getParentFile().mkdirs();
try {
Files.copy(source, target);
- } catch (IOException e) {
+ } catch (final IOException e) {
e.printStackTrace();
}
}
@@ -155,7 +155,7 @@ public class EmbeddedInstance implements SolrInstance {
try {
Files.copy(source, target);
ConcurrentLog.fine("initializeCoreConf", "overwrite " + target.getAbsolutePath() + " with " + source.getAbsolutePath());
- } catch (IOException ex) {
+ } catch (final IOException ex) {
ex.printStackTrace();
}
}
@@ -204,7 +204,7 @@ public class EmbeddedInstance implements SolrInstance {
@Override
public synchronized void close() {
- try {this.coreContainer.shutdown();} catch (Throwable e) {ConcurrentLog.logException(e);}
+ try {this.coreContainer.shutdown();} catch (final Throwable e) {ConcurrentLog.logException(e);}
}
}
diff --git a/source/net/yacy/cora/federate/solr/instance/RemoteInstance.java b/source/net/yacy/cora/federate/solr/instance/RemoteInstance.java
index 0e96a66fe..3cbcc53b6 100644
--- a/source/net/yacy/cora/federate/solr/instance/RemoteInstance.java
+++ b/source/net/yacy/cora/federate/solr/instance/RemoteInstance.java
@@ -116,7 +116,7 @@ public class RemoteInstance implements SolrInstance {
final MultiProtocolURI u;
try {
u = new MultiProtocolURI(this.solrurl + this.defaultCoreName);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
throw new IOException(e.getMessage());
}
String solraccount, solrpw;
@@ -225,7 +225,7 @@ public class RemoteInstance implements SolrInstance {
final MultiProtocolURI u;
try {
u = new MultiProtocolURI(this.solrurl + name);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
return null;
}
String host = u.getHost();
diff --git a/source/net/yacy/cora/federate/solr/instance/ServerShard.java b/source/net/yacy/cora/federate/solr/instance/ServerShard.java
index de3190cd6..80c174a1d 100644
--- a/source/net/yacy/cora/federate/solr/instance/ServerShard.java
+++ b/source/net/yacy/cora/federate/solr/instance/ServerShard.java
@@ -340,7 +340,7 @@ public class ServerShard extends SolrServer {
QueryResponse rsp;
try {
rsp = s.query(params);
- } catch (Throwable e) {return;}
+ } catch (final Throwable e) {return;}
qrl.add(rsp);
}
};
@@ -348,7 +348,7 @@ public class ServerShard extends SolrServer {
t.add(t0);
}
for (Thread t0: t) {
- try {t0.join();} catch (InterruptedException e) {}
+ try {t0.join();} catch (final InterruptedException e) {}
}
// prepare combined response
@@ -372,7 +372,7 @@ public class ServerShard extends SolrServer {
QueryResponse rsp;
try {
rsp = s.query(params, method);
- } catch (Throwable e) {return;}
+ } catch (final Throwable e) {return;}
qrl.add(rsp);
}
};
@@ -380,7 +380,7 @@ public class ServerShard extends SolrServer {
t.add(t0);
}
for (Thread t0: t) {
- try {t0.join();} catch (InterruptedException e) {}
+ try {t0.join();} catch (final InterruptedException e) {}
}
// prepare combined response
diff --git a/source/net/yacy/cora/federate/solr/responsewriter/OpensearchResponseWriter.java b/source/net/yacy/cora/federate/solr/responsewriter/OpensearchResponseWriter.java
index 3fbb29b2e..d04deb1f6 100644
--- a/source/net/yacy/cora/federate/solr/responsewriter/OpensearchResponseWriter.java
+++ b/source/net/yacy/cora/federate/solr/responsewriter/OpensearchResponseWriter.java
@@ -184,7 +184,7 @@ public class OpensearchResponseWriter implements QueryResponseWriter {
solitaireTag(writer, YaCyMetadata.host.getURIref(), url.getHost());
solitaireTag(writer, YaCyMetadata.path.getURIref(), url.getPath());
solitaireTag(writer, YaCyMetadata.file.getURIref(), url.getFileName());
- } catch (MalformedURLException e) {}
+ } catch (final MalformedURLException e) {}
continue;
}
diff --git a/source/net/yacy/cora/federate/solr/responsewriter/YJsonResponseWriter.java b/source/net/yacy/cora/federate/solr/responsewriter/YJsonResponseWriter.java
index 57faf4261..7dbc37b04 100644
--- a/source/net/yacy/cora/federate/solr/responsewriter/YJsonResponseWriter.java
+++ b/source/net/yacy/cora/federate/solr/responsewriter/YJsonResponseWriter.java
@@ -158,7 +158,7 @@ public class YJsonResponseWriter implements QueryResponseWriter {
solitaireTag(writer, "file", filename);
// get image license
if (MultiProtocolURI.isImage(filename)) URLLicense.aquireLicense(urlhash, url.toNormalform(true));
- } catch (MalformedURLException e) {}
+ } catch (final MalformedURLException e) {}
continue;
}
if (CollectionSchema.title.getSolrFieldName().equals(fieldName)) {
@@ -216,7 +216,7 @@ public class YJsonResponseWriter implements QueryResponseWriter {
if (i < responseCount - 1) {
writer.write(",\n".toCharArray());
}
- } catch (Throwable ee) {}
+ } catch (final Throwable ee) {}
}
writer.write("],\n".toCharArray());
diff --git a/source/net/yacy/cora/federate/yacy/Peer.java b/source/net/yacy/cora/federate/yacy/Peer.java
index d8778216c..6b359c65a 100644
--- a/source/net/yacy/cora/federate/yacy/Peer.java
+++ b/source/net/yacy/cora/federate/yacy/Peer.java
@@ -60,7 +60,7 @@ public class Peer extends HashMap<Peer.Schema, String> implements Comparable<Pee
if (x == null) return Integer.MAX_VALUE;
try {
return Integer.parseInt(x);
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
return Integer.MAX_VALUE;
}
}
@@ -83,7 +83,7 @@ public class Peer extends HashMap<Peer.Schema, String> implements Comparable<Pee
x = x.substring(0, p);
try {
return Float.parseFloat(x);
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
return 0.0f;
}
}
diff --git a/source/net/yacy/cora/federate/yacy/Peers.java b/source/net/yacy/cora/federate/yacy/Peers.java
index 07a338737..238dd8892 100644
--- a/source/net/yacy/cora/federate/yacy/Peers.java
+++ b/source/net/yacy/cora/federate/yacy/Peers.java
@@ -94,7 +94,7 @@ public class Peers extends TreeMap<byte[], Peer> implements Serializable {
for (Peer p: ps.values()) Peers.this.add(p);
int c1 = Peers.this.size();
log.info("bootstrap with peer " + bp + ": added " + (c1 - c0) + " peers");
- } catch (IOException e) {
+ } catch (final IOException e) {
log.info("bootstrap with peer " + bp + ": FAILED - " + e.getMessage());
}
}
@@ -102,7 +102,7 @@ public class Peers extends TreeMap<byte[], Peer> implements Serializable {
t0.start();
t.add(t0);
}
- for (Thread t0: t) try {t0.join(10000);} catch (InterruptedException e) {}
+ for (Thread t0: t) try {t0.join(10000);} catch (final InterruptedException e) {}
}
lastBootstrap = System.currentTimeMillis();
log.info("bootstrap finished: " + this.size() + " peers");
@@ -169,7 +169,7 @@ public class Peers extends TreeMap<byte[], Peer> implements Serializable {
for (Peer p: nodes) {
log.info(p.get(Peer.Schema.fullname) + " - " + p.get(Peer.Schema.address));
}
- try {HTTPClient.closeConnectionManager();} catch (InterruptedException e) {}
+ try {HTTPClient.closeConnectionManager();} catch (final InterruptedException e) {}
}
}
diff --git a/source/net/yacy/cora/federate/yacy/api/Network.java b/source/net/yacy/cora/federate/yacy/api/Network.java
index 4047bbb89..d81f2ee8c 100644
--- a/source/net/yacy/cora/federate/yacy/api/Network.java
+++ b/source/net/yacy/cora/federate/yacy/api/Network.java
@@ -55,7 +55,7 @@ public class Network {
Document doc = null;
try {
doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(bais);
- } catch (Throwable e) {
+ } catch (final Throwable e) {
throw new IOException(e.getMessage());
}
bais.close();
@@ -91,7 +91,7 @@ public class Network {
public static void main(String[] args) {
//getNetwork("search.yacy.net");
- try {getNetwork("sokrates.homeunix.net:9090");} catch (IOException e1) {}
- try {HTTPClient.closeConnectionManager();} catch (InterruptedException e) {}
+ try {getNetwork("sokrates.homeunix.net:9090");} catch (final IOException e1) {}
+ try {HTTPClient.closeConnectionManager();} catch (final InterruptedException e) {}
}
}
diff --git a/source/net/yacy/cora/geo/GeonamesLocation.java b/source/net/yacy/cora/geo/GeonamesLocation.java
index cd13047c4..db64492cf 100644
--- a/source/net/yacy/cora/geo/GeonamesLocation.java
+++ b/source/net/yacy/cora/geo/GeonamesLocation.java
@@ -92,7 +92,7 @@ public class GeonamesLocation implements Locations {
final ZipEntry ze = zf.getEntry(entryName);
final InputStream is = zf.getInputStream(ze);
reader = new BufferedReader(new InputStreamReader(is, "UTF-8"));
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
log.warn(e);
return;
}
@@ -153,7 +153,7 @@ public class GeonamesLocation implements Locations {
this.name2ids.put(name, locs);
}
}
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
log.warn(e);
}
}
diff --git a/source/net/yacy/cora/geo/OpenGeoDBLocation.java b/source/net/yacy/cora/geo/OpenGeoDBLocation.java
index 5cc7a1dc2..4f23f146d 100644
--- a/source/net/yacy/cora/geo/OpenGeoDBLocation.java
+++ b/source/net/yacy/cora/geo/OpenGeoDBLocation.java
@@ -162,13 +162,13 @@ public class OpenGeoDBLocation implements Locations
continue;
}
reader.close();
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
} finally {
if ( reader != null ) {
try {
reader.close();
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
}
}
}
diff --git a/source/net/yacy/cora/language/phonetic/Phonetic.java b/source/net/yacy/cora/language/phonetic/Phonetic.java
index f59bbd137..c7d6ff2af 100644
--- a/source/net/yacy/cora/language/phonetic/Phonetic.java
+++ b/source/net/yacy/cora/language/phonetic/Phonetic.java
@@ -54,7 +54,7 @@ public class Phonetic {
if (encoder == Encoder.METAPHONE) return metaphoneEncoder.encode(s);
if (encoder == Encoder.DOUBLE_METAPHONE) return doubleMetaphoneEncoder.encode(s);
return s;
- } catch (Throwable e) {
+ } catch (final Throwable e) {
// some encoders do not work with non-ASCII charachters and throw an exception
return s;
}
diff --git a/source/net/yacy/cora/language/synonyms/AutotaggingLibrary.java b/source/net/yacy/cora/language/synonyms/AutotaggingLibrary.java
index 5bcedf1a3..8d1789e5f 100644
--- a/source/net/yacy/cora/language/synonyms/AutotaggingLibrary.java
+++ b/source/net/yacy/cora/language/synonyms/AutotaggingLibrary.java
@@ -114,7 +114,7 @@ public class AutotaggingLibrary {
Tagging voc = new Tagging("Locations", locations);
try {
voc.setObjectspace("http://dbpedia.org/resource/");
- } catch (IOException e) {
+ } catch (final IOException e) {
}
this.vocabularies.put("Locations", voc);
for (String t: voc.tags()) {
diff --git a/source/net/yacy/cora/language/synonyms/SynonymLibrary.java b/source/net/yacy/cora/language/synonyms/SynonymLibrary.java
index 6acf995f9..a0000e268 100644
--- a/source/net/yacy/cora/language/synonyms/SynonymLibrary.java
+++ b/source/net/yacy/cora/language/synonyms/SynonymLibrary.java
@@ -78,7 +78,7 @@ public class SynonymLibrary {
symsetlist.add(synonyms);
}
}
- } catch (Throwable e) {
+ } catch (final Throwable e) {
log.warn("cannot read stemming file " + f, e);
}
}
diff --git a/source/net/yacy/cora/lod/JenaTripleStore.java b/source/net/yacy/cora/lod/JenaTripleStore.java
index ef5ae67c9..d7ecdad2c 100644
--- a/source/net/yacy/cora/lod/JenaTripleStore.java
+++ b/source/net/yacy/cora/lod/JenaTripleStore.java
@@ -133,7 +133,7 @@ public class JenaTripleStore {
ftmp.renameTo(f);
}
log.info("Saved triplestore with " + model.size() + " triples to " + filename);
- } catch (Exception e) {
+ } catch (final Exception e) {
log.warn("Saving to " + filename+" failed");
}
}
@@ -301,7 +301,7 @@ public class JenaTripleStore {
privatestorage.put(username, tmp);
}
}
- } catch (Exception anyex) {
+ } catch (final Exception anyex) {
log.warn(anyex);
}
}
diff --git a/source/net/yacy/cora/lod/vocabulary/CreativeCommons.java b/source/net/yacy/cora/lod/vocabulary/CreativeCommons.java
index 8d94ff1fb..97950651a 100644
--- a/source/net/yacy/cora/lod/vocabulary/CreativeCommons.java
+++ b/source/net/yacy/cora/lod/vocabulary/CreativeCommons.java
@@ -84,7 +84,7 @@ public enum CreativeCommons implements Vocabulary {
this.terminal = terminal;
try {
this.subject = subject == null ? null : new MultiProtocolURI(subject);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
this.subject = null;
}
this.discoveryPattern = Pattern.compile(discoveryPattern == null ? ".*" : discoveryPattern);
@@ -120,7 +120,7 @@ public enum CreativeCommons implements Vocabulary {
this.terminal = terminal;
try {
this.subject = subject == null ? null : new MultiProtocolURI(subject);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
this.subject = null;
}
this.discoveryPattern = Pattern.compile(discoveryPattern == null ? ".*" : discoveryPattern);
@@ -152,7 +152,7 @@ public enum CreativeCommons implements Vocabulary {
this.terminal = terminal;
try {
this.subject = subject == null ? null : new MultiProtocolURI(subject);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
this.subject = null;
}
this.discoveryPattern = Pattern.compile(discoveryPattern == null ? ".*" : discoveryPattern);
diff --git a/source/net/yacy/cora/lod/vocabulary/Tagging.java b/source/net/yacy/cora/lod/vocabulary/Tagging.java
index 2dee1b55c..6d298743c 100644
--- a/source/net/yacy/cora/lod/vocabulary/Tagging.java
+++ b/source/net/yacy/cora/lod/vocabulary/Tagging.java
@@ -255,7 +255,7 @@ public class Tagging {
this.synonym2synonyms.put(s, synonyms);
}
}
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
}
}
@@ -293,7 +293,7 @@ public class Tagging {
if (!written) {
w.write(term + (synonyms == null || synonyms.isEmpty() ? "" : ":" + synonyms) + (objectlink == null || objectlink.isEmpty() || objectlink.equals(this.objectspace + term) ? "" : "#" + objectlink) + "\n");
}
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
}
w.close();
this.propFile.delete();
@@ -320,7 +320,7 @@ public class Tagging {
}
w.write(pl[0] + (pl[1] == null || pl[1].isEmpty() ? "" : ":" + pl[1]) + (pl[2] == null || pl[2].isEmpty() || pl[2].equals(this.objectspace + pl[0]) ? "" : "#" + pl[2]) + "\n");
}
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
}
w.close();
this.propFile.delete();
@@ -358,7 +358,7 @@ public class Tagging {
}
w.write(pl[0] + (pl[1] == null || pl[1].isEmpty() ? "" : ":" + pl[1]) + (pl[2] == null || pl[2].isEmpty() || pl[2].equals(this.objectspace + pl[0]) ? "" : "#" + pl[2]) + "\n");
}
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
}
w.close();
this.propFile.delete();
@@ -410,7 +410,7 @@ public class Tagging {
BlockingQueue<String> list;
try {
list=Files.concurentLineReader(this.propFile, 1000);
- } catch (IOException e1) {
+ } catch (final IOException e1) {
return map;
}
String line;
@@ -422,7 +422,7 @@ public class Tagging {
}
map.put(pl[0], new SOTuple(pl[1] == null || pl[1].isEmpty() ? "" : pl[1], pl[2] == null || pl[2].isEmpty() || pl[2].equals(this.objectspace + pl[0]) ? "" : pl[2]));
}
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
}
return map;
}
diff --git a/source/net/yacy/cora/order/Digest.java b/source/net/yacy/cora/order/Digest.java
index fe40cf1f5..96f489f3f 100644
--- a/source/net/yacy/cora/order/Digest.java
+++ b/source/net/yacy/cora/order/Digest.java
@@ -141,7 +141,7 @@ public class Digest {
try {
digestPool.put(digest);
//System.out.println("Digest Pool size = " + digestPool.size());
- } catch ( InterruptedException e ) {
+ } catch (final InterruptedException e ) {
}
// update the cache
@@ -181,7 +181,7 @@ public class Digest {
md5consumer.consume(md5FilechunkConsumer.poison);
throw e;
} finally {
- try {in.close();} catch (IOException e) {}
+ try {in.close();} catch (final IOException e) {}
}
// put in poison into queue to tell the consumer to stop
md5consumer.consume(md5FilechunkConsumer.poison);
diff --git a/source/net/yacy/cora/protocol/Domains.java b/source/net/yacy/cora/protocol/Domains.java
index 095d791e5..c1c6b6d18 100644
--- a/source/net/yacy/cora/protocol/Domains.java
+++ b/source/net/yacy/cora/protocol/Domains.java
@@ -687,7 +687,7 @@ public class Domains {
// call i.getHostName() using concurrency to interrupt execution in case of a time-out
try {
//TimeoutRequest.getHostName(i, 1000);
- } catch (ExecutionException e) {
+ } catch (final ExecutionException e) {
return i.getHostAddress();
}
*/
@@ -772,7 +772,7 @@ public class Domains {
try {
ip = InetAddresses.forString(host);
log.info("using guava for host resolution:" + host);
- } catch (IllegalArgumentException e) {
+ } catch (final IllegalArgumentException e) {
ip = null;
}
}
@@ -827,7 +827,7 @@ public class Domains {
globalHosts.clear();
NAME_CACHE_HIT.clear();
NAME_CACHE_MISS.clear();
- } catch (IOException e) {}
+ } catch (final IOException e) {}
}
diff --git a/source/net/yacy/cora/protocol/HeaderFramework.java b/source/net/yacy/cora/protocol/HeaderFramework.java
index 83c1b7fd0..c7352e399 100644
--- a/source/net/yacy/cora/protocol/HeaderFramework.java
+++ b/source/net/yacy/cora/protocol/HeaderFramework.java
@@ -301,7 +301,7 @@ public class HeaderFramework extends TreeMap<String, String> implements Map<Stri
public static final Date parseGSAFS(final String datestring) {
try {
return FORMAT_GSAFS.parse(datestring);
- } catch (ParseException e) {
+ } catch (final ParseException e) {
return null;
}
}
diff --git a/source/net/yacy/cora/protocol/ResponseHeader.java b/source/net/yacy/cora/protocol/ResponseHeader.java
index 90cf95465..5d5df4fe4 100644
--- a/source/net/yacy/cora/protocol/ResponseHeader.java
+++ b/source/net/yacy/cora/protocol/ResponseHeader.java
@@ -65,7 +65,7 @@ public class ResponseHeader extends HeaderFramework {
if (statuscode == null) return 200;
try {
return Integer.parseInt(statuscode);
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
return 200;
}
}
diff --git a/source/net/yacy/cora/protocol/Scanner.java b/source/net/yacy/cora/protocol/Scanner.java
index f9c04cfbe..60162c927 100644
--- a/source/net/yacy/cora/protocol/Scanner.java
+++ b/source/net/yacy/cora/protocol/Scanner.java
@@ -262,7 +262,7 @@ public class Scanner {
if (subnet == 31) {
try {
c.add(InetAddress.getByAddress(base.getAddress()));
- } catch (UnknownHostException e) {}
+ } catch (final UnknownHostException e) {}
} else {
int ul = subnet >= 24 ? base.getAddress()[2] : (1 << (24 - subnet)) - 1;
for (int br = subnet >= 24 ? base.getAddress()[2] : 0; br <= ul; br++) {
@@ -291,7 +291,7 @@ public class Scanner {
}
public static void main(final String[] args) {
- //try {System.out.println("192.168.1.91: " + ping(new MultiProtocolURI("smb://192.168.1.91/"), 1000));} catch (MalformedURLException e) {}
+ //try {System.out.println("192.168.1.91: " + ping(new MultiProtocolURI("smb://192.168.1.91/"), 1000));} catch (final MalformedURLException e) {}
final Scanner scanner = new Scanner(100, 10);
List<InetAddress> addresses = genlist(Domains.myIntranetIPs(), 20);
scanner.addProtocols(addresses, true, true, true, true);
diff --git a/source/net/yacy/cora/protocol/ftp/FTPClient.java b/source/net/yacy/cora/protocol/ftp/FTPClient.java
index ebaaa978f..89baa1efc 100644
--- a/source/net/yacy/cora/protocol/ftp/FTPClient.java
+++ b/source/net/yacy/cora/protocol/ftp/FTPClient.java
@@ -331,7 +331,7 @@ public class FTPClient {
} catch (final NullPointerException e) {
log.warn("main(String args[]) is not defined as static for " + obj);
/*
- * } catch (IOException e) { // class file does not exist, go
+ * } catch (final IOException e) { // class file does not exist, go
* silently over it to not show everybody that the // system
* attempted to load a class file log.warning("Command '" + obj + "'
* not supported. Try 'HELP'.");
@@ -2042,13 +2042,13 @@ public class FTPClient {
if (isPassive()) {
try {
createPassiveDataPort();
- } catch (IOException e) {
+ } catch (final IOException e) {
createActiveDataPort();
}
} else {
try {
createActiveDataPort();
- } catch (IOException e) {
+ } catch (final IOException e) {
createPassiveDataPort();
}
}
diff --git a/source/net/yacy/cora/protocol/http/HTTPClient.java b/source/net/yacy/cora/protocol/http/HTTPClient.java
index 793c4f4cd..baafd725f 100644
--- a/source/net/yacy/cora/protocol/http/HTTPClient.java
+++ b/source/net/yacy/cora/protocol/http/HTTPClient.java
@@ -785,7 +785,7 @@ public class HTTPClient {
// Head some
// try {
// client.HEADResponse(url);
-// } catch (IOException e) {
+// } catch (final IOException e) {
// e.printStackTrace();
// }
for (final Header header: client.getHttpResponse().getAllHeaders()) {
@@ -799,7 +799,7 @@ public class HTTPClient {
// Post some
// try {
// System.out.println(UTF8.String(client.POSTbytes(url, newparts)));
-// } catch (IOException e1) {
+// } catch (final IOException e1) {
// e1.printStackTrace();
// }
// Close out connection manager
diff --git a/source/net/yacy/cora/protocol/http/LinkExtractor.java b/source/net/yacy/cora/protocol/http/LinkExtractor.java
index e36e2ba1f..59b13c016 100644
--- a/source/net/yacy/cora/protocol/http/LinkExtractor.java
+++ b/source/net/yacy/cora/protocol/http/LinkExtractor.java
@@ -55,7 +55,7 @@ public class LinkExtractor {
if (u.endsWith(".")) u = u.substring(0, u.length() - 1); // remove the '.' that was appended above
s = p + 1;
if (this.blackpattern.matcher(u).matches()) continue;
- try {links.put(new MultiProtocolURI(u), PRESENT);} catch (MalformedURLException e) {}
+ try {links.put(new MultiProtocolURI(u), PRESENT);} catch (final MalformedURLException e) {}
}
}
diff --git a/source/net/yacy/cora/sorting/WeakPriorityBlockingQueue.java b/source/net/yacy/cora/sorting/WeakPriorityBlockingQueue.java
index e5f12e8d5..95b66f3db 100644
--- a/source/net/yacy/cora/sorting/WeakPriorityBlockingQueue.java
+++ b/source/net/yacy/cora/sorting/WeakPriorityBlockingQueue.java
@@ -404,7 +404,7 @@ public class WeakPriorityBlockingQueue<E> implements Serializable {
Element<String> e;
try {
while ((e = a.poll(1000)) != null) System.out.println("> " + e.toString());
- } catch (InterruptedException e1) {
+ } catch (final InterruptedException e1) {
e1.printStackTrace();
}
}
diff --git a/source/net/yacy/cora/storage/ConcurrentARC.java b/source/net/yacy/cora/storage/ConcurrentARC.java
index 700d6b3c7..d75fe3aeb 100644
--- a/source/net/yacy/cora/storage/ConcurrentARC.java
+++ b/source/net/yacy/cora/storage/ConcurrentARC.java
@@ -233,11 +233,11 @@ public final class ConcurrentARC<K, V> extends AbstractMap<K, V> implements Map<
int h = 0;
for (final byte c: (byte[])x) h = 31 * h + (c & 0xFF);
final int p = h & this.mask;
- //String o = UTF8.String((byte[]) x); try { if (o.equals(latestObject)) throw new RuntimeException("ConcurrentARC: p = " + p + ", objectb = " + o); } catch (Exception e) { Log.logException(e); } latestObject = o;
+ //String o = UTF8.String((byte[]) x); try { if (o.equals(latestObject)) throw new RuntimeException("ConcurrentARC: p = " + p + ", objectb = " + o); } catch (final Exception e) { Log.logException(e); } latestObject = o;
return p;
}
final int p = x.hashCode() & this.mask;
- //String o = x.toString(); try { if (o.equals(latestObject)) throw new RuntimeException("ConcurrentARC: p = " + p + ", objecto = " + o); } catch (Exception e) { Log.logException(e); } latestObject = o;
+ //String o = x.toString(); try { if (o.equals(latestObject)) throw new RuntimeException("ConcurrentARC: p = " + p + ", objecto = " + o); } catch (final Exception e) { Log.logException(e); } latestObject = o;
return p;
}
diff --git a/source/net/yacy/cora/storage/Configuration.java b/source/net/yacy/cora/storage/Configuration.java
index d99c73a30..eba6ad831 100644
--- a/source/net/yacy/cora/storage/Configuration.java
+++ b/source/net/yacy/cora/storage/Configuration.java
@@ -113,7 +113,7 @@ public class Configuration extends TreeMap<String, Entry> implements Serializabl
} catch (final IOException e) {
throw e;
} finally {
- if (br != null) try {br.close();} catch (IOException e) {}
+ if (br != null) try {br.close();} catch (final IOException e) {}
}
}
@@ -316,7 +316,7 @@ public class Configuration extends TreeMap<String, Entry> implements Serializabl
k = i.next();
if (!k.enabled()) System.out.println(k.toString() );
}
- } catch (IOException e) {
+ } catch (final IOException e) {
e.printStackTrace();
}
}
diff --git a/source/net/yacy/cora/storage/Files.java b/source/net/yacy/cora/storage/Files.java
index 61959dc5f..9903d6066 100644
--- a/source/net/yacy/cora/storage/Files.java
+++ b/source/net/yacy/cora/storage/Files.java
@@ -88,23 +88,23 @@ public class Files {
while ((line = br.readLine()) != null) {
q.put(line);
}
- } catch (IOException e) {
- } catch (InterruptedException e) {
+ } catch (final IOException e) {
+ } catch (final InterruptedException e) {
} finally {
try {
q.put(POISON_LINE);
try {
br.close();
is.close();
- } catch (IOException ee) {
+ } catch (final IOException ee) {
}
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
// last try
q.add(POISON_LINE);
try {
br.close();
is.close();
- } catch (IOException ee) {
+ } catch (final IOException ee) {
}
}
}
diff --git a/source/net/yacy/cora/storage/SizeLimitedSet.java b/source/net/yacy/cora/storage/SizeLimitedSet.java
index c95d70709..0355e38ca 100644
--- a/source/net/yacy/cora/storage/SizeLimitedSet.java
+++ b/source/net/yacy/cora/storage/SizeLimitedSet.java
@@ -71,7 +71,7 @@ public class SizeLimitedSet<E> extends AbstractSet<E> implements Set<E>, Cloneab
SizeLimitedSet<E> n = (SizeLimitedSet<E>) super.clone();
n.map = (SizeLimitedMap<E, Object>) map.clone();
return n;
- } catch (CloneNotSupportedException e) {
+ } catch (final CloneNotSupportedException e) {
throw new InternalError();
}
}
diff --git a/source/net/yacy/cora/storage/ZIPWriter.java b/source/net/yacy/cora/storage/ZIPWriter.java
index 106bbcf1b..9e055f647 100644
--- a/source/net/yacy/cora/storage/ZIPWriter.java
+++ b/source/net/yacy/cora/storage/ZIPWriter.java
@@ -55,7 +55,7 @@ public class ZIPWriter extends AbstractMap<String, ZipEntry> implements Map<Stri
try {
this.zos.putNextEntry(value);
this.backup.put(key, value);
- } catch (IOException e) {
+ } catch (final IOException e) {
e.printStackTrace();
}
return null;
diff --git a/source/net/yacy/crawler/Balancer.java b/source/net/yacy/crawler/Balancer.java
index f47073086..c649b668e 100644
--- a/source/net/yacy/crawler/Balancer.java
+++ b/source/net/yacy/crawler/Balancer.java
@@ -363,14 +363,14 @@ public class Balancer {
Row.Entry rowEntry;
try {
rowEntry = this.urlFileIndex.get(urlhash, true);
- } catch (IOException e) {
+ } catch (final IOException e) {
continue;
}
if (rowEntry == null) continue;
Request crawlEntry;
try {
crawlEntry = new Request(rowEntry);
- } catch (IOException e) {
+ } catch (final IOException e) {
continue;
}
cel.add(crawlEntry);
@@ -536,7 +536,7 @@ public class Balancer {
w = Latency.waitingRemaining(crawlEntry.url(), robots, this.myAgentIDs, this.minimumLocalDelta, this.minimumGlobalDelta);
//System.out.println("*** waitingRemaining = " + w + ", guessed = " + Latency.waitingRemainingGuessed(entry.getKey(), this.minimumLocalDelta, this.minimumGlobalDelta));
//System.out.println("*** explained: " + Latency.waitingRemainingExplain(crawlEntry.url(), robots, this.myAgentIDs, this.minimumLocalDelta, this.minimumGlobalDelta));
- } catch (IOException e1) {
+ } catch (final IOException e1) {
w = Latency.waitingRemainingGuessed(entry.getKey(), entry.getValue().hosthash, robots, this.myAgentIDs, this.minimumLocalDelta, this.minimumGlobalDelta);
}
@@ -626,7 +626,7 @@ public class Balancer {
// check blacklist (again) because the user may have created blacklist entries after the queue has been filled
if (Switchboard.urlBlacklist.isListed(BlacklistType.CRAWLER, request.url())) {
ConcurrentLog.fine("CRAWLER", "URL '" + request.url() + "' is in blacklist.");
- try {blackhandles.put(entry.getPrimaryKeyBytes());} catch (SpaceExceededException e) {}
+ try {blackhandles.put(entry.getPrimaryKeyBytes());} catch (final SpaceExceededException e) {}
continue;
}
diff --git a/source/net/yacy/crawler/CrawlSwitchboard.java b/source/net/yacy/crawler/CrawlSwitchboard.java
index cd41f8cbc..c573249b6 100644
--- a/source/net/yacy/crawler/CrawlSwitchboard.java
+++ b/source/net/yacy/crawler/CrawlSwitchboard.java
@@ -126,9 +126,9 @@ public final class CrawlSwitchboard {
CrawlProfile p;
try {
p = new CrawlProfile(this.profilesActiveCrawls.get(handle));
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
p = null;
- } catch ( final SpaceExceededException e ) {
+ } catch (final SpaceExceededException e ) {
p = null;
}
if ( p == null ) {
@@ -149,9 +149,9 @@ public final class CrawlSwitchboard {
try {
p = new CrawlProfile(this.profilesPassiveCrawls.get(handle));
ConcurrentLog.info("CrawlProfiles", "loaded Profile " + p.handle() + ": " + p.collectionName());
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
continue;
- } catch ( final SpaceExceededException e ) {
+ } catch (final SpaceExceededException e ) {
continue;
}
}
@@ -179,9 +179,9 @@ public final class CrawlSwitchboard {
Map<String, String> m;
try {
m = this.profilesActiveCrawls.get(profileKey);
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
m = null;
- } catch ( final SpaceExceededException e ) {
+ } catch (final SpaceExceededException e ) {
m = null;
}
if ( m == null ) {
@@ -199,9 +199,9 @@ public final class CrawlSwitchboard {
Map<String, String> m;
try {
m = this.profilesPassiveCrawls.get(profileKey);
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
m = null;
- } catch ( final SpaceExceededException e ) {
+ } catch (final SpaceExceededException e ) {
m = null;
}
if ( m == null ) {
@@ -485,7 +485,7 @@ public final class CrawlSwitchboard {
try {
this.profilesActiveCrawls =
new MapHeap(pdb, Word.commonHashLength, NaturalOrder.naturalOrder, 1024 * 64, 500, ' ');
- } catch ( final IOException e1 ) {
+ } catch (final IOException e1 ) {
ConcurrentLog.logException(e1);
this.profilesActiveCrawls = null;
}
@@ -506,9 +506,9 @@ public final class CrawlSwitchboard {
// getting next profile
try {
entry = new CrawlProfile(this.profilesActiveCrawls.get(handle));
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
continue;
- } catch ( final SpaceExceededException e ) {
+ } catch (final SpaceExceededException e ) {
continue;
}
if (!DEFAULT_PROFILES.contains(entry.name())) {
@@ -518,7 +518,7 @@ public final class CrawlSwitchboard {
hasDoneSomething = true;
}
}
- } catch ( final kelondroException e ) {
+ } catch (final kelondroException e ) {
resetProfiles();
hasDoneSomething = true;
}
@@ -560,7 +560,7 @@ public final class CrawlSwitchboard {
}
if (deletionCandidate.size() == 0) return 0;
}
- } catch (Throwable e) {
+ } catch (final Throwable e) {
return 0;
}
@@ -592,14 +592,14 @@ public final class CrawlSwitchboard {
MapHeap ret;
try {
ret = new MapHeap(file, Word.commonHashLength, NaturalOrder.naturalOrder, 1024 * 64, 500, ' ');
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
ConcurrentLog.logException(e);
FileUtils.deletedelete(file);
try {
ret =
new MapHeap(file, Word.commonHashLength, NaturalOrder.naturalOrder, 1024 * 64, 500, ' ');
- } catch ( final IOException e1 ) {
+ } catch (final IOException e1 ) {
ConcurrentLog.logException(e1);
ret = null;
}
diff --git a/source/net/yacy/crawler/data/Cache.java b/source/net/yacy/crawler/data/Cache.java
index ea067a3d2..05bc2b2fc 100644
--- a/source/net/yacy/crawler/data/Cache.java
+++ b/source/net/yacy/crawler/data/Cache.java
@@ -112,16 +112,16 @@ public final class Cache {
try {
byte[] k;
while (((k = q.take()) != MapHeap.POISON_QUEUE_ENTRY)) {
- if (!fileDB.containsKey(k)) try { delkeys.put(k); } catch (SpaceExceededException e) { break; }
+ if (!fileDB.containsKey(k)) try { delkeys.put(k); } catch (final SpaceExceededException e) { break; }
}
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
} finally {
// delete the collected keys from the metadata
ConcurrentLog.info("Cache", "cleanup thread collected " + delkeys.size() + " unused metadata entries; now deleting them from the file...");
for (byte[] k: delkeys) {
try {
responseHeaderDB.delete(k);
- } catch (IOException e) {
+ } catch (final IOException e) {
}
}
}
@@ -129,13 +129,13 @@ public final class Cache {
ConcurrentLog.info("Cache", "running check to remove unused file cache data");
delkeys.clear();
for (byte[] k: fileDB) {
- if (!responseHeaderDB.containsKey(k)) try { delkeys.put(k); } catch (SpaceExceededException e) { break; }
+ if (!responseHeaderDB.containsKey(k)) try { delkeys.put(k); } catch (final SpaceExceededException e) { break; }
}
ConcurrentLog.info("Cache", "cleanup thread collected " + delkeys.size() + " unused cache entries; now deleting them from the file...");
for (byte[] k: delkeys) {
try {
fileDB.delete(k);
- } catch (IOException e) {
+ } catch (final IOException e) {
}
}
ConcurrentLog.info("Cache", "terminated cleanup thread; responseHeaderDB.size() = " + responseHeaderDB.size() + ", fileDB.size() = " + fileDB.size());
@@ -260,9 +260,9 @@ public final class Cache {
Map<String, String> hdb = null;
try {
hdb = responseHeaderDB.get(hash);
- } catch (IOException e) {
+ } catch (final IOException e) {
return null;
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
return null;
}
if (hdb == null) return null;
diff --git a/source/net/yacy/crawler/data/CrawlProfile.java b/source/net/yacy/crawler/data/CrawlProfile.java
index 51baa7451..1f4772ca9 100644
--- a/source/net/yacy/crawler/data/CrawlProfile.java
+++ b/source/net/yacy/crawler/data/CrawlProfile.java
@@ -289,7 +289,7 @@ public class CrawlProfile extends ConcurrentHashMap<String, String> implements M
final String r = get(CRAWLER_URL_MUSTMATCH);
try {
this.crawlerurlmustmatch = (r == null || r.equals(CrawlProfile.MATCH_ALL_STRING)) ? CrawlProfile.MATCH_ALL_PATTERN : Pattern.compile(r, Pattern.CASE_INSENSITIVE);
- } catch (PatternSyntaxException e) { this.crawlerurlmustmatch = CrawlProfile.MATCH_NEVER_PATTERN; }
+ } catch (final PatternSyntaxException e) { this.crawlerurlmustmatch = CrawlProfile.MATCH_NEVER_PATTERN; }
}
return this.crawlerurlmustmatch;
}
@@ -303,7 +303,7 @@ public class CrawlProfile extends ConcurrentHashMap<String, String> implements M
final String r = get(CRAWLER_URL_MUSTNOTMATCH);
try {
this.crawlerurlmustnotmatch = (r == null || r.equals(CrawlProfile.MATCH_NEVER_STRING)) ? CrawlProfile.MATCH_NEVER_PATTERN : Pattern.compile(r, Pattern.CASE_INSENSITIVE);
- } catch (PatternSyntaxException e) { this.crawlerurlmustnotmatch = CrawlProfile.MATCH_NEVER_PATTERN; }
+ } catch (final PatternSyntaxException e) { this.crawlerurlmustnotmatch = CrawlProfile.MATCH_NEVER_PATTERN; }
}
return this.crawlerurlmustnotmatch;
}
@@ -317,7 +317,7 @@ public class CrawlProfile extends ConcurrentHashMap<String, String> implements M
final String r = get(CRAWLER_IP_MUSTMATCH);
try {
this.crawleripmustmatch = (r == null || r.equals(CrawlProfile.MATCH_ALL_STRING)) ? CrawlProfile.MATCH_ALL_PATTERN : Pattern.compile(r, Pattern.CASE_INSENSITIVE);
- } catch (PatternSyntaxException e) { this.crawleripmustmatch = CrawlProfile.MATCH_NEVER_PATTERN; }
+ } catch (final PatternSyntaxException e) { this.crawleripmustmatch = CrawlProfile.MATCH_NEVER_PATTERN; }
}
return this.crawleripmustmatch;
}
@@ -331,7 +331,7 @@ public class CrawlProfile extends ConcurrentHashMap<String, String> implements M
final String r = get(CRAWLER_IP_MUSTNOTMATCH);
try {
this.crawleripmustnotmatch = (r == null || r.equals(CrawlProfile.MATCH_NEVER_STRING)) ? CrawlProfile.MATCH_NEVER_PATTERN : Pattern.compile(r, Pattern.CASE_INSENSITIVE);
- } catch (PatternSyntaxException e) { this.crawleripmustnotmatch = CrawlProfile.MATCH_NEVER_PATTERN; }
+ } catch (final PatternSyntaxException e) { this.crawleripmustnotmatch = CrawlProfile.MATCH_NEVER_PATTERN; }
}
return this.crawleripmustnotmatch;
}
@@ -358,7 +358,7 @@ public class CrawlProfile extends ConcurrentHashMap<String, String> implements M
final String r = get(CRAWLER_URL_NODEPTHLIMITMATCH);
try {
this.crawlernodepthlimitmatch = (r == null || r.equals(CrawlProfile.MATCH_NEVER_STRING)) ? CrawlProfile.MATCH_NEVER_PATTERN : Pattern.compile(r, Pattern.CASE_INSENSITIVE);
- } catch (PatternSyntaxException e) { this.crawlernodepthlimitmatch = CrawlProfile.MATCH_NEVER_PATTERN; }
+ } catch (final PatternSyntaxException e) { this.crawlernodepthlimitmatch = CrawlProfile.MATCH_NEVER_PATTERN; }
}
return this.crawlernodepthlimitmatch;
}
@@ -372,7 +372,7 @@ public class CrawlProfile extends ConcurrentHashMap<String, String> implements M
final String r = get(INDEXING_URL_MUSTMATCH);
try {
this.indexurlmustmatch = (r == null || r.equals(CrawlProfile.MATCH_ALL_STRING)) ? CrawlProfile.MATCH_ALL_PATTERN : Pattern.compile(r, Pattern.CASE_INSENSITIVE);
- } catch (PatternSyntaxException e) { this.indexurlmustmatch = CrawlProfile.MATCH_NEVER_PATTERN; }
+ } catch (final PatternSyntaxException e) { this.indexurlmustmatch = CrawlProfile.MATCH_NEVER_PATTERN; }
}
return this.indexurlmustmatch;
}
@@ -386,7 +386,7 @@ public class CrawlProfile extends ConcurrentHashMap<String, String> implements M
final String r = get(INDEXING_URL_MUSTNOTMATCH);
try {
this.indexurlmustnotmatch = (r == null || r.equals(CrawlProfile.MATCH_NEVER_STRING)) ? CrawlProfile.MATCH_NEVER_PATTERN : Pattern.compile(r, Pattern.CASE_INSENSITIVE);
- } catch (PatternSyntaxException e) { this.indexurlmustnotmatch = CrawlProfile.MATCH_NEVER_PATTERN; }
+ } catch (final PatternSyntaxException e) { this.indexurlmustnotmatch = CrawlProfile.MATCH_NEVER_PATTERN; }
}
return this.indexurlmustnotmatch;
}
@@ -400,7 +400,7 @@ public class CrawlProfile extends ConcurrentHashMap<String, String> implements M
final String r = get(INDEXING_CONTENT_MUSTMATCH);
try {
this.indexcontentmustmatch = (r == null || r.equals(CrawlProfile.MATCH_ALL_STRING)) ? CrawlProfile.MATCH_ALL_PATTERN : Pattern.compile(r, Pattern.CASE_INSENSITIVE);
- } catch (PatternSyntaxException e) { this.indexcontentmustmatch = CrawlProfile.MATCH_NEVER_PATTERN; }
+ } catch (final PatternSyntaxException e) { this.indexcontentmustmatch = CrawlProfile.MATCH_NEVER_PATTERN; }
}
return this.indexcontentmustmatch;
}
@@ -414,7 +414,7 @@ public class CrawlProfile extends ConcurrentHashMap<String, String> implements M
final String r = get(INDEXING_CONTENT_MUSTNOTMATCH);
try {
this.indexcontentmustnotmatch = (r == null || r.equals(CrawlProfile.MATCH_NEVER_STRING)) ? CrawlProfile.MATCH_NEVER_PATTERN : Pattern.compile(r, Pattern.CASE_INSENSITIVE);
- } catch (PatternSyntaxException e) { this.indexcontentmustnotmatch = CrawlProfile.MATCH_NEVER_PATTERN; }
+ } catch (final PatternSyntaxException e) { this.indexcontentmustnotmatch = CrawlProfile.MATCH_NEVER_PATTERN; }
}
return this.indexcontentmustnotmatch;
}
diff --git a/source/net/yacy/crawler/data/CrawlQueues.java b/source/net/yacy/crawler/data/CrawlQueues.java
index 5c276a89a..3b9460838 100644
--- a/source/net/yacy/crawler/data/CrawlQueues.java
+++ b/source/net/yacy/crawler/data/CrawlQueues.java
@@ -120,7 +120,7 @@ public class CrawlQueues {
public void clear() {
// wait for all workers to finish
for (final Loader w: this.workers.values()) w.interrupt();
- for (final Loader w: this.workers.values()) try {w.join(10);} catch (InterruptedException e1) {}
+ for (final Loader w: this.workers.values()) try {w.join(10);} catch (final InterruptedException e1) {}
this.workers.clear();
this.remoteCrawlProviderHashes.clear();
this.noticeURL.clear();
diff --git a/source/net/yacy/crawler/data/ZURL.java b/source/net/yacy/crawler/data/ZURL.java
index 8a182955e..9a578ef48 100644
--- a/source/net/yacy/crawler/data/ZURL.java
+++ b/source/net/yacy/crawler/data/ZURL.java
@@ -164,7 +164,7 @@ public class ZURL implements Iterable<ZURL.Entry> {
if (NaturalOrder.naturalOrder.equal(hosthash, 0, b, 6, 6)) i.remove();
}
}
- } catch (IOException e) {}
+ } catch (final IOException e) {}
}
};
if (concurrent) t.start(); else t.run();
diff --git a/source/net/yacy/crawler/retrieval/FileLoader.java b/source/net/yacy/crawler/retrieval/FileLoader.java
index f7a6cf8d9..ab5231ef5 100644
--- a/source/net/yacy/crawler/retrieval/FileLoader.java
+++ b/source/net/yacy/crawler/retrieval/FileLoader.java
@@ -69,7 +69,7 @@ public class FileLoader {
// process directories: transform them to html with meta robots=noindex (using the ftpc lib)
String[] l = null;
- try {l = url.list();} catch (IOException e) {}
+ try {l = url.list();} catch (final IOException e) {}
if (l != null) {
String u = url.toNormalform(true);
List<String> list = new ArrayList<String>();
@@ -105,7 +105,7 @@ public class FileLoader {
long size;
try {
size = url.length();
- } catch (Exception e) {
+ } catch (final Exception e) {
size = -1;
}
String parserError = null;
diff --git a/source/net/yacy/crawler/retrieval/Request.java b/source/net/yacy/crawler/retrieval/Request.java
index 531531e55..de8cfd5bb 100644
--- a/source/net/yacy/crawler/retrieval/Request.java
+++ b/source/net/yacy/crawler/retrieval/Request.java
@@ -180,7 +180,7 @@ public class Request extends WorkflowJob
this.size = entry.getColLong(14);
this.statusMessage = "loaded(kelondroRow.Entry)";
this.initialHash = this.url.hashCode();
- } catch ( Throwable e ) {
+ } catch (final Throwable e ) {
throw new IOException(e.getMessage());
}
return;
diff --git a/source/net/yacy/crawler/retrieval/SMBLoader.java b/source/net/yacy/crawler/retrieval/SMBLoader.java
index 8e76e025e..1484ea1a2 100644
--- a/source/net/yacy/crawler/retrieval/SMBLoader.java
+++ b/source/net/yacy/crawler/retrieval/SMBLoader.java
@@ -80,7 +80,7 @@ public class SMBLoader {
// process directories: transform them to html with meta robots=noindex (using the ftpc lib)
String[] l = null;
- try {l = url.list();} catch (IOException e) {}
+ try {l = url.list();} catch (final IOException e) {}
if (l != null) {
String u = url.toNormalform(true);
List<String> list = new ArrayList<String>();
@@ -123,7 +123,7 @@ public class SMBLoader {
long size;
try {
size = url.length();
- } catch (Exception e) {
+ } catch (final Exception e) {
size = -1;
}
String parserError = null;
@@ -185,13 +185,13 @@ public class SMBLoader {
System.out.write( b, 0, n );
}
}
- } catch (SmbException e) {
+ } catch (final SmbException e) {
ConcurrentLog.logException(e);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
ConcurrentLog.logException(e);
- } catch (UnknownHostException e) {
+ } catch (final UnknownHostException e) {
ConcurrentLog.logException(e);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
diff --git a/source/net/yacy/crawler/retrieval/URLRewriterLibrary.java b/source/net/yacy/crawler/retrieval/URLRewriterLibrary.java
index dd83cbc0e..10102d4fb 100644
--- a/source/net/yacy/crawler/retrieval/URLRewriterLibrary.java
+++ b/source/net/yacy/crawler/retrieval/URLRewriterLibrary.java
@@ -59,12 +59,12 @@ public class URLRewriterLibrary {
if (p < 0) p = line.indexOf(':');
if (p > 0) try {
this.rewriters.put(Pattern.compile(line.substring(0, p)), line.substring(p + 1));
- } catch (PatternSyntaxException e) {
+ } catch (final PatternSyntaxException e) {
log.warn("bad pattern: " + line.substring(0, p));
}
}
}
- } catch (Throwable e) {
+ } catch (final Throwable e) {
log.warn("cannot read stemming file " + f, e);
}
}
diff --git a/source/net/yacy/crawler/robots/RobotsTxt.java b/source/net/yacy/crawler/robots/RobotsTxt.java
index e8452996d..3acd8add9 100644
--- a/source/net/yacy/crawler/robots/RobotsTxt.java
+++ b/source/net/yacy/crawler/robots/RobotsTxt.java
@@ -33,6 +33,7 @@ import java.util.Date;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
import java.util.regex.Pattern;
import net.yacy.cora.document.MultiProtocolURI;
@@ -54,7 +55,7 @@ public class RobotsTxt {
protected static final String ROBOTS_DB_PATH_SEPARATOR = ";";
protected static final Pattern ROBOTS_DB_PATH_SEPARATOR_MATCHER = Pattern.compile(ROBOTS_DB_PATH_SEPARATOR);
- private final ConcurrentHashMap<String, DomSync> syncObjects;
+ private final ConcurrentMap<String, DomSync> syncObjects;
//private static final HashSet<String> loadedRobots = new HashSet<String>(); // only for debugging
private final WorkTables tables;
private final LoaderDispatcher loader;
@@ -101,7 +102,7 @@ public class RobotsTxt {
BEncodedHeap robotsTable = null;
try {
robotsTable = this.tables.getHeap(WorkTables.TABLE_ROBOTS_NAME);
- } catch (IOException e1) {
+ } catch (final IOException e1) {
log.severe("tables not available", e1);
}
try {
@@ -109,7 +110,7 @@ public class RobotsTxt {
} catch (final SpaceExceededException e) {
log.warn("memory exhausted", e);
record = null;
- } catch (IOException e) {
+ } catch (final IOException e) {
log.warn("cannot get robotstxt from table", e);
record = null;
}
@@ -138,7 +139,7 @@ public class RobotsTxt {
} catch (final SpaceExceededException e) {
log.warn("memory exhausted", e);
record = null;
- } catch (IOException e) {
+ } catch (final IOException e) {
log.warn("cannot get robotstxt from table", e);
record = null;
}
@@ -163,8 +164,8 @@ public class RobotsTxt {
if (log.isFine()) log.fine("Trying to download the robots.txt file from URL '" + robotsURL + "'.");
Request request = new Request(robotsURL, null);
try {
- response = this.loader.load(request, CacheStrategy.NOCACHE, null, 0, 3000);
- } catch (Throwable e) {
+ response = RobotsTxt.this.loader.load(request, CacheStrategy.NOCACHE, null, 0, 3000);
+ } catch (final Throwable e) {
log.info("Trying to download the robots.txt file from URL '" + robotsURL + "' failed - " + e.getMessage());
response = null;
}
@@ -188,7 +189,7 @@ public class RobotsTxt {
final BEncodedHeap robotsTable;
try {
robotsTable = this.tables.getHeap(WorkTables.TABLE_ROBOTS_NAME);
- } catch (IOException e1) {
+ } catch (final IOException e1) {
log.severe("tables not available", e1);
return;
}
@@ -220,7 +221,7 @@ public class RobotsTxt {
Request request = new Request(robotsURL, null);
try {
response = RobotsTxt.this.loader.load(request, CacheStrategy.NOCACHE, null, 0, 3000);
- } catch (IOException e) {
+ } catch (final IOException e) {
response = null;
}
}
@@ -259,7 +260,7 @@ public class RobotsTxt {
addEntry(robotsTxt4Host);
if (robotsTable.size() <= sz) {
log.severe("new entry in robots.txt table failed, resetting database");
- try {clear();} catch (IOException e) {}
+ try {clear();} catch (final IOException e) {}
addEntry(robotsTxt4Host);
}
}
diff --git a/source/net/yacy/data/BlogBoard.java b/source/net/yacy/data/BlogBoard.java
index f18760ac1..303081776 100644
--- a/source/net/yacy/data/BlogBoard.java
+++ b/source/net/yacy/data/BlogBoard.java
@@ -129,9 +129,9 @@ public class BlogBoard {
try {
this.database.insert(UTF8.getBytes(page.key), page.record);
ret = page.key;
- } catch (IOException ex) {
+ } catch (final IOException ex) {
ConcurrentLog.logException(ex);
- } catch (SpaceExceededException ex) {
+ } catch (final SpaceExceededException ex) {
ConcurrentLog.logException(ex);
}
return ret;
@@ -149,7 +149,7 @@ public class BlogBoard {
} catch (final IOException e) {
ConcurrentLog.logException(e);
record = null;
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
record = null;
}
diff --git a/source/net/yacy/data/BookmarkDate.java b/source/net/yacy/data/BookmarkDate.java
index 9cf685665..15d9ea6cd 100644
--- a/source/net/yacy/data/BookmarkDate.java
+++ b/source/net/yacy/data/BookmarkDate.java
@@ -64,7 +64,7 @@ public class BookmarkDate {
map = datesTable.get(UTF8.getBytes(date));
} catch (final IOException e) {
map = null;
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
map = null;
}
if (map == null) {
@@ -148,13 +148,13 @@ public class BookmarkDate {
if (this.size() >0) {
try {
datesTable.insert(UTF8.getBytes(getDateString()), mem);
- } catch (Exception e) {
+ } catch (final Exception e) {
ConcurrentLog.logException(e);
}
} else {
try {
datesTable.delete(UTF8.getBytes(getDateString()));
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
diff --git a/source/net/yacy/data/BookmarksDB.java b/source/net/yacy/data/BookmarksDB.java
index 543e0b979..c078d57aa 100644
--- a/source/net/yacy/data/BookmarksDB.java
+++ b/source/net/yacy/data/BookmarksDB.java
@@ -83,7 +83,7 @@ public class BookmarksDB {
while (it.hasNext()) {
try {
bookmark = it.next();
- } catch (Throwable e) {
+ } catch (final Throwable e) {
//Log.logException(e);
continue;
}
@@ -158,7 +158,7 @@ public class BookmarksDB {
final Map<String, String> map = this.bookmarks.get(ASCII.getBytes(urlHash));
if (map == null) throw new IOException("cannot get bookmark for url hash " + urlHash);
return new Bookmark(map);
- } catch (Throwable e) {
+ } catch (final Throwable e) {
throw new IOException(e.getMessage());
}
}
@@ -167,7 +167,7 @@ public class BookmarksDB {
Bookmark bookmark;
try {
bookmark = getBookmark(urlHash);
- } catch (IOException e1) {
+ } catch (final IOException e1) {
return false;
}
final Set<String> tagSet = bookmark.getTags();
@@ -229,7 +229,7 @@ public class BookmarksDB {
if (bm != null && bm.getPublic()) {
set.add(bm.getUrlHash());
}
- } catch (IOException e) {
+ } catch (final IOException e) {
}
}
}
@@ -320,7 +320,7 @@ public class BookmarksDB {
set.add(tag);
}
}
- } catch (IOException e) {
+ } catch (final IOException e) {
}
}
return set.iterator();
@@ -360,7 +360,7 @@ public class BookmarksDB {
bookmark.setTags(tagSet, true); // might not be needed, but doesn't hurt
if(!"".equals(newName)) bookmark.addTag(newName);
saveBookmark(bookmark);
- } catch (IOException e) {
+ } catch (final IOException e) {
}
}
return true;
@@ -376,7 +376,7 @@ public class BookmarksDB {
bookmark = getBookmark(urlHash);
bookmark.addTag(newTag);
saveBookmark(bookmark);
- } catch (IOException e) {
+ } catch (final IOException e) {
}
}
}
@@ -516,7 +516,7 @@ public class BookmarksDB {
}else{
this.entry.put(BOOKMARK_TIMESTAMP, String.valueOf(System.currentTimeMillis()));
}
- } catch (IOException e) {
+ } catch (final IOException e) {
}
final BookmarkDate.Entry bmDate=BookmarksDB.this.dates.getDate(this.entry.get(BOOKMARK_TIMESTAMP));
bmDate.add(this.urlHash);
@@ -707,7 +707,7 @@ public class BookmarksDB {
public Bookmark next() {
try {
return getBookmark(UTF8.String(this.bookmarkIter.next()));
- } catch (IOException e) {
+ } catch (final IOException e) {
this.bookmarkIter.remove();
return null;
}
@@ -746,7 +746,7 @@ public class BookmarksDB {
return -1;
}
if (bm1.getTimeStamp() - bm2.getTimeStamp() > 0) return 1;
- } catch (IOException e) {
+ } catch (final IOException e) {
}
return -1;
}
diff --git a/source/net/yacy/data/DidYouMean.java b/source/net/yacy/data/DidYouMean.java
index 95e2b8388..b826706bf 100644
--- a/source/net/yacy/data/DidYouMean.java
+++ b/source/net/yacy/data/DidYouMean.java
@@ -160,7 +160,7 @@ public class DidYouMean {
}
scored.inc(s, this.segment.getWordCountGuess(s.toString()));
}
- } catch (ConcurrentModificationException e) {
+ } catch (final ConcurrentModificationException e) {
}
final SortedSet<StringBuilder> countSorted = Collections.synchronizedSortedSet(new TreeSet<StringBuilder>(new headMatchingComparator(this.word, this.INDEX_SIZE_COMPARATOR)));
final int wc = this.segment.getWordCountGuess(this.word.toString()); // all counts must be greater than this
diff --git a/source/net/yacy/data/MessageBoard.java b/source/net/yacy/data/MessageBoard.java
index cee3e015d..614e0ca06 100644
--- a/source/net/yacy/data/MessageBoard.java
+++ b/source/net/yacy/data/MessageBoard.java
@@ -199,7 +199,7 @@ public class MessageBoard {
} catch (final IOException e) {
ConcurrentLog.logException(e);
return null;
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
return null;
}
diff --git a/source/net/yacy/data/UserDB.java b/source/net/yacy/data/UserDB.java
index f5a5e3ac6..584acddf5 100644
--- a/source/net/yacy/data/UserDB.java
+++ b/source/net/yacy/data/UserDB.java
@@ -73,7 +73,7 @@ public final class UserDB {
userTableFile.getParentFile().mkdirs();
try {
userTable = new MapHeap(userTableFile, 128, NaturalOrder.naturalOrder, 1024 * 64, 10, '_');
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -103,7 +103,7 @@ public final class UserDB {
record = userTable.get(UTF8.getBytes(userName));
} catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
}
diff --git a/source/net/yacy/data/WorkTables.java b/source/net/yacy/data/WorkTables.java
index 8a057bbd7..c144da4e4 100644
--- a/source/net/yacy/data/WorkTables.java
+++ b/source/net/yacy/data/WorkTables.java
@@ -115,9 +115,9 @@ public class WorkTables extends Tables {
Row row = null;
try {
row = (pk == null) ? null : super.select(TABLE_API_NAME, pk);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
}
@@ -149,9 +149,9 @@ public class WorkTables extends Tables {
super.update(TABLE_API_NAME, row);
assert pk != null;
}
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
}
ConcurrentLog.info("APICALL", apiurl);
@@ -200,9 +200,9 @@ public class WorkTables extends Tables {
data.put(TABLE_API_COL_APICALL_SCHEDULE_UNIT, UTF8.getBytes(unit));
calculateAPIScheduler(data, false); // set next execution time
pk = super.insert(TABLE_API_NAME, data);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
}
ConcurrentLog.info("APICALL", apiurl);
@@ -230,9 +230,9 @@ public class WorkTables extends Tables {
row = null;
try {
row = select(WorkTables.TABLE_API_NAME, UTF8.getBytes(pk));
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
}
if (row == null) continue;
@@ -242,7 +242,7 @@ public class WorkTables extends Tables {
try {
client.GETbytes(url);
l.put(url, client.getStatusCode());
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
l.put(url, -1);
}
@@ -260,7 +260,7 @@ public class WorkTables extends Tables {
try {
client.GETbytes(url);
return client.getStatusCode();
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
return -1;
}
@@ -315,7 +315,7 @@ public class WorkTables extends Tables {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmm");
d = dateFormat.parse(dateFormat.format(new Date()).substring(0, 8) + action).getTime();
if (d < System.currentTimeMillis()) d += day;
- } catch (ParseException e) {} else {
+ } catch (final ParseException e) {} else {
row.put(WorkTables.TABLE_API_COL_DATE_NEXT_EXEC, "");
return;
}
@@ -342,7 +342,7 @@ public class WorkTables extends Tables {
data.put(TABLE_SEARCH_FAILURE_COL_WORDS, queryHashes.export());
data.put(TABLE_SEARCH_FAILURE_COL_COMMENT, UTF8.getBytes(reason));
super.insert(TABLE_SEARCH_FAILURE_NAME, url.hash(), data);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -350,7 +350,7 @@ public class WorkTables extends Tables {
public boolean failURLsContains(byte[] urlhash) {
try {
return super.has(TABLE_SEARCH_FAILURE_NAME, urlhash);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
return false;
}
@@ -373,7 +373,7 @@ public class WorkTables extends Tables {
this.delete(TABLE_SEARCH_FAILURE_NAME, row.getPK());
}
}
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -389,7 +389,7 @@ public class WorkTables extends Tables {
row = i.next();
comments.put(row.getPK(), UTF8.String(row.get(WorkTables.TABLE_API_COL_COMMENT)));
}
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
return comments;
diff --git a/source/net/yacy/data/wiki/WikiBoard.java b/source/net/yacy/data/wiki/WikiBoard.java
index 19704f559..4d2f16e71 100644
--- a/source/net/yacy/data/wiki/WikiBoard.java
+++ b/source/net/yacy/data/wiki/WikiBoard.java
@@ -408,7 +408,7 @@ public class WikiBoard {
ret = (record == null) ? newEntry(copyOfKey, ANONYMOUS, Domains.LOCALHOST, "New Page", UTF8.getBytes("")) : new Entry(copyOfKey, record);
} catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
}
return ret;
diff --git a/source/net/yacy/data/ymark/YMarkAutoTagger.java b/source/net/yacy/data/ymark/YMarkAutoTagger.java
index f456a4f00..85a0c7c06 100644
--- a/source/net/yacy/data/ymark/YMarkAutoTagger.java
+++ b/source/net/yacy/data/ymark/YMarkAutoTagger.java
@@ -215,7 +215,7 @@ public class YMarkAutoTagger implements Runnable, Thread.UncaughtExceptionHandle
String exception = "/IOExceptions";
try {
document = loadDocument(url, loader);
- } catch (IOException e) {
+ } catch (final IOException e) {
exception = e.getMessage();
int start = exception.indexOf('\'')+9;
int end = exception.indexOf('\'', start);
diff --git a/source/net/yacy/data/ymark/YMarkDMOZImporter.java b/source/net/yacy/data/ymark/YMarkDMOZImporter.java
index 384b64c1e..0180ee05b 100644
--- a/source/net/yacy/data/ymark/YMarkDMOZImporter.java
+++ b/source/net/yacy/data/ymark/YMarkDMOZImporter.java
@@ -110,7 +110,7 @@ public class YMarkDMOZImporter extends YMarkImporter {
if (this.isNewEntry && this.isSubtopic && localName.equals(DMOZ.ExternalPage.name())) {
try {
bookmarks.put(this.bmk);
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
e.printStackTrace();
} finally {
this.isSubtopic = false;
diff --git a/source/net/yacy/data/ymark/YMarkEntry.java b/source/net/yacy/data/ymark/YMarkEntry.java
index 66f5b66b1..d29802a7f 100644
--- a/source/net/yacy/data/ymark/YMarkEntry.java
+++ b/source/net/yacy/data/ymark/YMarkEntry.java
@@ -208,7 +208,7 @@ public class YMarkEntry extends TreeMap<String, String> {
if(this.containsKey(YMarkEntry.BOOKMARK.URL.key()))
try {
return YMarkUtil.getBookmarkId(this.get(YMarkEntry.BOOKMARK.URL.key()));
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
ConcurrentLog.warn(YMarkTables.BOOKMARKS_LOG, "getUrlHash - MalformedURLException for YMarkEntry: "+this.get(YMarkEntry.BOOKMARK.URL.key()));
}
return null;
diff --git a/source/net/yacy/data/ymark/YMarkHTMLImporter.java b/source/net/yacy/data/ymark/YMarkHTMLImporter.java
index cdeb9334f..19d834498 100644
--- a/source/net/yacy/data/ymark/YMarkHTMLImporter.java
+++ b/source/net/yacy/data/ymark/YMarkHTMLImporter.java
@@ -109,7 +109,7 @@ public class YMarkHTMLImporter extends YMarkImporter {
try {
bookmarks.put(this.bmk);
bmk = new YMarkEntry();
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
}
}
@@ -164,7 +164,7 @@ public class YMarkHTMLImporter extends YMarkImporter {
if (!this.bmk.isEmpty()) {
try {
bookmarks.put(this.bmk);
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
}
}
diff --git a/source/net/yacy/data/ymark/YMarkImporter.java b/source/net/yacy/data/ymark/YMarkImporter.java
index 17e4b129a..e00a87bb5 100644
--- a/source/net/yacy/data/ymark/YMarkImporter.java
+++ b/source/net/yacy/data/ymark/YMarkImporter.java
@@ -51,13 +51,13 @@ public abstract class YMarkImporter implements Runnable {
public void run() {
try {
parse();
- } catch (Exception e) {
+ } catch (final Exception e) {
ConcurrentLog.logException(e);
} finally {
try {
ConcurrentLog.info(YMarkTables.BOOKMARKS_LOG, this.importer+" Importer inserted poison pill in queue");
this.bookmarks.put(YMarkEntry.POISON);
- } catch (InterruptedException e1) {
+ } catch (final InterruptedException e1) {
ConcurrentLog.logException(e1);
}
}
@@ -66,7 +66,7 @@ public abstract class YMarkImporter implements Runnable {
public YMarkEntry take() {
try {
return this.bookmarks.take();
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
return null;
}
diff --git a/source/net/yacy/data/ymark/YMarkJSONImporter.java b/source/net/yacy/data/ymark/YMarkJSONImporter.java
index 6335092af..12bf87fc4 100644
--- a/source/net/yacy/data/ymark/YMarkJSONImporter.java
+++ b/source/net/yacy/data/ymark/YMarkJSONImporter.java
@@ -118,7 +118,7 @@ public class YMarkJSONImporter implements Runnable, ContentHandler{
}
try {
this.bookmarks.put(this.bmk);
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
}
this.bmk = new YMarkEntry();
@@ -169,15 +169,15 @@ public class YMarkJSONImporter implements Runnable, ContentHandler{
try {
ConcurrentLog.info(YMarkTables.BOOKMARKS_LOG, "JSON Importer run()");
this.parser.parse(this.bmk_file, this, true);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (ParseException e) {
+ } catch (final ParseException e) {
ConcurrentLog.logException(e);
} finally {
try {
ConcurrentLog.info(YMarkTables.BOOKMARKS_LOG, "JSON Importer inserted poison pill in queue");
this.bookmarks.put(YMarkEntry.POISON);
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
}
}
@@ -186,7 +186,7 @@ public class YMarkJSONImporter implements Runnable, ContentHandler{
public YMarkEntry take() {
try {
return this.bookmarks.take();
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
return null;
}
diff --git a/source/net/yacy/data/ymark/YMarkRDF.java b/source/net/yacy/data/ymark/YMarkRDF.java
index b4f8028e0..5e0796141 100644
--- a/source/net/yacy/data/ymark/YMarkRDF.java
+++ b/source/net/yacy/data/ymark/YMarkRDF.java
@@ -69,7 +69,7 @@ public class YMarkRDF {
this.model.write(baos, format);
try {
return baos.toString("UTF-8");
- } catch (UnsupportedEncodingException e) {
+ } catch (final UnsupportedEncodingException e) {
return new String();
}
}
diff --git a/source/net/yacy/data/ymark/YMarkTables.java b/source/net/yacy/data/ymark/YMarkTables.java
index a54526e3b..2af2fef03 100644
--- a/source/net/yacy/data/ymark/YMarkTables.java
+++ b/source/net/yacy/data/ymark/YMarkTables.java
@@ -148,9 +148,9 @@ public class YMarkTables {
+" of table "+bmk_table+" containing "+this.worktables.size(bmk_table)+ " bookmarks"
+" ("+(System.currentTimeMillis()-time)+"ms)");
}
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (TableColumnIndexException e) {
+ } catch (final TableColumnIndexException e) {
// currently nothing to do...
}
}
@@ -167,7 +167,7 @@ public class YMarkTables {
if(this.worktables.hasIndex(bmk_table, YMarkEntry.BOOKMARK.FOLDERS.key())) {
try {
this.worktables.getIndex(bmk_table).delete(urlHash);
- } catch (TableColumnIndexException e) {
+ } catch (final TableColumnIndexException e) {
// currently nothing to do...
}
}
@@ -212,7 +212,7 @@ public class YMarkTables {
tags.put(tag, new YMarkTag(tag, index.get(YMarkEntry.BOOKMARK.TAGS.key(), tag).size()));
}
return tags;
- } catch (Exception e) {
+ } catch (final Exception e) {
// nothing to do
}
}
@@ -247,7 +247,7 @@ public class YMarkTables {
}
if (!root.equals(YMarkTables.FOLDERS_ROOT)) { folders.add(root); }
return folders;
- } catch (Exception e) {
+ } catch (final Exception e) {
ConcurrentLog.logException(e);
}
}
@@ -336,7 +336,7 @@ public class YMarkTables {
if(this.worktables.hasIndex(bmk_table)) {
try {
this.worktables.getIndex(bmk_table).update(YMarkEntry.BOOKMARK.TAGS.key(), YMarkEntry.BOOKMARK.TAGS.seperator(), row);
- } catch (Exception e) {
+ } catch (final Exception e) {
// nothing to do
}
}
@@ -412,7 +412,7 @@ public class YMarkTables {
byte[] urlHash = null;
try {
urlHash = YMarkUtil.getBookmarkId(bmk.get(YMarkEntry.BOOKMARK.URL.key()));
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
ConcurrentLog.info("BOOKMARKIMPORT", "invalid url: "+bmk.get(YMarkEntry.BOOKMARK.URL.key()));
}
Tables.Row bmk_row = null;
@@ -420,7 +420,7 @@ public class YMarkTables {
if (urlHash != null) {
try {
bmk_row = this.worktables.select(bmk_table, urlHash);
- } catch (Exception e) {
+ } catch (final Exception e) {
}
if (bmk_row == null) {
@@ -433,7 +433,7 @@ public class YMarkTables {
try {
if(this.worktables.hasIndex(bmk_table))
this.worktables.getIndex(bmk_table).add(YMarkEntry.BOOKMARK.indexColumns(), bmk, urlHash);
- } catch (Exception e) {
+ } catch (final Exception e) {
// nothing to do
}
} else {
@@ -495,7 +495,7 @@ public class YMarkTables {
try {
if(this.worktables.hasIndex(bmk_table))
this.worktables.getIndex(bmk_table).update(YMarkEntry.BOOKMARK.indexColumns(), bmk_row);
- } catch (Exception e) {
+ } catch (final Exception e) {
// nothing to do
}
}
diff --git a/source/net/yacy/data/ymark/YMarkXBELImporter.java b/source/net/yacy/data/ymark/YMarkXBELImporter.java
index 2a286d87c..d516a95ad 100644
--- a/source/net/yacy/data/ymark/YMarkXBELImporter.java
+++ b/source/net/yacy/data/ymark/YMarkXBELImporter.java
@@ -153,19 +153,19 @@ public class YMarkXBELImporter extends YMarkImporter {
this.bmk.put(YMarkEntry.BOOKMARK.VISITS.key(), atts.getValue(uri, YMarkEntry.BOOKMARK.VISITS.xbel_attrb()));
try {
date.parseISO8601(atts.getValue(uri, YMarkEntry.BOOKMARK.DATE_ADDED.xbel_attrb()));
- } catch (ParseException e) {
+ } catch (final ParseException e) {
// TODO: exception handling
}
this.bmk.put(YMarkEntry.BOOKMARK.DATE_ADDED.key(), date.toString());
try {
date.parseISO8601(atts.getValue(uri, YMarkEntry.BOOKMARK.DATE_VISITED.xbel_attrb()));
- } catch (ParseException e) {
+ } catch (final ParseException e) {
// TODO: exception handling
}
this.bmk.put(YMarkEntry.BOOKMARK.DATE_VISITED.key(), date.toString());
try {
date.parseISO8601(atts.getValue(uri, YMarkEntry.BOOKMARK.DATE_MODIFIED.xbel_attrb()));
- } catch (ParseException e) {
+ } catch (final ParseException e) {
// TODO: exception handling
}
this.bmk.put(YMarkEntry.BOOKMARK.DATE_MODIFIED.key(), date.toString());
@@ -217,7 +217,7 @@ public class YMarkXBELImporter extends YMarkImporter {
try {
bookmarks.put(this.bmk);
bmk = new YMarkEntry();
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
}
}
diff --git a/source/net/yacy/document/Document.java b/source/net/yacy/document/Document.java
index 1b626007d..08fce3550 100644
--- a/source/net/yacy/document/Document.java
+++ b/source/net/yacy/document/Document.java
@@ -868,7 +868,7 @@ dc_rights
if (parser instanceof ContentScraper) {
final ContentScraper html = (ContentScraper) parser;
String refresh = html.getRefreshPath();
- if (refresh != null && refresh.length() > 0) try {result.put(new DigestURI(refresh), "refresh");} catch (MalformedURLException e) {}
+ if (refresh != null && refresh.length() > 0) try {result.put(new DigestURI(refresh), "refresh");} catch (final MalformedURLException e) {}
DigestURI canonical = html.getCanonical();
if (canonical != null) result.put(canonical, "canonical");
}
diff --git a/source/net/yacy/document/ImageParser.java b/source/net/yacy/document/ImageParser.java
index 162c109ab..69c25e576 100644
--- a/source/net/yacy/document/ImageParser.java
+++ b/source/net/yacy/document/ImageParser.java
@@ -54,7 +54,7 @@ public class ImageParser {
try {
ImageIO.setUseCache(false); // do not write a cache to disc; keep in RAM
image = ImageIO.read(new ByteArrayInputStream(source));
- } catch (IOException e) {
+ } catch (final IOException e) {
Image i = Toolkit.getDefaultToolkit().createImage(source);
mediaTracker.addImage(i, 0);
try {mediaTracker.waitForID(0);} catch (final InterruptedException ee) {}
diff --git a/source/net/yacy/document/LibraryProvider.java b/source/net/yacy/document/LibraryProvider.java
index a51ad8707..592e1ac0b 100644
--- a/source/net/yacy/document/LibraryProvider.java
+++ b/source/net/yacy/document/LibraryProvider.java
@@ -91,7 +91,7 @@ public class LibraryProvider {
private Dictionary(final String nickname, final String url) {
try {
this.filename = (new MultiProtocolURI(url)).getFileName();
- } catch ( final MalformedURLException e ) {
+ } catch (final MalformedURLException e ) {
assert false;
}
this.nickname = nickname;
@@ -219,7 +219,7 @@ public class LibraryProvider {
final ArrayList<String> derewo = loadDeReWo(derewoInput, true);
try {
writeWords(derewoOutput, derewo);
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
}
}
@@ -243,7 +243,7 @@ public class LibraryProvider {
if ( dictInput.exists() ) {
try {
JenaTripleStore.LoadNTriples(Files.read(dictInput));
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
}
}
@@ -276,7 +276,7 @@ public class LibraryProvider {
Tagging pndVoc = new Tagging("Persons", null, objectspace, map);
autotagging.addVocabulary(pndVoc);
ConcurrentLog.info("LibraryProvider", "added pnd vocabulary to autotagging");
- } catch (IOException e) {
+ } catch (final IOException e) {
}
}
@@ -335,10 +335,10 @@ public class LibraryProvider {
try {
final ZipFile zip = new ZipFile(file);
derewoTxtEntry = zip.getInputStream(zip.getEntry("derewo-v-100000t-2009-04-30-0.1"));
- } catch ( final ZipException e ) {
+ } catch (final ZipException e ) {
ConcurrentLog.logException(e);
return list;
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
return list;
}
@@ -378,13 +378,13 @@ public class LibraryProvider {
}
}
reader.close();
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
} finally {
if ( reader != null ) {
try {
reader.close();
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
}
}
}
diff --git a/source/net/yacy/document/SnippetExtractor.java b/source/net/yacy/document/SnippetExtractor.java
index 5be4f8c79..4414119ff 100644
--- a/source/net/yacy/document/SnippetExtractor.java
+++ b/source/net/yacy/document/SnippetExtractor.java
@@ -77,7 +77,7 @@ public class SnippetExtractor {
sentence = order.remove(order.lastKey()); // sentence with the biggest score
try {
tsr = new SnippetExtractor(sentence.toString(), queryhashes, maxLength);
- } catch (UnsupportedOperationException e) {
+ } catch (final UnsupportedOperationException e) {
continue;
}
this.snippetString = tsr.snippetString;
@@ -94,7 +94,7 @@ public class SnippetExtractor {
if (maxLength < 20) maxLength = 20;
try {
tsr = new SnippetExtractor(order.values(), this.remainingHashes, maxLength);
- } catch (UnsupportedOperationException e) {
+ } catch (final UnsupportedOperationException e) {
throw e;
}
final String nextSnippet = tsr.snippetString;
@@ -138,7 +138,7 @@ public class SnippetExtractor {
if (pos == null) {
try {
remainingHashes.put(hash);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
}
} else {
diff --git a/source/net/yacy/document/content/DCEntry.java b/source/net/yacy/document/content/DCEntry.java
index 5efdbb08b..e7529d329 100644
--- a/source/net/yacy/document/content/DCEntry.java
+++ b/source/net/yacy/document/content/DCEntry.java
@@ -105,7 +105,7 @@ public class DCEntry extends TreeMap<String, String> {
Date x = ISO8601Formatter.FORMATTER.parse(d);
Date now = new Date();
return x.after(now) ? now : x;
- } catch (ParseException e) {
+ } catch (final ParseException e) {
ConcurrentLog.logException(e);
return new Date();
}
@@ -122,7 +122,7 @@ public class DCEntry extends TreeMap<String, String> {
}
try {
return new DigestURI(u);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
if (useRelationAsAlternative) {
DigestURI relation = this.getRelation();
if (relation != null) return relation;
@@ -143,7 +143,7 @@ public class DCEntry extends TreeMap<String, String> {
}
try {
return new DigestURI(u);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
ConcurrentLog.warn("DCEntry", "getRelation: url is bad: " + e.getMessage());
return null;
}
diff --git a/source/net/yacy/document/content/SurrogateReader.java b/source/net/yacy/document/content/SurrogateReader.java
index 8f7ed72d5..d33c62ae9 100644
--- a/source/net/yacy/document/content/SurrogateReader.java
+++ b/source/net/yacy/document/content/SurrogateReader.java
@@ -79,7 +79,7 @@ public class SurrogateReader extends DefaultHandler implements Runnable {
if (parser == null) {
try {
parser = SAXParserFactory.newInstance().newSAXParser();
- } catch (ParserConfigurationException e) {
+ } catch (final ParserConfigurationException e) {
throw new SAXException(e.getMessage(), e);
}
tlSax.set(parser);
@@ -101,7 +101,7 @@ public class SurrogateReader extends DefaultHandler implements Runnable {
try {
this.saxParser = getParser();
- } catch (SAXException e) {
+ } catch (final SAXException e) {
ConcurrentLog.logException(e);
throw new IOException(e.getMessage());
}
@@ -110,21 +110,21 @@ public class SurrogateReader extends DefaultHandler implements Runnable {
public void run() {
try {
this.saxParser.parse(this.inputSource, this);
- } catch (SAXParseException e) {
+ } catch (final SAXParseException e) {
ConcurrentLog.logException(e);
- } catch (SAXException e) {
+ } catch (final SAXException e) {
ConcurrentLog.logException(e);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
} finally {
try {
this.surrogates.put(DCEntry.poison);
- } catch (InterruptedException e1) {
+ } catch (final InterruptedException e1) {
ConcurrentLog.logException(e1);
}
try {
this.inputStream.close();
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -154,7 +154,7 @@ public class SurrogateReader extends DefaultHandler implements Runnable {
//System.out.println("A Title: " + this.surrogate.title());
try {
this.surrogates.put(this.surrogate);
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
} finally {
//System.out.println("B Title: " + this.surrogate.title());
@@ -198,7 +198,7 @@ public class SurrogateReader extends DefaultHandler implements Runnable {
public DCEntry take() {
try {
return this.surrogates.take();
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
return null;
}
@@ -224,7 +224,7 @@ public class SurrogateReader extends DefaultHandler implements Runnable {
System.out.println("Language: " + s.getLanguage());
System.out.println("Body: " + s.getDescription());
}
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
diff --git a/source/net/yacy/document/content/dao/DatabaseConnection.java b/source/net/yacy/document/content/dao/DatabaseConnection.java
index 9360eab2a..acf957570 100644
--- a/source/net/yacy/document/content/dao/DatabaseConnection.java
+++ b/source/net/yacy/document/content/dao/DatabaseConnection.java
@@ -62,7 +62,7 @@ public class DatabaseConnection {
public void setAutoCommit(boolean b) {
try {
this.connection.setAutoCommit(b);
- } catch (SQLException e) {
+ } catch (final SQLException e) {
ConcurrentLog.logException(e);
}
}
@@ -77,11 +77,11 @@ public class DatabaseConnection {
return rs.getInt(1);
}
return 0;
- } catch (SQLException e) {
+ } catch (final SQLException e) {
throw e;
} finally {
- if (rs != null) try {rs.close();} catch (SQLException e) {}
- if (stmt != null) try {stmt.close();} catch (SQLException e) {}
+ if (rs != null) try {rs.close();} catch (final SQLException e) {}
+ if (stmt != null) try {stmt.close();} catch (final SQLException e) {}
}
}
@@ -90,7 +90,7 @@ public class DatabaseConnection {
try {
connection.close();
connection = null;
- } catch (SQLException e) {
+ } catch (final SQLException e) {
}
}
}
diff --git a/source/net/yacy/document/content/dao/ImportDump.java b/source/net/yacy/document/content/dao/ImportDump.java
index dc9e59524..ff5a5d58b 100644
--- a/source/net/yacy/document/content/dao/ImportDump.java
+++ b/source/net/yacy/document/content/dao/ImportDump.java
@@ -82,14 +82,14 @@ public class ImportDump {
statement.addBatch(t);
}
statement.executeBatch();
- } catch (SQLException e) {
+ } catch (final SQLException e) {
ConcurrentLog.logException(e);
throw e;
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
throw new SQLException(e.getMessage());
} finally {
- if (statement != null) try {statement.close();} catch (SQLException e) {}
+ if (statement != null) try {statement.close();} catch (final SQLException e) {}
}
}
diff --git a/source/net/yacy/document/content/dao/PhpBB3Dao.java b/source/net/yacy/document/content/dao/PhpBB3Dao.java
index a8ea4e1fe..412b13ba8 100644
--- a/source/net/yacy/document/content/dao/PhpBB3Dao.java
+++ b/source/net/yacy/document/content/dao/PhpBB3Dao.java
@@ -82,12 +82,12 @@ public class PhpBB3Dao implements Dao {
return new Date(rs.getLong(1) * 1000L);
}
return null;
- } catch (SQLException e) {
+ } catch (final SQLException e) {
ConcurrentLog.logException(e);
return null;
} finally {
- if (rs != null) try {rs.close();} catch (SQLException e) {}
- if (stmt != null) try {stmt.close();} catch (SQLException e) {}
+ if (rs != null) try {rs.close();} catch (final SQLException e) {}
+ if (stmt != null) try {stmt.close();} catch (final SQLException e) {}
}
}
@@ -102,12 +102,12 @@ public class PhpBB3Dao implements Dao {
return new Date(rs.getLong(1) * 1000L);
}
return null;
- } catch (SQLException e) {
+ } catch (final SQLException e) {
ConcurrentLog.logException(e);
return null;
} finally {
- if (rs != null) try {rs.close();} catch (SQLException e) {}
- if (stmt != null) try {stmt.close();} catch (SQLException e) {}
+ if (rs != null) try {rs.close();} catch (final SQLException e) {}
+ if (stmt != null) try {stmt.close();} catch (final SQLException e) {}
}
}
@@ -159,17 +159,17 @@ public class PhpBB3Dao implements Dao {
if (rs.next()) {
try {
return parseResultSet(rs);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
ConcurrentLog.logException(e);
}
}
return null;
- } catch (SQLException e) {
+ } catch (final SQLException e) {
ConcurrentLog.logException(e);
return null;
} finally {
- if (rs != null) try {rs.close();} catch (SQLException e) {}
- if (stmt != null) try {stmt.close();} catch (SQLException e) {}
+ if (rs != null) try {rs.close();} catch (final SQLException e) {}
+ if (stmt != null) try {stmt.close();} catch (final SQLException e) {}
}
}
@@ -188,18 +188,18 @@ public class PhpBB3Dao implements Dao {
while (rs.next()) {
try {
queue.put(parseResultSet(rs));
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
ConcurrentLog.logException(e);
}
}
queue.put(DCEntry.poison);
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
- } catch (SQLException e) {
+ } catch (final SQLException e) {
ConcurrentLog.logException(e);
} finally {
- if (rs != null) try {rs.close();} catch (SQLException e) {}
- if (stmt != null) try {stmt.close();} catch (SQLException e) {}
+ if (rs != null) try {rs.close();} catch (final SQLException e) {}
+ if (stmt != null) try {stmt.close();} catch (final SQLException e) {}
}
}
};
@@ -253,12 +253,12 @@ public class PhpBB3Dao implements Dao {
if (nick == null) nick = "";
this.users.put(poster_id, nick);
return nick;
- } catch (SQLException e) {
+ } catch (final SQLException e) {
ConcurrentLog.logException(e);
return "";
} finally {
- if (rs != null) try {rs.close();} catch (SQLException e) {}
- if (stmt != null) try {stmt.close();} catch (SQLException e) {}
+ if (rs != null) try {rs.close();} catch (final SQLException e) {}
+ if (stmt != null) try {stmt.close();} catch (final SQLException e) {}
}
}
@@ -303,13 +303,13 @@ public class PhpBB3Dao implements Dao {
osw.close();
outputfiletmp.renameTo(outputfile);
return fc + 1;
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
ConcurrentLog.logException(e);
- } catch (UnsupportedEncodingException e) {
+ } catch (final UnsupportedEncodingException e) {
ConcurrentLog.logException(e);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
}
return 0;
@@ -338,7 +338,7 @@ public class PhpBB3Dao implements Dao {
System.out.println("Last entry : " + db.latest());
File targetdir = new File("x").getParentFile();
db.writeSurrogates(db.query(0, -1, 100), targetdir, "id0-current", 3000);
- } catch (Exception e) {
+ } catch (final Exception e) {
ConcurrentLog.logException(e);
}
}
diff --git a/source/net/yacy/document/importer/MediawikiImporter.java b/source/net/yacy/document/importer/MediawikiImporter.java
index 050867949..29eb3a8ba 100644
--- a/source/net/yacy/document/importer/MediawikiImporter.java
+++ b/source/net/yacy/document/importer/MediawikiImporter.java
@@ -152,12 +152,12 @@ public class MediawikiImporter extends Thread implements Importer {
if (this.sourcefile.getName().endsWith(".bz2")) {
int b = is.read();
if (b != 'B') {
- try {is.close();} catch (IOException e) {}
+ try {is.close();} catch (final IOException e) {}
throw new IOException("Invalid bz2 content.");
}
b = is.read();
if (b != 'Z') {
- try {is.close();} catch (IOException e) {}
+ try {is.close();} catch (final IOException e) {}
throw new IOException("Invalid bz2 content.");
}
is = new BZip2CompressorInputStream(is);
diff --git a/source/net/yacy/document/importer/OAIListFriendsLoader.java b/source/net/yacy/document/importer/OAIListFriendsLoader.java
index b38f8e2f9..af57b677a 100644
--- a/source/net/yacy/document/importer/OAIListFriendsLoader.java
+++ b/source/net/yacy/document/importer/OAIListFriendsLoader.java
@@ -111,7 +111,7 @@ public class OAIListFriendsLoader implements Serializable {
if (parser == null) {
try {
parser = SAXParserFactory.newInstance().newSAXParser();
- } catch (ParserConfigurationException e) {
+ } catch (final ParserConfigurationException e) {
throw new SAXException(e.getMessage(), e);
}
tlSax.set(parser);
diff --git a/source/net/yacy/document/importer/OAIPMHImporter.java b/source/net/yacy/document/importer/OAIPMHImporter.java
index 695bc0659..a874e5932 100644
--- a/source/net/yacy/document/importer/OAIPMHImporter.java
+++ b/source/net/yacy/document/importer/OAIPMHImporter.java
@@ -75,7 +75,7 @@ public class OAIPMHImporter extends Thread implements Importer, Comparable<OAIPM
if (!url.endsWith("?")) url = url + "?";
try {
this.source = new DigestURI(url + "verb=ListRecords&metadataPrefix=oai_dc");
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
// this should never happen
ConcurrentLog.logException(e);
}
@@ -127,7 +127,7 @@ public class OAIPMHImporter extends Thread implements Importer, Comparable<OAIPM
@Override
public void run() {
while (runningJobs.size() > 50) {
- try {Thread.sleep(10000 + 3000 * (System.currentTimeMillis() % 6));} catch (InterruptedException e) {}
+ try {Thread.sleep(10000 + 3000 * (System.currentTimeMillis() % 6));} catch (final InterruptedException e) {}
}
startedJobs.remove(this);
runningJobs.put(this, N);
@@ -144,7 +144,7 @@ public class OAIPMHImporter extends Thread implements Importer, Comparable<OAIPM
break;
}
this.message = "loading next resumption fragment, cursor = " + loader.getResumptionToken().getCursor();
- } catch (IOException e) {
+ } catch (final IOException e) {
this.message = e.getMessage();
break;
}
@@ -216,7 +216,7 @@ public class OAIPMHImporter extends Thread implements Importer, Comparable<OAIPM
String hostID = s.substring(7, s.length() - 22);
Date md = map.get(hostID);
if (md == null || fd.after(md)) map.put(hostID, fd);
- } catch (ParseException e) {
+ } catch (final ParseException e) {
ConcurrentLog.logException(e);
}
}
diff --git a/source/net/yacy/document/importer/OAIPMHLoader.java b/source/net/yacy/document/importer/OAIPMHLoader.java
index 5c822d055..8b5471cbc 100644
--- a/source/net/yacy/document/importer/OAIPMHLoader.java
+++ b/source/net/yacy/document/importer/OAIPMHLoader.java
@@ -58,7 +58,7 @@ public class OAIPMHLoader {
try {
response = loader.load(loader.request(source, false, true), CacheStrategy.NOCACHE, Integer.MAX_VALUE, null, TextSnippet.snippetMinLoadDelay, ClientIdentification.DEFAULT_TIMEOUT);
break;
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.warn("OAIPMHLoader", "loading failed at attempt " + (i + 1) + ": " + source.toNormalform(true));
ee = e;
continue;
diff --git a/source/net/yacy/document/importer/ResumptionToken.java b/source/net/yacy/document/importer/ResumptionToken.java
index 9eff9a12f..0bb97d0c8 100644
--- a/source/net/yacy/document/importer/ResumptionToken.java
+++ b/source/net/yacy/document/importer/ResumptionToken.java
@@ -252,7 +252,7 @@ public class ResumptionToken extends TreeMap<String, String> {
if (parser == null) {
try {
parser = SAXParserFactory.newInstance().newSAXParser();
- } catch (ParserConfigurationException e) {
+ } catch (final ParserConfigurationException e) {
throw new SAXException(e.getMessage(), e);
}
tlSax.set(parser);
diff --git a/source/net/yacy/document/parser/audioTagParser.java b/source/net/yacy/document/parser/audioTagParser.java
index 3727144bc..4395d3d6a 100644
--- a/source/net/yacy/document/parser/audioTagParser.java
+++ b/source/net/yacy/document/parser/audioTagParser.java
@@ -182,7 +182,7 @@ public class audioTagParser extends AbstractParser implements Parser {
false)
};
return docs;
- } catch (Exception e) {
+ } catch (final Exception e) {
// return a generic document as default
docs = new Document[]{new Document(
location,
@@ -207,7 +207,7 @@ public class audioTagParser extends AbstractParser implements Parser {
try {
if (fout != null)
fout.close();
- } catch (IOException e) {
+ } catch (final IOException e) {
// TODO Auto-generated catch block
ConcurrentLog.logException(e);
}
diff --git a/source/net/yacy/document/parser/augment/AugmentParser.java b/source/net/yacy/document/parser/augment/AugmentParser.java
index 19a244335..efa9d423d 100644
--- a/source/net/yacy/document/parser/augment/AugmentParser.java
+++ b/source/net/yacy/document/parser/augment/AugmentParser.java
@@ -40,7 +40,7 @@ public class AugmentParser extends AbstractParser implements Parser {
Document[] htmlDocs = this.rdfaParser.parse(url, mimeType, charset, source);
try {
source.reset();
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
@@ -80,7 +80,7 @@ public class AugmentParser extends AbstractParser implements Parser {
}
}
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
diff --git a/source/net/yacy/document/parser/csvParser.java b/source/net/yacy/document/parser/csvParser.java
index 2c5ca3793..c1bb6e0fa 100644
--- a/source/net/yacy/document/parser/csvParser.java
+++ b/source/net/yacy/document/parser/csvParser.java
@@ -95,7 +95,7 @@ public class csvParser extends AbstractParser implements Parser {
BufferedReader reader;
try {
reader = new BufferedReader(new InputStreamReader(source, charset));
- } catch (UnsupportedEncodingException e1) {
+ } catch (final UnsupportedEncodingException e1) {
reader = new BufferedReader(new InputStreamReader(source));
}
String row;
@@ -121,7 +121,7 @@ public class csvParser extends AbstractParser implements Parser {
//if (cols.length != columns) continue; // skip lines that have the wrong number of columns
rows.add(cols);
}
- } catch (IOException e) {
+ } catch (final IOException e) {
}
return rows;
}
diff --git a/source/net/yacy/document/parser/docParser.java b/source/net/yacy/document/parser/docParser.java
index 163a23024..3e3c84dc1 100644
--- a/source/net/yacy/document/parser/docParser.java
+++ b/source/net/yacy/document/parser/docParser.java
@@ -61,7 +61,7 @@ public class docParser extends AbstractParser implements Parser {
try {
extractor = new WordExtractor(source);
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new Parser.Failure("error in docParser, WordTextExtractorFactory: " + e.getMessage(), location);
}
@@ -72,7 +72,7 @@ public class docParser extends AbstractParser implements Parser {
contents.append(extractor.getHeaderText());
contents.append(' ');
contents.append(extractor.getFooterText());
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new Parser.Failure("error in docParser, getText: " + e.getMessage(), location);
}
String title = (contents.length() > 240) ? contents.substring(0,240) : contents.toString().trim();
diff --git a/source/net/yacy/document/parser/html/CharacterCoding.java b/source/net/yacy/document/parser/html/CharacterCoding.java
index 6c3ed1efd..213c975b0 100644
--- a/source/net/yacy/document/parser/html/CharacterCoding.java
+++ b/source/net/yacy/document/parser/html/CharacterCoding.java
@@ -333,7 +333,7 @@ public final class CharacterCoding {
try {
int uc = Integer.parseInt(ucs);
sb.append(new char[] {(char) uc});
- } catch (NumberFormatException e) { }
+ } catch (final NumberFormatException e) { }
continue;
}
// the entity is unknown, skip it
diff --git a/source/net/yacy/document/parser/html/ContentScraper.java b/source/net/yacy/document/parser/html/ContentScraper.java
index 7a734087f..cf25f216c 100644
--- a/source/net/yacy/document/parser/html/ContentScraper.java
+++ b/source/net/yacy/document/parser/html/ContentScraper.java
@@ -559,7 +559,7 @@ public class ContentScraper extends AbstractScraper implements Scraper {
} finally {
try {
writer.close();
- } catch (IOException e) {
+ } catch (final IOException e) {
}
}
for (final Map.Entry<DigestURI, Properties> entry: scraper.getAnchors().entrySet()) {
diff --git a/source/net/yacy/document/parser/html/ScraperInputStream.java b/source/net/yacy/document/parser/html/ScraperInputStream.java
index b6983b48f..a19b1388c 100644
--- a/source/net/yacy/document/parser/html/ScraperInputStream.java
+++ b/source/net/yacy/document/parser/html/ScraperInputStream.java
@@ -72,10 +72,10 @@ public class ScraperInputStream extends InputStream implements ScraperListener {
try {
this.reader = (inputStreamCharset == null) ? new InputStreamReader(this) : new InputStreamReader(this,inputStreamCharset);
- } catch (UnsupportedEncodingException e) {
+ } catch (final UnsupportedEncodingException e) {
try {
this.reader = new InputStreamReader(this, "UTF-8");
- } catch (UnsupportedEncodingException e1) {
+ } catch (final UnsupportedEncodingException e1) {
// how is that possible?
this.reader = new InputStreamReader(this);
}
diff --git a/source/net/yacy/document/parser/mmParser.java b/source/net/yacy/document/parser/mmParser.java
index 482c15a07..f92738a58 100644
--- a/source/net/yacy/document/parser/mmParser.java
+++ b/source/net/yacy/document/parser/mmParser.java
@@ -60,7 +60,7 @@ public class mmParser extends AbstractParser implements Parser {
if (parser == null) {
try {
parser = SAXParserFactory.newInstance().newSAXParser();
- } catch (ParserConfigurationException e) {
+ } catch (final ParserConfigurationException e) {
throw new SAXException(e.getMessage(), e);
}
tlSax.set(parser);
@@ -93,9 +93,9 @@ public class mmParser extends AbstractParser implements Parser {
content = UTF8.getBytes(sb.toString());
- } catch (SAXException ex) {
+ } catch (final SAXException ex) {
AbstractParser.log.warn(ex.getMessage());
- } catch (IOException ex) {
+ } catch (final IOException ex) {
AbstractParser.log.warn(ex.getMessage());
}
diff --git a/source/net/yacy/document/parser/odtParser.java b/source/net/yacy/document/parser/odtParser.java
index ba2a53a68..ed44c490d 100644
--- a/source/net/yacy/document/parser/odtParser.java
+++ b/source/net/yacy/document/parser/odtParser.java
@@ -96,7 +96,7 @@ public class odtParser extends AbstractParser implements Parser {
if (parser == null) {
try {
parser = SAXParserFactory.newInstance().newSAXParser();
- } catch (ParserConfigurationException e) {
+ } catch (final ParserConfigurationException e) {
throw new SAXException(e.getMessage(), e);
}
tlSax.set(parser);
diff --git a/source/net/yacy/document/parser/ooxmlParser.java b/source/net/yacy/document/parser/ooxmlParser.java
index 2d727e38e..96688d225 100644
--- a/source/net/yacy/document/parser/ooxmlParser.java
+++ b/source/net/yacy/document/parser/ooxmlParser.java
@@ -80,7 +80,7 @@ public class ooxmlParser extends AbstractParser implements Parser {
if (parser == null) {
try {
parser = SAXParserFactory.newInstance().newSAXParser();
- } catch (ParserConfigurationException e) {
+ } catch (final ParserConfigurationException e) {
throw new SAXException(e.getMessage(), e);
}
tlSax.set(parser);
diff --git a/source/net/yacy/document/parser/rdfa/impl/RDFaParser.java b/source/net/yacy/document/parser/rdfa/impl/RDFaParser.java
index 7f8e69788..8adde28be 100644
--- a/source/net/yacy/document/parser/rdfa/impl/RDFaParser.java
+++ b/source/net/yacy/document/parser/rdfa/impl/RDFaParser.java
@@ -74,7 +74,7 @@ public class RDFaParser extends AbstractParser implements Parser {
.toString());
allTriples = triple.parse();
- } catch (Exception e) {
+ } catch (final Exception e) {
ConcurrentLog.warn("RDFA PARSER", "Triple extraction failed");
}
@@ -86,7 +86,7 @@ public class RDFaParser extends AbstractParser implements Parser {
doc = convertAllTriplesToDocument(url, mimeType, charset,
allTriples);
- } catch (Exception e) {
+ } catch (final Exception e) {
ConcurrentLog.warn("RDFA PARSER",
"Conversion triple to document failed");
}
@@ -102,7 +102,7 @@ public class RDFaParser extends AbstractParser implements Parser {
htmlDocs = this.hp.parse(url, mimeType, charset, source);
source.reset();
- } catch (IOException e1) {
+ } catch (final IOException e1) {
ConcurrentLog.warn("RDFA PARSER", "Super call failed");
}
return htmlDocs;
@@ -158,15 +158,15 @@ public class RDFaParser extends AbstractParser implements Parser {
if (aFile.exists()) {
try {
aReader = new FileReader(aFile);
- } catch (FileNotFoundException e) {
+ } catch (final FileNotFoundException e) {
aReader = null;
}
} else {
try {
aURL = new URL(args[0]);
aReader = new InputStreamReader(aURL.openStream());
- } catch (MalformedURLException e) {
- } catch (IOException e) {
+ } catch (final MalformedURLException e) {
+ } catch (final IOException e) {
e.printStackTrace();
aReader = null;
}
@@ -177,14 +177,14 @@ public class RDFaParser extends AbstractParser implements Parser {
RDFaParser aParser = new RDFaParser();
try {
aParser.parse(new DigestURI(args[0]),"","",aURL.openStream());
- } catch (FileNotFoundException e) {
+ } catch (final FileNotFoundException e) {
e.printStackTrace();
- } catch (IOException e) {
+ } catch (final IOException e) {
e.printStackTrace();
- } catch (Failure e) {
+ } catch (final Failure e) {
// TODO Auto-generated catch block
e.printStackTrace();
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
diff --git a/source/net/yacy/document/parser/rdfa/impl/RDFaTripleImpl.java b/source/net/yacy/document/parser/rdfa/impl/RDFaTripleImpl.java
index a0db29086..b651da6ec 100644
--- a/source/net/yacy/document/parser/rdfa/impl/RDFaTripleImpl.java
+++ b/source/net/yacy/document/parser/rdfa/impl/RDFaTripleImpl.java
@@ -63,7 +63,7 @@ public class RDFaTripleImpl{
public IRDFaTriple[] parse() {
try {
this.aTransformer.transform(new StreamSource(this.in), new StreamResult(System.out));
- } catch (TransformerException e) {
+ } catch (final TransformerException e) {
ConcurrentLog.warn("RDFA PARSER", "Error while reading RDFa");
// e.printStackTrace();
}
diff --git a/source/net/yacy/document/parser/rssParser.java b/source/net/yacy/document/parser/rssParser.java
index 8c471e388..e2d555ce7 100644
--- a/source/net/yacy/document/parser/rssParser.java
+++ b/source/net/yacy/document/parser/rssParser.java
@@ -65,7 +65,7 @@ public class rssParser extends AbstractParser implements Parser {
RSSReader rssReader;
try {
rssReader = new RSSReader(RSSFeed.DEFAULT_MAXSIZE, source, RSSReader.Type.none);
- } catch (IOException e) {
+ } catch (final IOException e) {
throw new Parser.Failure("Load error:" + e.getMessage(), url, e);
}
@@ -104,7 +104,7 @@ public class rssParser extends AbstractParser implements Parser {
new HashMap<DigestURI, ImageEntry>(),
false);
docs.add(doc);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
continue;
}
diff --git a/source/net/yacy/document/parser/sidAudioParser.java b/source/net/yacy/document/parser/sidAudioParser.java
index 77bed6ed0..e1f13c8f0 100644
--- a/source/net/yacy/document/parser/sidAudioParser.java
+++ b/source/net/yacy/document/parser/sidAudioParser.java
@@ -98,7 +98,7 @@ public class sidAudioParser extends AbstractParser implements Parser {
false)};
}
throw new Parser.Failure("Unable to parse SID file, file does seems to be incomplete (len = " + available + ").", location);
- } catch (IOException ex) {
+ } catch (final IOException ex) {
throw new Parser.Failure("Unable to read SID file header.", location, ex);
}
}
diff --git a/source/net/yacy/document/parser/sitemapParser.java b/source/net/yacy/document/parser/sitemapParser.java
index c9944fbbf..77b486fbd 100644
--- a/source/net/yacy/document/parser/sitemapParser.java
+++ b/source/net/yacy/document/parser/sitemapParser.java
@@ -98,7 +98,7 @@ public class sitemapParser extends AbstractParser implements Parser {
new HashMap<DigestURI, ImageEntry>(),
false);
docs.add(doc);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
continue;
}
@@ -131,7 +131,7 @@ public class sitemapParser extends AbstractParser implements Parser {
}
final ByteCountInputStream counterStream = new ByteCountInputStream(contentStream, null);
return new SitemapReader(counterStream);
- } catch (IOException e) {
+ } catch (final IOException e) {
throw e;
}
}
@@ -163,28 +163,28 @@ public class sitemapParser extends AbstractParser implements Parser {
while ((item = r.take()) != POISON_URLEntry) {
try {
this.queue.put(item);
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
break;
}
}
- } catch (IOException e) {}
+ } catch (final IOException e) {}
}
}
final NodeList urlEntryNodes = doc.getElementsByTagName("url");
for (int i = 0; i < urlEntryNodes.getLength(); i++) {
try {
this.queue.put(new URLEntry((Element) urlEntryNodes.item(i)));
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
break;
}
}
- } catch (Throwable e) {
+ } catch (final Throwable e) {
ConcurrentLog.logException(e);
}
try {
this.queue.put(POISON_URLEntry);
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
}
}
/**
@@ -195,7 +195,7 @@ public class sitemapParser extends AbstractParser implements Parser {
public URLEntry take() {
try {
return this.queue.take();
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
return POISON_URLEntry;
}
}
diff --git a/source/net/yacy/document/parser/tarParser.java b/source/net/yacy/document/parser/tarParser.java
index 772c0ef57..df8f32f66 100644
--- a/source/net/yacy/document/parser/tarParser.java
+++ b/source/net/yacy/document/parser/tarParser.java
@@ -115,12 +115,12 @@ public class tarParser extends AbstractParser implements Parser {
byte[] b = new byte[5];
raf.read(b);
return MAGIC.equals(UTF8.String(b));
- } catch (FileNotFoundException e) {
+ } catch (final FileNotFoundException e) {
return false;
- } catch (IOException e) {
+ } catch (final IOException e) {
return false;
} finally {
- if (raf != null) try {raf.close();} catch (IOException e) {}
+ if (raf != null) try {raf.close();} catch (final IOException e) {}
}
}
}
diff --git a/source/net/yacy/document/parser/torrentParser.java b/source/net/yacy/document/parser/torrentParser.java
index 1b9b2041e..5c61d5672 100644
--- a/source/net/yacy/document/parser/torrentParser.java
+++ b/source/net/yacy/document/parser/torrentParser.java
@@ -60,7 +60,7 @@ public class torrentParser extends AbstractParser implements Parser {
byte[] b = null;
try {
b = FileUtils.read(source);
- } catch (IOException e1) {
+ } catch (final IOException e1) {
throw new Parser.Failure(e1.toString(), location);
}
final BDecoder bd = new BDecoder(b);
@@ -121,11 +121,11 @@ public class torrentParser extends AbstractParser implements Parser {
Condenser c = new Condenser(d[0], true, true, LibraryProvider.dymLib, LibraryProvider.synonyms, false);
Map<String, Word> w = c.words();
for (Map.Entry<String, Word> e: w.entrySet()) System.out.println("Word: " + e.getKey() + " - " + e.getValue().posInText);
- } catch (IOException e) {
+ } catch (final IOException e) {
e.printStackTrace();
- } catch (Parser.Failure e) {
+ } catch (final Parser.Failure e) {
e.printStackTrace();
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
e.printStackTrace();
}
}
diff --git a/source/net/yacy/document/parser/vcfParser.java b/source/net/yacy/document/parser/vcfParser.java
index cd1f44508..ea751c478 100644
--- a/source/net/yacy/document/parser/vcfParser.java
+++ b/source/net/yacy/document/parser/vcfParser.java
@@ -203,7 +203,7 @@ public class vcfParser extends AbstractParser implements Parser {
"\n\tLine-Nr: " + lineNr);
}
}
- try {inputReader.close();} catch (IOException e) {}
+ try {inputReader.close();} catch (final IOException e) {}
final String[] sections = parsedNames.toArray(new String[parsedNames.size()]);
final byte[] text = UTF8.getBytes(parsedDataText.toString());
diff --git a/source/net/yacy/document/parser/vsdParser.java b/source/net/yacy/document/parser/vsdParser.java
index e3ab51966..4cd1f747c 100644
--- a/source/net/yacy/document/parser/vsdParser.java
+++ b/source/net/yacy/document/parser/vsdParser.java
@@ -75,7 +75,7 @@ public class vsdParser extends AbstractParser implements Parser {
final VisioTextExtractor extractor = new VisioTextExtractor(source);
contents = extractor.getText();
summary = extractor.getSummaryInformation();
- } catch (Exception e) {
+ } catch (final Exception e) {
ConcurrentLog.warn("vsdParser", e.getMessage());
}
diff --git a/source/net/yacy/document/parser/xml/ODContentHandler.java b/source/net/yacy/document/parser/xml/ODContentHandler.java
index 8be1899ce..298a392f0 100644
--- a/source/net/yacy/document/parser/xml/ODContentHandler.java
+++ b/source/net/yacy/document/parser/xml/ODContentHandler.java
@@ -49,7 +49,7 @@ public class ODContentHandler extends DefaultHandler {
public void characters(final char ch[], final int start, final int length) {
try {
out.write(ch, start, length);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -59,7 +59,7 @@ public class ODContentHandler extends DefaultHandler {
// add newlines after paragraphs
try {
out.append("\n");
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
diff --git a/source/net/yacy/document/parser/xml/opensearchdescriptionReader.java b/source/net/yacy/document/parser/xml/opensearchdescriptionReader.java
index fc0d91d12..68e75baba 100644
--- a/source/net/yacy/document/parser/xml/opensearchdescriptionReader.java
+++ b/source/net/yacy/document/parser/xml/opensearchdescriptionReader.java
@@ -114,7 +114,7 @@ public class opensearchdescriptionReader extends DefaultHandler {
if (parser == null) {
try {
parser = SAXParserFactory.newInstance().newSAXParser();
- } catch (ParserConfigurationException e) {
+ } catch (final ParserConfigurationException e) {
throw new SAXException(e.getMessage(), e);
}
tlSax.set(parser);
diff --git a/source/net/yacy/gui/framework/Application.java b/source/net/yacy/gui/framework/Application.java
index 659ed687d..80bd5169f 100644
--- a/source/net/yacy/gui/framework/Application.java
+++ b/source/net/yacy/gui/framework/Application.java
@@ -69,7 +69,7 @@ public class Application extends JFrame implements DocumentListener {
for (JMenu menu: menues) mainMenu.add(menu);
pack();
- } catch (Exception e) {
+ } catch (final Exception e) {
e.printStackTrace();
}
}
diff --git a/source/net/yacy/gui/framework/Browser.java b/source/net/yacy/gui/framework/Browser.java
index 5df724642..0abcbad94 100644
--- a/source/net/yacy/gui/framework/Browser.java
+++ b/source/net/yacy/gui/framework/Browser.java
@@ -95,7 +95,7 @@ public class Browser {
} else if (systemOS == systemUnix) {
//try {
// openBrowserUnixGeneric(url);
- //} catch (Exception e) {
+ //} catch (final Exception e) {
openBrowserUnixFirefox(url);
//}
} else if (systemOS == systemWindows) {
@@ -103,11 +103,11 @@ public class Browser {
} else {
throw new RuntimeException("System unknown");
}
- } catch (Throwable e) {
+ } catch (final Throwable e) {
if (head) {
try {
openBrowserJava(url);
- } catch (Exception ee) {
+ } catch (final Exception ee) {
logBrowserFail(url);
}
} else {
@@ -178,7 +178,7 @@ public class Browser {
} finally {
try {
err.close();
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
diff --git a/source/net/yacy/gui/framework/Switchboard.java b/source/net/yacy/gui/framework/Switchboard.java
index cf1ee133f..d655f041b 100644
--- a/source/net/yacy/gui/framework/Switchboard.java
+++ b/source/net/yacy/gui/framework/Switchboard.java
@@ -91,7 +91,7 @@ public class Switchboard {
InfoBox.setText(InfoBoxMessage);
}
}
- try {Thread.sleep(steptime);} catch (InterruptedException e) {}
+ try {Thread.sleep(steptime);} catch (final InterruptedException e) {}
}
}
}
@@ -163,10 +163,10 @@ public class Switchboard {
public static void load(File propFile) {
try {
properties.load(new FileInputStream(propFile));
- } catch (FileNotFoundException e1) {
+ } catch (final FileNotFoundException e1) {
log.info("error: file dispatcher.properties does not exist. Exit");
System.exit(-1);
- } catch (IOException e1) {
+ } catch (final IOException e1) {
log.info("error: file dispatcher.properties cannot be readed. Exit");
System.exit(-1);
}
diff --git a/source/net/yacy/interaction/AugmentHtmlStream.java b/source/net/yacy/interaction/AugmentHtmlStream.java
index bb99d399e..b1107786d 100644
--- a/source/net/yacy/interaction/AugmentHtmlStream.java
+++ b/source/net/yacy/interaction/AugmentHtmlStream.java
@@ -77,7 +77,7 @@ public class AugmentHtmlStream {
+ data;
}
}
- } catch (IOException e1) {
+ } catch (final IOException e1) {
}
@@ -98,7 +98,7 @@ public class AugmentHtmlStream {
try {
ConcurrentLog.info("AUGMENTATION", url.getName());
- } catch (IOException e1) {
+ } catch (final IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
@@ -112,7 +112,7 @@ public class AugmentHtmlStream {
Doc = processExternal("http://reflect.ws/REST/GetHTML", "document", Doc);
ConcurrentLog.info("AUGMENTATION", "reflected " + url);
augmented = true;
- } catch (Exception e) {
+ } catch (final Exception e) {
}
}
diff --git a/source/net/yacy/interaction/Interaction.java b/source/net/yacy/interaction/Interaction.java
index 108441368..d47bc3104 100644
--- a/source/net/yacy/interaction/Interaction.java
+++ b/source/net/yacy/interaction/Interaction.java
@@ -89,7 +89,7 @@ public class Interaction {
DigestURI uri = new DigestURI (url);
domain = uri.getHost();
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
@@ -113,7 +113,7 @@ public class Interaction {
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
@@ -147,7 +147,7 @@ public static String GetTableentry(String url, String type, String username) {
}
}
- } catch (IOException e) {
+ } catch (final IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
@@ -192,7 +192,7 @@ public static String Tableentry(String url, String type, String comment, String
+ "?url=" + url + "&comment=" + comment
+ "&from=" + from + "&peer=" + peer,
new HashMap<String, ContentBody>(), false)));
- } catch (IOException e) {
+ } catch (final IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return "";
@@ -221,7 +221,7 @@ public static String Tableentry(String url, String type, String comment, String
sb.tables.insert(from+"_contribution", map);
} catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
diff --git a/source/net/yacy/kelondro/blob/ArrayStack.java b/source/net/yacy/kelondro/blob/ArrayStack.java
index e5f3ee2d1..6630d1b49 100644
--- a/source/net/yacy/kelondro/blob/ArrayStack.java
+++ b/source/net/yacy/kelondro/blob/ArrayStack.java
@@ -209,7 +209,7 @@ public class ArrayStack implements BLOB {
oneBlob.trim(); // no writings here, can be used with minimum memory
}
sortedItems.put(Long.valueOf(time), new blobItem(d, f, oneBlob));
- } catch (IOException e) {
+ } catch (final IOException e) {
if (deleteonfail) {
ConcurrentLog.warn("ArrayStack", "cannot read file " + f.getName() + ", deleting it (smart fail; alternative would be: crash; required user action would be same as deletion)");
f.delete();
@@ -873,7 +873,7 @@ public class ArrayStack implements BLOB {
i++;
}
// wait for termination
- for (final FutureTask<Boolean> s: t) try {s.get();} catch (final InterruptedException e) {} catch (ExecutionException e) {}
+ for (final FutureTask<Boolean> s: t) try {s.get();} catch (final InterruptedException e) {} catch (final ExecutionException e) {}
}
assert mem() <= m : "m = " + m + ", mem() = " + mem();
}
diff --git a/source/net/yacy/kelondro/blob/BEncodedHeap.java b/source/net/yacy/kelondro/blob/BEncodedHeap.java
index 33a595f68..455c758f1 100644
--- a/source/net/yacy/kelondro/blob/BEncodedHeap.java
+++ b/source/net/yacy/kelondro/blob/BEncodedHeap.java
@@ -98,7 +98,7 @@ public class BEncodedHeap implements MapStore {
public CloneableIterator<byte[]> keyIterator() {
try {
return this.table.keys(true, false);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.severe("BEncodedHeap", "returning empty iterator for failed key iteration: " + e.getMessage(), e);
return new CloneableIterator<byte[]>(){
@@ -296,10 +296,10 @@ public class BEncodedHeap implements MapStore {
if ( key instanceof byte[] ) {
try {
return get((byte[]) key);
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
return null;
- } catch ( final SpaceExceededException e ) {
+ } catch (final SpaceExceededException e ) {
ConcurrentLog.logException(e);
return null;
}
@@ -443,10 +443,10 @@ public class BEncodedHeap implements MapStore {
this.table.insert(pk, b);
this.columnames.addAll(map.keySet());
return entry;
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
return null;
- } catch ( final SpaceExceededException e ) {
+ } catch (final SpaceExceededException e ) {
ConcurrentLog.logException(e);
return null;
}
@@ -480,10 +480,10 @@ public class BEncodedHeap implements MapStore {
if ( key instanceof byte[] ) {
try {
return remove((byte[]) key);
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
return null;
- } catch ( final SpaceExceededException e ) {
+ } catch (final SpaceExceededException e ) {
ConcurrentLog.logException(e);
return null;
}
@@ -501,9 +501,9 @@ public class BEncodedHeap implements MapStore {
for ( final Map.Entry<? extends byte[], ? extends Map<String, byte[]>> me : map.entrySet() ) {
try {
this.insert(me.getKey(), me.getValue());
- } catch ( final SpaceExceededException e ) {
+ } catch (final SpaceExceededException e ) {
ConcurrentLog.logException(e);
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
}
}
@@ -517,7 +517,7 @@ public class BEncodedHeap implements MapStore {
try {
this.table.clear();
this.columnames.clear();
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
}
}
@@ -548,7 +548,7 @@ public class BEncodedHeap implements MapStore {
while ( i.hasNext() ) {
set.add(i.next());
}
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
}
return set;
}
@@ -600,7 +600,7 @@ public class BEncodedHeap implements MapStore {
try {
this.table.flushBuffer();
return new EntryIter(location, keylen);
- } catch ( final IOException e1 ) {
+ } catch (final IOException e1 ) {
final ByteOrder order = this.table.ordering();
final int buffermax = this.table.getBuffermax();
this.table.close();
@@ -608,7 +608,7 @@ public class BEncodedHeap implements MapStore {
final Iterator<Map.Entry<byte[], Map<String, byte[]>>> iter = new EntryIter(location, keylen);
this.table = new Heap(location, keylen, order, buffermax);
return iter;
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.severe("PropertiesTable", e.getMessage(), e);
return null;
}
@@ -684,9 +684,9 @@ public class BEncodedHeap implements MapStore {
}
// clean up
map.close();
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
- } catch ( final SpaceExceededException e ) {
+ } catch (final SpaceExceededException e ) {
ConcurrentLog.logException(e);
}
} else {
@@ -700,7 +700,7 @@ public class BEncodedHeap implements MapStore {
System.out.println(ASCII.String(entry.getKey()) + ": " + entry.getValue());
}
map.close();
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
}
}
diff --git a/source/net/yacy/kelondro/blob/BEncodedHeapBag.java b/source/net/yacy/kelondro/blob/BEncodedHeapBag.java
index bd024dd69..5a9029737 100644
--- a/source/net/yacy/kelondro/blob/BEncodedHeapBag.java
+++ b/source/net/yacy/kelondro/blob/BEncodedHeapBag.java
@@ -137,7 +137,7 @@ public class BEncodedHeapBag extends AbstractMapStore implements MapStore {
ConcurrentLog.info("BEncodedHeapBag", "opening partial heap " + f);
BEncodedHeap heap = new BEncodedHeap(f, this.keylength, this.entryOrder, this.buffermax);
this.bag.put(maxf, heap);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.severe("BEncodedHeapBag", "error opening partial heap " + f);
}
}
@@ -186,7 +186,7 @@ public class BEncodedHeapBag extends AbstractMapStore implements MapStore {
BEncodedHeap heap;
try {
heap = new BEncodedHeap(f, this.keylength, this.entryOrder, this.buffermax);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.severe("BEncodedHeapBag", "unable to open new heap file: " + e.getMessage(), e);
return null;
}
diff --git a/source/net/yacy/kelondro/blob/Compressor.java b/source/net/yacy/kelondro/blob/Compressor.java
index c78d545e4..5f2b58c30 100644
--- a/source/net/yacy/kelondro/blob/Compressor.java
+++ b/source/net/yacy/kelondro/blob/Compressor.java
@@ -315,7 +315,7 @@ public class Compressor implements BLOB, Iterable<byte[]> {
flushAll();
try {
return this.backend.keys(true, false);
- } catch (IOException e) {
+ } catch (final IOException e) {
return null;
}
}
diff --git a/source/net/yacy/kelondro/blob/Gap.java b/source/net/yacy/kelondro/blob/Gap.java
index 3ae7a3259..b60fffac8 100644
--- a/source/net/yacy/kelondro/blob/Gap.java
+++ b/source/net/yacy/kelondro/blob/Gap.java
@@ -64,7 +64,7 @@ public class Gap extends TreeMap<Long, Integer> {
DataInputStream is;
try {
is = new DataInputStream(new BufferedInputStream(new FileInputStream(file), 1024 * 1024));
- } catch (OutOfMemoryError e) {
+ } catch (final OutOfMemoryError e) {
is = new DataInputStream(new FileInputStream(file));
}
long p;
@@ -74,7 +74,7 @@ public class Gap extends TreeMap<Long, Integer> {
p = is.readLong();
l = is.readInt();
this.put(Long.valueOf(p), Integer.valueOf(l));
- } catch (IOException e) {
+ } catch (final IOException e) {
break;
}
}
@@ -94,7 +94,7 @@ public class Gap extends TreeMap<Long, Integer> {
DataOutputStream os;
try {
os = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(tmp), 4 * 1024 * 1024));
- } catch (OutOfMemoryError e) {
+ } catch (final OutOfMemoryError e) {
os = new DataOutputStream(new FileOutputStream(tmp));
}
int c = 0;
diff --git a/source/net/yacy/kelondro/blob/Heap.java b/source/net/yacy/kelondro/blob/Heap.java
index 4df4034c8..019c77fb6 100644
--- a/source/net/yacy/kelondro/blob/Heap.java
+++ b/source/net/yacy/kelondro/blob/Heap.java
@@ -154,7 +154,7 @@ public final class Heap extends HeapModifier implements BLOB {
this.file.writeInt(this.keylength + blob.length);
this.file.write(key);
this.file.write(blob, 0, blob.length);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
throw new IOException(e.getMessage()); // should never occur;
}
}
@@ -208,7 +208,7 @@ public final class Heap extends HeapModifier implements BLOB {
blob = entry.getValue();
try {
this.index.put(key, posFile);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
nextBuffer.put(entry.getKey(), blob);
continue flush;
}
@@ -298,7 +298,7 @@ public final class Heap extends HeapModifier implements BLOB {
if (this.file != null && this.buffer != null) {
try {
flushBuffer();
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -344,7 +344,7 @@ public final class Heap extends HeapModifier implements BLOB {
// then look if we can use a free entry
try {
if (putToGap(key, b)) return;
- } catch (SpaceExceededException e) {} // too less space can be ignored, we have a second try
+ } catch (final SpaceExceededException e) {} // too less space can be ignored, we have a second try
assert this.buffer != null;
@@ -567,7 +567,7 @@ public final class Heap extends HeapModifier implements BLOB {
heap.close();
} catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
}
}
diff --git a/source/net/yacy/kelondro/blob/HeapModifier.java b/source/net/yacy/kelondro/blob/HeapModifier.java
index c61c5c8c0..41db04c2d 100644
--- a/source/net/yacy/kelondro/blob/HeapModifier.java
+++ b/source/net/yacy/kelondro/blob/HeapModifier.java
@@ -236,7 +236,7 @@ public class HeapModifier extends HeapReader implements BLOB {
this.file.setLength(seek.longValue());
this.free.remove(seek);
}
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
diff --git a/source/net/yacy/kelondro/blob/HeapReader.java b/source/net/yacy/kelondro/blob/HeapReader.java
index 7a05d4196..03f525127 100644
--- a/source/net/yacy/kelondro/blob/HeapReader.java
+++ b/source/net/yacy/kelondro/blob/HeapReader.java
@@ -177,10 +177,10 @@ public class HeapReader {
// read the index file:
try {
this.index = new RowHandleMap(this.keylength, this.ordering, 8, this.fingerprintFileIdx);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
return false;
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
return false;
}
@@ -196,7 +196,7 @@ public class HeapReader {
// read the gap file:
try {
this.free = new Gap(this.fingerprintFileGap);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
return false;
}
@@ -307,9 +307,9 @@ public class HeapReader {
// finish the index generation
try {
this.index = indexready.result();
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
- } catch (ExecutionException e) {
+ } catch (final ExecutionException e) {
ConcurrentLog.logException(e);
}
log.info("finished index generation for " + this.heapFile.toString() + ", " + this.index.size() + " entries, " + this.free.size() + " gaps.");
@@ -517,7 +517,7 @@ public class HeapReader {
byte[] keyf;
try {
keyf = new byte[this.keylength];
- } catch (OutOfMemoryError e) {
+ } catch (final OutOfMemoryError e) {
throw new SpaceExceededException(this.keylength, "HeapReader.get()/keyf");
}
this.file.readFully(keyf, 0, keyf.length);
@@ -538,7 +538,7 @@ public class HeapReader {
byte[] blob;
try {
blob = new byte[len];
- } catch (OutOfMemoryError e) {
+ } catch (final OutOfMemoryError e) {
throw new SpaceExceededException(len, "HeapReader.get()/blob");
}
this.file.readFully(blob, 0, blob.length);
@@ -551,9 +551,9 @@ public class HeapReader {
if (!(key instanceof byte[])) return null;
try {
return get((byte[]) key);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
}
return null;
@@ -604,7 +604,7 @@ public class HeapReader {
if (this.file != null)
try {
this.file.close();
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
this.file = null;
@@ -643,7 +643,7 @@ public class HeapReader {
}
this.index.close();
this.index = null;
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -737,7 +737,7 @@ public class HeapReader {
if (!(blobFile.exists())) throw new IOException("file " + blobFile + " does not exist");
try {
this.is = new DataInputStream(new BufferedInputStream(new FileInputStream(blobFile), 256 * 1024));
- } catch (OutOfMemoryError e) {
+ } catch (final OutOfMemoryError e) {
this.is = new DataInputStream(new FileInputStream(blobFile));
}
this.keylen = keylen;
@@ -751,7 +751,7 @@ public class HeapReader {
this.is = null;
try {
return new entries(this.blobFile, this.keylen);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
return null;
}
@@ -775,7 +775,7 @@ public class HeapReader {
if (len > 1) {
if (len - 1 != this.is.skipBytes(len - 1)) { // all that is remaining
log.warn("problem skiping " + + len + " bytes in " + this.blobFile.getName());
- try {this.is.close();} catch (IOException e) {}
+ try {this.is.close();} catch (final IOException e) {}
return null;
}
}
@@ -785,32 +785,32 @@ public class HeapReader {
key = new byte[this.keylen];
key[0] = b; // the first entry that we know already
if (this.is.read(key, 1, keylen1) < keylen1) {
- try {this.is.close();} catch (IOException e) {}
+ try {this.is.close();} catch (final IOException e) {}
return null; // read remaining key bytes
}
// so far we have read this.keylen - 1 + 1 = this.keylen bytes.
// there must be a remaining number of len - this.keylen bytes left for the BLOB
if (len < this.keylen) {
- try {this.is.close();} catch (IOException e) {}
+ try {this.is.close();} catch (final IOException e) {}
return null; // a strange case that can only happen in case of corrupted data
}
try {
payload = new byte[len - this.keylen]; // the remaining record entries
if (this.is.read(payload) < payload.length) {
- try {this.is.close();} catch (IOException e) {}
+ try {this.is.close();} catch (final IOException e) {}
return null;
}
return new entry(key, payload);
- } catch (OutOfMemoryError ee) {
+ } catch (final OutOfMemoryError ee) {
// the allocation of memory for the payload may fail
// this is bad because we must interrupt the iteration here but the
// process that uses the iteration may think that the iteraton has just been completed
log.severe("out of memory in LookAheadIterator.next0", ee);
- try {this.is.close();} catch (IOException e) {}
+ try {this.is.close();} catch (final IOException e) {}
return null;
}
}
- } catch (IOException e) {
+ } catch (final IOException e) {
return null;
}
}
@@ -858,7 +858,7 @@ public class HeapReader {
entry = hr.next();
System.out.println(ASCII.String(entry.getKey()) + ":" + UTF8.String(entry.getValue()));
}
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
diff --git a/source/net/yacy/kelondro/blob/HeapWriter.java b/source/net/yacy/kelondro/blob/HeapWriter.java
index fd9d48841..7aa3c970c 100644
--- a/source/net/yacy/kelondro/blob/HeapWriter.java
+++ b/source/net/yacy/kelondro/blob/HeapWriter.java
@@ -85,7 +85,7 @@ public final class HeapWriter {
this.index = new RowHandleMap(keylength, ordering, 8, 100000, readyHeapFile.getAbsolutePath());
try {
this.os = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(temporaryHeapFile), outBuffer));
- } catch (OutOfMemoryError e) {
+ } catch (final OutOfMemoryError e) {
// try this again without buffer
this.os = new DataOutputStream(new FileOutputStream(temporaryHeapFile));
}
diff --git a/source/net/yacy/kelondro/blob/MapColumnIndex.java b/source/net/yacy/kelondro/blob/MapColumnIndex.java
index bbeda04b6..48d2d186d 100644
--- a/source/net/yacy/kelondro/blob/MapColumnIndex.java
+++ b/source/net/yacy/kelondro/blob/MapColumnIndex.java
@@ -135,11 +135,11 @@ public class MapColumnIndex implements Serializable {
private static Collection<byte[]> getIndexWithExceptionHandler(final MapColumnIndex idx, final String whereKey, final String isValue, Map<byte[], Map<String, String>> table) {
try {
return idx.getIndex(whereKey, isValue);
- } catch (UnsupportedOperationException e) {
+ } catch (final UnsupportedOperationException e) {
idx.init(whereKey, isValue, table.entrySet().iterator());
try {
return idx.getIndex(whereKey, isValue);
- } catch (UnsupportedOperationException ee) {
+ } catch (final UnsupportedOperationException ee) {
throw ee;
}
}
diff --git a/source/net/yacy/kelondro/blob/MapDataMining.java b/source/net/yacy/kelondro/blob/MapDataMining.java
index d46172e88..9c6fc7d6f 100644
--- a/source/net/yacy/kelondro/blob/MapDataMining.java
+++ b/source/net/yacy/kelondro/blob/MapDataMining.java
@@ -361,11 +361,11 @@ public class MapDataMining extends MapHeap {
Collection<byte[]> idx = null;
try {
idx = this.columnIndex.getIndex(whereKey, isValue);
- } catch (UnsupportedOperationException e) {
+ } catch (final UnsupportedOperationException e) {
this.columnIndex.init(whereKey, isValue, new FullMapIterator(keys()));
try {
idx = this.columnIndex.getIndex(whereKey, isValue);
- } catch (UnsupportedOperationException ee) {
+ } catch (final UnsupportedOperationException ee) {
throw ee;
}
}
diff --git a/source/net/yacy/kelondro/blob/MapHeap.java b/source/net/yacy/kelondro/blob/MapHeap.java
index 78b99d9df..a69674eac 100644
--- a/source/net/yacy/kelondro/blob/MapHeap.java
+++ b/source/net/yacy/kelondro/blob/MapHeap.java
@@ -535,13 +535,13 @@ public class MapHeap implements Map<byte[], Map<String, String>> {
while (i.hasNext())
try {
set.put(i.next());
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
break;
}
} catch (final IOException e) {}
try {
set.put(MapHeap.POISON_QUEUE_ENTRY);
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
}
}}).start();
return set;
diff --git a/source/net/yacy/kelondro/blob/Stack.java b/source/net/yacy/kelondro/blob/Stack.java
index 303df0f2b..45e8696a6 100644
--- a/source/net/yacy/kelondro/blob/Stack.java
+++ b/source/net/yacy/kelondro/blob/Stack.java
@@ -195,7 +195,7 @@ public class Stack {
byte[] b;
try {
b = this.stack.get(k);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
b = null;
}
diff --git a/source/net/yacy/kelondro/blob/Stacks.java b/source/net/yacy/kelondro/blob/Stacks.java
index 6f0c73e6e..543ac0d9d 100644
--- a/source/net/yacy/kelondro/blob/Stacks.java
+++ b/source/net/yacy/kelondro/blob/Stacks.java
@@ -61,7 +61,7 @@ public class Stacks {
try {
si = new StackInstance(new File(this.stacksLocation, s));
this.stacks.put(si.name, si);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -94,7 +94,7 @@ public class Stacks {
si = new StackInstance(stack);
this.stacks.put(stack, si);
return si.stack;
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
return null;
}
diff --git a/source/net/yacy/kelondro/blob/Tables.java b/source/net/yacy/kelondro/blob/Tables.java
index 4e8b79b14..2fd926fd4 100644
--- a/source/net/yacy/kelondro/blob/Tables.java
+++ b/source/net/yacy/kelondro/blob/Tables.java
@@ -124,7 +124,7 @@ public class Tables implements Iterable<String> {
int size;
try {
size = this.size(tableName);
- } catch (IOException e) {
+ } catch (final IOException e) {
size = 0;
}
@@ -140,7 +140,7 @@ public class Tables implements Iterable<String> {
BEncodedHeap bheap;
try {
bheap = this.getHeap(idx_table);
- } catch (IOException e) {
+ } catch (final IOException e) {
bheap = null;
ConcurrentLog.logException(e);
}
@@ -166,7 +166,7 @@ public class Tables implements Iterable<String> {
if(this.has(tableName+CIDX, YMarkUtil.getKeyId(columnName))) {
return true;
}
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
return false;
@@ -198,7 +198,7 @@ public class Tables implements Iterable<String> {
rows.add(this.select(table, pk));
}
- } catch (Exception e) {
+ } catch (final Exception e) {
ConcurrentLog.logException(e);
return new HashSet<Row>().iterator();
}
@@ -217,14 +217,14 @@ public class Tables implements Iterable<String> {
final Pattern p = Pattern.compile(patternBuilder.toString(), Pattern.CASE_INSENSITIVE);
try {
return this.iterator(table, whereColumn, p);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
return new HashSet<Row>().iterator();
}
} else {
try {
return this.iterator(table, whereColumn, UTF8.getBytes(whereValue));
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
return new HashSet<Row>().iterator();
}
diff --git a/source/net/yacy/kelondro/blob/TablesColumnBLOBIndex.java b/source/net/yacy/kelondro/blob/TablesColumnBLOBIndex.java
index 6d4a98f06..78f4bc9a2 100644
--- a/source/net/yacy/kelondro/blob/TablesColumnBLOBIndex.java
+++ b/source/net/yacy/kelondro/blob/TablesColumnBLOBIndex.java
@@ -60,7 +60,7 @@ public class TablesColumnBLOBIndex extends TablesColumnIndex{
buf.append(SEPERATOR);
}
byte[] b = buf.getBytes();
- try {buf.close(); } catch (IOException e) {}
+ try {buf.close(); } catch (final IOException e) {}
return b;
}
@@ -69,9 +69,9 @@ public class TablesColumnBLOBIndex extends TablesColumnIndex{
final byte[] column = YMarkUtil.getKeyId(columnName);
try {
this.index.remove(column);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
}
}
@@ -102,9 +102,9 @@ public class TablesColumnBLOBIndex extends TablesColumnIndex{
valueIdxMap.put(columnValue, CollectionToByte(PKset));
this.index.insert(column, valueIdxMap);
return;
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
}
}
@@ -127,9 +127,9 @@ public class TablesColumnBLOBIndex extends TablesColumnIndex{
}
try {
this.index.insert(entry.getKey(), entry.getValue());
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -152,9 +152,9 @@ public class TablesColumnBLOBIndex extends TablesColumnIndex{
if(this.index.containsKey(column)) {
try {
return new TreeSet<String>(this.index.get(column).keySet());
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
}
}
@@ -167,9 +167,9 @@ public class TablesColumnBLOBIndex extends TablesColumnIndex{
if(this.index.containsKey(column)) {
try {
return this.index.get(column).containsKey(key);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
}
}
@@ -188,9 +188,9 @@ public class TablesColumnBLOBIndex extends TablesColumnIndex{
// deserialize
try {
return byteToCollection(this.index.get(column).get(key));
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
}
return new ArrayList<byte[]>();
@@ -202,9 +202,9 @@ public class TablesColumnBLOBIndex extends TablesColumnIndex{
if(this.index.containsKey(column)) {
try {
return this.index.get(column).size();
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
}
}
diff --git a/source/net/yacy/kelondro/data/meta/DigestURI.java b/source/net/yacy/kelondro/data/meta/DigestURI.java
index 24bcd3db6..f48f04877 100644
--- a/source/net/yacy/kelondro/data/meta/DigestURI.java
+++ b/source/net/yacy/kelondro/data/meta/DigestURI.java
@@ -318,7 +318,7 @@ public class DigestURI extends MultiProtocolURI implements Serializable {
rootCandidates.put(new DigestURI(rootStub + "/default.htm").hash());
rootCandidates.put(new DigestURI(rootStub + "/default.html").hash());
rootCandidates.put(new DigestURI(rootStub + "/default.php").hash());
- } catch (Throwable e) {}
+ } catch (final Throwable e) {}
return rootCandidates;
}
diff --git a/source/net/yacy/kelondro/data/meta/URIMetadataNode.java b/source/net/yacy/kelondro/data/meta/URIMetadataNode.java
index ed4754e7b..1ecce3742 100644
--- a/source/net/yacy/kelondro/data/meta/URIMetadataNode.java
+++ b/source/net/yacy/kelondro/data/meta/URIMetadataNode.java
@@ -77,7 +77,7 @@ public class URIMetadataNode {
this.urlRaw = getString(CollectionSchema.sku);
try {
this.url = new DigestURI(this.urlRaw, this.hash);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
ConcurrentLog.logException(e);
this.url = null;
}
@@ -416,7 +416,7 @@ public class URIMetadataNode {
if (x == null) return null;
try {
return new DigestURI((String) x);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
return null;
}
}
diff --git a/source/net/yacy/kelondro/data/meta/URIMetadataRow.java b/source/net/yacy/kelondro/data/meta/URIMetadataRow.java
index a6351588c..ff0d9ab0f 100644
--- a/source/net/yacy/kelondro/data/meta/URIMetadataRow.java
+++ b/source/net/yacy/kelondro/data/meta/URIMetadataRow.java
@@ -517,7 +517,7 @@ public class URIMetadataRow {
if (lat >= -90.0d && lat <= 90.0d) return lat;
this.latlon = null; // wrong value
return 0.0d;
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
return 0.0d;
}
}
@@ -530,7 +530,7 @@ public class URIMetadataRow {
if (lon >= -180.0d && lon <= 180.0d) return lon;
this.latlon = null; // wrong value
return 0.0d;
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
return 0.0d;
}
}
diff --git a/source/net/yacy/kelondro/data/word/WordReferenceVars.java b/source/net/yacy/kelondro/data/word/WordReferenceVars.java
index dbb49c0cb..aece58c6f 100644
--- a/source/net/yacy/kelondro/data/word/WordReferenceVars.java
+++ b/source/net/yacy/kelondro/data/word/WordReferenceVars.java
@@ -522,7 +522,7 @@ public class WordReferenceVars extends AbstractReference implements WordReferenc
for (int i = 0; i < cores0; i++) {
try {
worker[i].join();
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
}
}
diff --git a/source/net/yacy/kelondro/index/IndexTest.java b/source/net/yacy/kelondro/index/IndexTest.java
index f50f54dda..c3e4d523d 100644
--- a/source/net/yacy/kelondro/index/IndexTest.java
+++ b/source/net/yacy/kelondro/index/IndexTest.java
@@ -121,7 +121,7 @@ public class IndexTest {
for (int i = 0; i < count; i++)
try {
ii.putUnique(tests[i], 1);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
e.printStackTrace();
}
ii.get(randomHash(r)); // trigger sort
diff --git a/source/net/yacy/kelondro/index/Row.java b/source/net/yacy/kelondro/index/Row.java
index 1ca49b469..cf5664e04 100644
--- a/source/net/yacy/kelondro/index/Row.java
+++ b/source/net/yacy/kelondro/index/Row.java
@@ -625,7 +625,7 @@ public final class Row implements Serializable {
if (includeBraces) bb.append('}');
//System.out.println("DEBUG-ROW " + bb.toString());
String bbs = bb.toString();
- try {bb.close();} catch (IOException e) {}
+ try {bb.close();} catch (final IOException e) {}
return bbs;
}
diff --git a/source/net/yacy/kelondro/index/RowHandleSet.java b/source/net/yacy/kelondro/index/RowHandleSet.java
index c76c60a21..7c9fe34cf 100644
--- a/source/net/yacy/kelondro/index/RowHandleSet.java
+++ b/source/net/yacy/kelondro/index/RowHandleSet.java
@@ -59,10 +59,10 @@ public final class RowHandleSet implements HandleSet, Iterable<byte[]>, Cloneabl
this.rowdef = new Row(new Column[]{new Column("key", Column.celltype_binary, Column.encoder_bytes, keylength, "key")}, objectOrder);
try {
this.index = new RowSet(this.rowdef, expectedspace);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
try {
this.index = new RowSet(this.rowdef, 0);
- } catch (SpaceExceededException ee) {
+ } catch (final SpaceExceededException ee) {
ConcurrentLog.logException(ee);
this.index = null;
}
@@ -128,7 +128,7 @@ public final class RowHandleSet implements HandleSet, Iterable<byte[]>, Cloneabl
OutputStream os;
try {
os = new BufferedOutputStream(new FileOutputStream(file), 1024 * 1024);
- } catch (OutOfMemoryError e) {
+ } catch (final OutOfMemoryError e) {
os = new FileOutputStream(file);
}
int c = 0;
@@ -388,10 +388,10 @@ public final class RowHandleSet implements HandleSet, Iterable<byte[]>, Cloneabl
s1.close();
} catch(IOException e) {
e.printStackTrace();
- } catch (ClassNotFoundException e) {
+ } catch (final ClassNotFoundException e) {
e.printStackTrace();
}
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
e.printStackTrace();
}
s.close();
diff --git a/source/net/yacy/kelondro/io/ByteCountInputStream.java b/source/net/yacy/kelondro/io/ByteCountInputStream.java
index 9305cfd40..26ee119a5 100644
--- a/source/net/yacy/kelondro/io/ByteCountInputStream.java
+++ b/source/net/yacy/kelondro/io/ByteCountInputStream.java
@@ -123,7 +123,7 @@ public final class ByteCountInputStream extends FilterInputStream {
public final synchronized void close() throws IOException {
try {
super.close();
- } catch (OutOfMemoryError e) {
+ } catch (final OutOfMemoryError e) {
ConcurrentLog.logException(e);
}
this.finish();
diff --git a/source/net/yacy/kelondro/io/CachedFileReader.java b/source/net/yacy/kelondro/io/CachedFileReader.java
index 487829525..176890675 100644
--- a/source/net/yacy/kelondro/io/CachedFileReader.java
+++ b/source/net/yacy/kelondro/io/CachedFileReader.java
@@ -76,9 +76,9 @@ public final class CachedFileReader extends AbstractReader implements Reader {
public final synchronized void close() {
if (RAFile != null) try {
- try{RAFile.getChannel().close();} catch (IOException e) {}
+ try{RAFile.getChannel().close();} catch (final IOException e) {}
RAFile.close();
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
this.cache = null;
diff --git a/source/net/yacy/kelondro/io/CachedFileWriter.java b/source/net/yacy/kelondro/io/CachedFileWriter.java
index b2bff3858..e35793dde 100644
--- a/source/net/yacy/kelondro/io/CachedFileWriter.java
+++ b/source/net/yacy/kelondro/io/CachedFileWriter.java
@@ -146,11 +146,11 @@ public final class CachedFileWriter extends AbstractWriter implements Writer {
@Override
public final synchronized void close() {
if (this.RAFile != null) try {
- try{this.RAFile.getChannel().close();} catch (IOException e) {}
+ try{this.RAFile.getChannel().close();} catch (final IOException e) {}
//System.out.println("***DEBUG*** closed file " + this.file + ", FD is " + ((RAFile.getFD().valid()) ? "VALID" : "VOID") + ", channel is " + ((RAFile.getChannel().isOpen()) ? "OPEN" : "CLOSE"));
this.RAFile.close();
//System.out.println("***DEBUG*** closed file " + this.file + ", FD is " + ((RAFile.getFD().valid()) ? "VALID" : "VOID") + ", channel is " + ((RAFile.getChannel().isOpen()) ? "OPEN" : "CLOSE"));
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
this.cache = null;
@@ -162,7 +162,7 @@ public final class CachedFileWriter extends AbstractWriter implements Writer {
// re-open the file
try {
this.RAFile = new RandomAccessFile(this.file, "rw");
- } catch (FileNotFoundException e) {
+ } catch (final FileNotFoundException e) {
ConcurrentLog.logException(e);
}
this.cache = new byte[8192];
diff --git a/source/net/yacy/kelondro/io/Records.java b/source/net/yacy/kelondro/io/Records.java
index 0a407eb67..0f3d30959 100644
--- a/source/net/yacy/kelondro/io/Records.java
+++ b/source/net/yacy/kelondro/io/Records.java
@@ -161,7 +161,7 @@ public final class Records {
try {
records = this.raf.length() / this.recordsize;
- } catch (NullPointerException e) {
+ } catch (final NullPointerException e) {
// This may happen on shutdown while still something is moving on
ConcurrentLog.logException(e);
}
diff --git a/source/net/yacy/kelondro/logging/LogalizerHandler.java b/source/net/yacy/kelondro/logging/LogalizerHandler.java
index d0b21caa1..7e6d68158 100644
--- a/source/net/yacy/kelondro/logging/LogalizerHandler.java
+++ b/source/net/yacy/kelondro/logging/LogalizerHandler.java
@@ -55,7 +55,7 @@ public final class LogalizerHandler extends Handler {
if (temp != null) try {
final int returnV = temp.parse(record.getLevel().toString(), record.getMessage());
if (debug) System.out.println("Logalizertest: " + returnV + " --- " + record.getLevel());
- } catch (Exception e) {}
+ } catch (final Exception e) {}
}
flush();
}
diff --git a/source/net/yacy/kelondro/table/Table.java b/source/net/yacy/kelondro/table/Table.java
index 7f1faaa22..e0faf9577 100644
--- a/source/net/yacy/kelondro/table/Table.java
+++ b/source/net/yacy/kelondro/table/Table.java
@@ -130,9 +130,9 @@ public class Table implements Index, Iterable<Row.Entry> {
this.table = ((exceed134217727 || neededRAM4table < maxarraylength) &&
useTailCache && MemoryControl.available() > 600L * 1024L * 1024L &&
MemoryControl.request(neededRAM4table, true)) ? new RowSet(this.taildef, records) : null;
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
this.table = null;
- } catch (Throwable e) {
+ } catch (final Throwable e) {
this.table = null;
}
@@ -1161,7 +1161,7 @@ public class Table implements Index, Iterable<Row.Entry> {
entry.setCol(1, "dummy".getBytes());
t.put(entry);
t.close();
- } catch (IOException e) {
+ } catch (final IOException e) {
Log.logException(e);
}
*/
diff --git a/source/net/yacy/kelondro/util/BDecoder.java b/source/net/yacy/kelondro/util/BDecoder.java
index bb949fab8..4c86ae310 100644
--- a/source/net/yacy/kelondro/util/BDecoder.java
+++ b/source/net/yacy/kelondro/util/BDecoder.java
@@ -316,7 +316,7 @@ public class BDecoder {
BObject o = bdecoder.parse();
print(o, 0);
System.out.println("Object: " + o.toString());
- } catch (IOException e) {
+ } catch (final IOException e) {
e.printStackTrace();
}
}
diff --git a/source/net/yacy/kelondro/util/BEncoder.java b/source/net/yacy/kelondro/util/BEncoder.java
index 205738d56..28ed02c25 100644
--- a/source/net/yacy/kelondro/util/BEncoder.java
+++ b/source/net/yacy/kelondro/util/BEncoder.java
@@ -48,7 +48,7 @@ public class BEncoder {
dict.toStream(baos);
baos.close();
return baos.toByteArray();
- } catch (IOException e) {}
+ } catch (final IOException e) {}
return null;
}
public static byte[] encodeMap(String key, byte[] value) {
@@ -57,7 +57,7 @@ public class BEncoder {
BDecoder.BDictionaryObject.toStream(baos, key, value);
baos.close();
return baos.toByteArray();
- } catch (IOException e) {}
+ } catch (final IOException e) {}
return null;
}
diff --git a/source/net/yacy/kelondro/util/FileUtils.java b/source/net/yacy/kelondro/util/FileUtils.java
index 08dbf1672..ee210a882 100644
--- a/source/net/yacy/kelondro/util/FileUtils.java
+++ b/source/net/yacy/kelondro/util/FileUtils.java
@@ -141,7 +141,7 @@ public final class FileUtils {
count += n;
}
dest.flush();
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
assert e != null;
// an "sun.io.MalformedInputException: Missing byte-order mark" - exception may occur here
//Log.logException(e);
@@ -181,7 +181,7 @@ public final class FileUtils {
if ( fos != null ) {
try {
fos.close();
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
ConcurrentLog.warn(
"FileUtils",
"cannot close FileOutputStream for " + dest + "! " + e.getMessage());
@@ -220,7 +220,7 @@ public final class FileUtils {
if ( fis != null ) {
try {
fis.close();
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
}
}
}
@@ -246,7 +246,7 @@ public final class FileUtils {
if ( fis != null ) {
try {
fis.close();
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
}
}
}
@@ -296,7 +296,7 @@ public final class FileUtils {
if ( fis != null ) {
try {
fis.close();
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
}
}
fis = null;
@@ -342,7 +342,7 @@ public final class FileUtils {
byteOutput.close();
source = byteOutput.toByteArray();
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
if ( !e.getMessage().equals("Not in GZIP format") ) {
throw new IOException(e.getMessage());
}
@@ -365,12 +365,12 @@ public final class FileUtils {
}
}
br.close();
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
} finally {
if ( br != null ) {
try {
br.close();
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
}
}
}
@@ -382,7 +382,7 @@ public final class FileUtils {
try {
final byte[] b = read(f);
return table(strings(b));
- } catch ( final IOException e2 ) {
+ } catch (final IOException e2 ) {
ConcurrentLog.severe("FileUtils", f.toString() + " not found", e2);
return null;
}
@@ -426,9 +426,9 @@ public final class FileUtils {
pw.println(key + "=" + value);
}
pw.println("# EOF");
- } catch ( FileNotFoundException e ) {
+ } catch (final FileNotFoundException e ) {
ConcurrentLog.warn("FileUtils", e.getMessage(), e);
- } catch ( UnsupportedEncodingException e ) {
+ } catch (final UnsupportedEncodingException e ) {
ConcurrentLog.warn("FileUtils", e.getMessage(), e);
} finally {
if ( pw != null ) {
@@ -438,7 +438,7 @@ public final class FileUtils {
}
try {
forceMove(tf, file);
- } catch ( IOException e ) {
+ } catch (final IOException e ) {
// ignore
}
}
@@ -475,7 +475,7 @@ public final class FileUtils {
value = value.replace("\\\\", "\\"); // does not work: escaped_backslashbackslash.matcher(value).replaceAll("\\");
//System.out.println("key = " + key + ", value = " + value);
props.put(key, value);
- } catch (IndexOutOfBoundsException e) {
+ } catch (final IndexOutOfBoundsException e) {
ConcurrentLog.logException(e);
}
}
@@ -494,7 +494,7 @@ public final class FileUtils {
}
try {
return new StringsIterator(new BufferedReader(new InputStreamReader(new ByteArrayInputStream(a), "UTF-8")));
- } catch ( final UnsupportedEncodingException e ) {
+ } catch (final UnsupportedEncodingException e ) {
return null;
}
}
@@ -516,13 +516,13 @@ public final class FileUtils {
list.add(line);
}
br.close();
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
// list is empty
} finally {
if ( br != null ) {
try {
br.close();
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
}
}
}
@@ -543,13 +543,13 @@ public final class FileUtils {
bw.write(out);
bw.close();
return true;
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
return false;
} finally {
if ( bw != null ) {
try {
bw.close();
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
}
}
}
@@ -585,12 +585,12 @@ public final class FileUtils {
}
}
br.close();
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
} finally {
if ( br != null ) {
try {
br.close();
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
}
}
}
@@ -727,16 +727,16 @@ public final class FileUtils {
break;
}
}
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
this.nextLine = null;
- } catch ( final OutOfMemoryError e ) {
+ } catch (final OutOfMemoryError e ) {
ConcurrentLog.logException(e);
this.nextLine = null;
}
if (this.nextLine == null && this.reader != null) {
try {
this.reader.close();
- } catch (IOException e) {} finally {
+ } catch (final IOException e) {} finally {
this.reader = null;
}
}
@@ -819,7 +819,7 @@ public final class FileUtils {
//System.gc();
try {
Thread.sleep(200);
- } catch ( final InterruptedException e ) {
+ } catch (final InterruptedException e ) {
break;
}
}
@@ -828,7 +828,7 @@ public final class FileUtils {
String p = "";
try {
p = path.getCanonicalPath();
- } catch ( final IOException e1 ) {
+ } catch (final IOException e1 ) {
ConcurrentLog.logException(e1);
}
if ( System.getProperties().getProperty("os.name", "").toLowerCase().startsWith("windows") ) {
@@ -842,7 +842,7 @@ public final class FileUtils {
final byte[] response = read(r.getInputStream());
ConcurrentLog.info("FileUtils", "deletedelete: " + UTF8.String(response));
}
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
}
}
@@ -870,7 +870,7 @@ public final class FileUtils {
&& file.isFile()
&& directory.getCanonicalPath().equalsIgnoreCase(
file.getParentFile().getCanonicalPath()));
- } catch (IOException e) {
+ } catch (final IOException e) {
inDirectory = false;
}
diff --git a/source/net/yacy/kelondro/util/ReverseMapIterator.java b/source/net/yacy/kelondro/util/ReverseMapIterator.java
index c8cab3bd8..28359d85f 100644
--- a/source/net/yacy/kelondro/util/ReverseMapIterator.java
+++ b/source/net/yacy/kelondro/util/ReverseMapIterator.java
@@ -46,7 +46,7 @@ public class ReverseMapIterator <E, F> implements Iterator<Map.Entry<E, F>> {
a.add(e);
}
break;
- } catch (ConcurrentModificationException e) {
+ } catch (final ConcurrentModificationException e) {
continue;
}
}
diff --git a/source/net/yacy/kelondro/util/SetTools.java b/source/net/yacy/kelondro/util/SetTools.java
index 42216904c..604f4a8ce 100644
--- a/source/net/yacy/kelondro/util/SetTools.java
+++ b/source/net/yacy/kelondro/util/SetTools.java
@@ -157,7 +157,7 @@ public final class SetTools {
result.put(mentry1.getKey(), mentry1.getValue());
}
}
- } catch (ConcurrentModificationException e) {
+ } catch (final ConcurrentModificationException e) {
ConcurrentLog.warn("SetTools", e.getMessage(), e);
break loop;
}
diff --git a/source/net/yacy/kelondro/workflow/WorkflowProcessor.java b/source/net/yacy/kelondro/workflow/WorkflowProcessor.java
index 841950de4..526c47bd3 100644
--- a/source/net/yacy/kelondro/workflow/WorkflowProcessor.java
+++ b/source/net/yacy/kelondro/workflow/WorkflowProcessor.java
@@ -225,7 +225,7 @@ public class WorkflowProcessor<J extends WorkflowJob> {
for (int i = 0; i < 10; i++) {
if (this.input.size() <= 0) break;
ConcurrentLog.info("WorkflowProcess", "waiting for queue " + this.processName + " to shut down; input.size = " + this.input.size());
- try {Thread.sleep(1000);} catch (InterruptedException e) {}
+ try {Thread.sleep(1000);} catch (final InterruptedException e) {}
}
this.executorRunning.set(0);
diff --git a/source/net/yacy/migration.java b/source/net/yacy/migration.java
index 35668c7d6..216acc457 100644
--- a/source/net/yacy/migration.java
+++ b/source/net/yacy/migration.java
@@ -288,7 +288,7 @@ public class migration {
}
try {
f.createNewFile();
- } catch (IOException ex) {
+ } catch (final IOException ex) {
ConcurrentLog.info("migrateUrldbtoSolr","could not create lock file");
}
@@ -318,7 +318,7 @@ public class migration {
if (Switchboard.getSwitchboard().shallTerminate()) {
go = false;
}
- } catch (Exception e) {
+ } catch (final Exception e) {
ConcurrentLog.info("migrateUrldbtoSolr", "some error while adding old data to new index, continue with next entry");
}
}
@@ -326,7 +326,7 @@ public class migration {
}
ft.commit(true);
- } catch (IOException ex) {
+ } catch (final IOException ex) {
ConcurrentLog.info("migrateUrldbtoSolr", "error reading old urldb index");
} finally {
if (f.exists()) {
@@ -381,9 +381,9 @@ public class migration {
}
}
lukeCheckok = true;
- } catch (SolrServerException ex) {
+ } catch (final SolrServerException ex) {
ConcurrentLog.logException(ex);
- } catch (IOException ex) {
+ } catch (final IOException ex) {
ConcurrentLog.logException(ex);
}
diff --git a/source/net/yacy/peers/DHTSelection.java b/source/net/yacy/peers/DHTSelection.java
index 1c6ad456c..77a93a7a4 100644
--- a/source/net/yacy/peers/DHTSelection.java
+++ b/source/net/yacy/peers/DHTSelection.java
@@ -280,7 +280,7 @@ public class DHTSelection {
if (this.doublecheck.has(hashb)) return null;
try {
this.doublecheck.put(hashb);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
break;
}
diff --git a/source/net/yacy/peers/Network.java b/source/net/yacy/peers/Network.java
index 15eaaec0a..1d2b47f0b 100644
--- a/source/net/yacy/peers/Network.java
+++ b/source/net/yacy/peers/Network.java
@@ -335,7 +335,7 @@ public class Network
}
}
}
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
ConcurrentLog.logException(e);
log.severe(
"publishThread: error with target seed " + this.seed.toString() + ": " + e.getMessage(),
@@ -431,7 +431,7 @@ public class Network
} else {
this.sb.peers.mySeed().put("news", net.yacy.utils.crypt.simpleEncode(record.toString()));
}
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
log.severe("publishMySeed: problem with news encoding", e);
}
this.sb.peers.mySeed().setUnusedFlags();
@@ -590,7 +590,7 @@ public class Network
.getPublicAddress()));
this.sb.peers.saveMySeed();
return 0;
- } catch ( final InterruptedException e ) {
+ } catch (final InterruptedException e ) {
try {
log.info("publish: Interruption detected while publishing my seed.");
@@ -606,7 +606,7 @@ public class Network
// waiting some time for the publishThreads to finish execution
try {
Thread.sleep(500);
- } catch ( final InterruptedException ex ) {
+ } catch (final InterruptedException ex ) {
}
// getting the amount of remaining publishing threads
@@ -631,14 +631,14 @@ public class Network
}
try {
currentThread.join(500);
- } catch ( final InterruptedException ex ) {
+ } catch (final InterruptedException ex ) {
}
}
}
log.info("publish: Shutdown off all remaining publishing thread finished.");
- } catch ( final Exception ee ) {
+ } catch (final Exception ee ) {
log.warn(
"publish: Unexpected error while trying to shutdown all remaining publishing threads.",
e);
@@ -670,7 +670,7 @@ public class Network
final Class<?> uploaderClass = Class.forName(className);
final Object uploader = uploaderClass.newInstance();
return (yacySeedUploader) uploader;
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
return null;
}
}
@@ -770,7 +770,7 @@ public class Network
log.warn("SaveSeedList: " + errorMsg);
return errorMsg;
}
- } catch ( final MalformedURLException e ) {
+ } catch (final MalformedURLException e ) {
final String errorMsg =
"Malformed seed file URL '"
+ sb.peers.mySeed().get(Seed.SEEDLISTURL, "")
@@ -816,7 +816,7 @@ public class Network
// finally, set the principal status
sb.setConfig("yacyStatus", Seed.PEERTYPE_PRINCIPAL);
return null;
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
sb.peers.mySeed().put(Seed.PEERTYPE, prevStatus);
sb.setConfig("yacyStatus", prevStatus);
final String errorMsg = "SaveSeedList: Seed upload failed (IO error): " + e.getMessage();
diff --git a/source/net/yacy/peers/Protocol.java b/source/net/yacy/peers/Protocol.java
index 4fb9234c8..9d0c1d477 100644
--- a/source/net/yacy/peers/Protocol.java
+++ b/source/net/yacy/peers/Protocol.java
@@ -201,7 +201,7 @@ public final class Protocol {
false);
responseTime = System.currentTimeMillis() - start;
result = FileUtils.table(content);
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
if ( Thread.currentThread().isInterrupted() ) {
Network.log.info("yacyClient.hello thread '"
+ Thread.currentThread().getName()
@@ -260,7 +260,7 @@ public final class Protocol {
+ otherHash);
return -1; // no success
}
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
Network.log.info("yacyClient.hello: consistency error: other seed bad:"
+ e.getMessage()
+ ", seed="
@@ -375,7 +375,7 @@ public final class Protocol {
if ( peerActions.peerArrival(s, (i == 1)) ) {
count++;
}
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
Network.log.info("hello/client: rejected contacting seed; bad ("
+ e.getMessage()
+ ")");
@@ -422,7 +422,7 @@ public final class Protocol {
if ( peerActions.peerArrival(s, (i == 1)) ) {
count++;
}
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
Network.log.logInfo("hello/client: rejected contacting seed; bad ("
+ e.getMessage()
+ ")");
@@ -449,7 +449,7 @@ public final class Protocol {
}
//final Date remoteTime = yacyCore.parseUniversalDate((String) result.get(yacySeed.MYTIME)); // read remote time
return Seed.genRemoteSeed(result.get("response"), false, target.getIP());
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
Network.log.warn("yacyClient.querySeed error:" + e.getMessage());
return null;
}
@@ -476,10 +476,10 @@ public final class Protocol {
if (magic == null) magic = "0";
try {
return new long[] {Long.parseLong(resp), Long.parseLong(magic)};
- } catch ( final NumberFormatException e ) {
+ } catch (final NumberFormatException e ) {
return new long[] {-1, -1};
}
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
if (Network.log.isFine()) Network.log.fine("yacyClient.queryRWICount error:" + e.getMessage());
return new long[] {-1, -1};
}
@@ -544,7 +544,7 @@ public final class Protocol {
target.put(Seed.RCOUNT, Integer.toString(Math.max(0, targetCount - feed.size())));
seedDB.update(target.hash, target);
return feed;
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
Network.log.warn("yacyClient.queryRemoteCrawlURLs error asking peer '"
+ target.getName()
+ "':"
@@ -627,7 +627,7 @@ public final class Protocol {
clusteraddress,
secondarySearchSuperviser
);
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
Network.log.info("SEARCH failed, Peer: " + target.hash + ":" + target.getName() + " (" + e.getMessage() + ")");
event.peers.peerActions.peerDeparture(target, "search request to peer created io exception: " + e.getMessage());
return -1;
@@ -637,7 +637,7 @@ public final class Protocol {
try {
remoteSearchProcess(event, count, totalrequesttime, wordhashes, target, blacklist, result);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
return -1;
}
@@ -652,7 +652,7 @@ public final class Protocol {
try {
ci = new ByteBuffer(abstractEntry.getValue());
wordhash = ASCII.String(abstractEntry.getKey());
- } catch ( final OutOfMemoryError e ) {
+ } catch (final OutOfMemoryError e ) {
ConcurrentLog.logException(e);
continue;
}
@@ -704,7 +704,7 @@ public final class Protocol {
target.getClusterAddress(),
null
);
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
Network.log.info("SEARCH failed, Peer: " + target.hash + ":" + target.getName() + " (" + e.getMessage() + ")");
event.peers.peerActions.peerDeparture(target, "search request to peer created io exception: " + e.getMessage());
return -1;
@@ -714,7 +714,7 @@ public final class Protocol {
try {
remoteSearchProcess(event, count, totalrequesttime, wordhashes, target, blacklist, result);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
return -1;
}
@@ -811,7 +811,7 @@ public final class Protocol {
for ( final ReferenceContainer<WordReference> c : container ) {
try {
c.add(entry);
- } catch ( final SpaceExceededException e ) {
+ } catch (final SpaceExceededException e ) {
ConcurrentLog.logException(e);
break;
}
@@ -821,7 +821,7 @@ public final class Protocol {
for (URIMetadataRow entry: storeDocs) {
try {
event.query.getSegment().fulltext().putMetadata(entry);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -837,7 +837,7 @@ public final class Protocol {
for ( final ReferenceContainer<WordReference> c : container ) {
try {
event.query.getSegment().storeRWI(c);
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
ConcurrentLog.logException(e);
}
}
@@ -950,7 +950,7 @@ public final class Protocol {
/*
try {
this.searchtime = Integer.parseInt(resultMap.get("searchtime"));
- } catch ( final NumberFormatException e ) {
+ } catch (final NumberFormatException e ) {
throw new IOException("wrong output format for searchtime: "
+ e.getMessage()
+ ", map = "
@@ -959,12 +959,12 @@ public final class Protocol {
*/
try {
this.totalCount = Integer.parseInt(resultMap.get("joincount")); // the complete number of hits at remote site; rwi+solr (via: theSearch.getResultCount())
- } catch ( final NumberFormatException e ) {
+ } catch (final NumberFormatException e ) {
throw new IOException("wrong output format for joincount: " + e.getMessage());
}
try {
this.availableCount = Integer.parseInt(resultMap.get("count")); // the number of hits that are returned in the result list
- } catch ( final NumberFormatException e ) {
+ } catch (final NumberFormatException e ) {
throw new IOException("wrong output format for count: " + e.getMessage());
}
// scan the result map for entries with special prefix
@@ -1038,7 +1038,7 @@ public final class Protocol {
try {
rsp = event.getQuery().getSegment().fulltext().getDefaultConnector().getResponseByParams(solrQuery);
docList = rsp.getResults();
- } catch (Throwable e) {
+ } catch (final Throwable e) {
Network.log.info("SEARCH failed (solr), localpeer (" + e.getMessage() + ")", e);
return -1;
}
@@ -1052,7 +1052,7 @@ public final class Protocol {
solrConnector.close();
instance.close();
// no need to close this here because that sends a commit to remote solr which is not wanted here
- } catch (Throwable e) {
+ } catch (final Throwable e) {
Network.log.info("SEARCH failed (solr), remote Peer: " +target.getName() + "/" + target.getPublicAddress() + " (" + e.getMessage() + ")");
return -1;
}
@@ -1196,7 +1196,7 @@ public final class Protocol {
final byte[] content = postToFile(seedDB, targetHash, "message.html", parts, 6000);
final Map<String, String> result = FileUtils.table(content);
return result;
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
// most probably a network time-out exception
Network.log.warn("yacyClient.permissionMessage error:" + e.getMessage());
return null;
@@ -1224,7 +1224,7 @@ public final class Protocol {
final byte[] content = postToFile(seedDB, targetHash, "message.html", parts, 20000);
final Map<String, String> result = FileUtils.table(content);
return result;
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
Network.log.warn("yacyClient.postMessage error:" + e.getMessage());
return null;
}
@@ -1293,7 +1293,7 @@ public final class Protocol {
parts,
false);
return FileUtils.table(content);
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
// most probably a network time-out exception
Network.log.warn("yacyClient.crawlReceipt error:" + e.getMessage());
return null;
@@ -1478,7 +1478,7 @@ public final class Protocol {
// return the transfered index data in bytes (for debugging only)
result.put("indexPayloadSize", Integer.toString(entrypost.length()));
return result;
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
Network.log.info("yacyClient.transferRWI to " + address + " error: " + e.getMessage());
return null;
}
@@ -1535,7 +1535,7 @@ public final class Protocol {
// return the transfered url data in bytes (for debugging only)
result.put("urlPayloadSize", Integer.toString(urlPayloadSize));
return result;
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
Network.log.warn("yacyClient.transferURL to " + address + " error: " + e.getMessage());
return null;
}
@@ -1563,7 +1563,7 @@ public final class Protocol {
parts,
false);
return FileUtils.table(content);
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
Network.log.warn("yacyClient.getProfile error:" + e.getMessage());
return null;
}
@@ -1627,12 +1627,12 @@ public final class Protocol {
//System.out.println("REFERENCE: " + reference);
referenceContainer.add(new HostReference(reference));
}
- } catch ( final JSONException e ) {
+ } catch (final JSONException e ) {
} // this finishes the iteration
index.add(referenceContainer);
}
return index;
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
Network.log.warn("yacyClient.loadIDXHosts error:" + e.getMessage());
return index;
}
diff --git a/source/net/yacy/peers/Seed.java b/source/net/yacy/peers/Seed.java
index 1f8c5a2a2..23e126ad8 100644
--- a/source/net/yacy/peers/Seed.java
+++ b/source/net/yacy/peers/Seed.java
@@ -385,7 +385,7 @@ public class Seed implements Cloneable, Comparable<Seed>, Comparator<Seed>
if ( o instanceof String ) {
try {
return Float.parseFloat((String) o);
- } catch ( final NumberFormatException e ) {
+ } catch (final NumberFormatException e ) {
return dflt;
}
} else if ( o instanceof Float ) {
@@ -403,7 +403,7 @@ public class Seed implements Cloneable, Comparable<Seed>, Comparator<Seed>
if ( o instanceof String ) {
try {
return Long.parseLong((String) o);
- } catch ( final NumberFormatException e ) {
+ } catch (final NumberFormatException e ) {
return dflt;
}
} else if ( o instanceof Long ) {
@@ -551,7 +551,7 @@ public class Seed implements Cloneable, Comparable<Seed>, Comparator<Seed>
public final Double getVersion() {
try {
return Double.parseDouble(get(Seed.VERSION, Seed.ZERO));
- } catch ( final NumberFormatException e ) {
+ } catch (final NumberFormatException e ) {
return 0.0d;
}
}
@@ -654,9 +654,9 @@ public class Seed implements Cloneable, Comparable<Seed>, Comparator<Seed>
// of the local UTC offset is wrong. We correct this here by adding the local UTC
// offset again.
return t /*+ DateFormatter.UTCDiff()*/;
- } catch ( final java.text.ParseException e ) { // in case of an error make seed look old!!!
+ } catch (final java.text.ParseException e ) { // in case of an error make seed look old!!!
return System.currentTimeMillis() - AbstractFormatter.dayMillis;
- } catch ( final java.lang.NumberFormatException e ) {
+ } catch (final java.lang.NumberFormatException e ) {
return System.currentTimeMillis() - AbstractFormatter.dayMillis;
}
}
@@ -681,7 +681,7 @@ public class Seed implements Cloneable, Comparable<Seed>, Comparator<Seed>
final GenericFormatter my_SHORT_SECOND_FORMATTER =
new GenericFormatter(GenericFormatter.FORMAT_SHORT_SECOND, GenericFormatter.time_second); // use our own formatter to prevent concurrency locks with other processes
b = my_SHORT_SECOND_FORMATTER.parse(get(Seed.BDATE, "20040101000000")).getTime();
- } catch ( final ParseException e ) {
+ } catch (final ParseException e ) {
b = System.currentTimeMillis();
}
this.birthdate = b;
@@ -719,7 +719,7 @@ public class Seed implements Cloneable, Comparable<Seed>, Comparator<Seed>
public int getPPM() {
try {
return Integer.parseInt(get(Seed.ISPEED, Seed.ZERO));
- } catch ( final NumberFormatException e ) {
+ } catch (final NumberFormatException e ) {
return 0;
}
}
@@ -727,7 +727,7 @@ public class Seed implements Cloneable, Comparable<Seed>, Comparator<Seed>
public float getQPM() {
try {
return Float.parseFloat(get(Seed.RSPEED, Seed.ZERO));
- } catch ( final NumberFormatException e ) {
+ } catch (final NumberFormatException e ) {
return 0f;
}
}
@@ -735,7 +735,7 @@ public class Seed implements Cloneable, Comparable<Seed>, Comparator<Seed>
public final long getLinkCount() {
try {
return getLong(Seed.LCOUNT, 0);
- } catch ( final NumberFormatException e ) {
+ } catch (final NumberFormatException e ) {
return 0;
}
}
@@ -743,7 +743,7 @@ public class Seed implements Cloneable, Comparable<Seed>, Comparator<Seed>
public final long getWordCount() {
try {
return getLong(Seed.ICOUNT, 0);
- } catch ( final NumberFormatException e ) {
+ } catch (final NumberFormatException e ) {
return 0;
}
}
@@ -1062,7 +1062,7 @@ public class Seed implements Cloneable, Comparable<Seed>, Comparator<Seed>
if (Domains.isLocalhost(host)) {
return "seedURL in localhost rejected";
}
- } catch ( final MalformedURLException e ) {
+ } catch (final MalformedURLException e ) {
return "seedURL malformed";
}
}
diff --git a/source/net/yacy/peers/SeedDB.java b/source/net/yacy/peers/SeedDB.java
index 4ecde739d..d28e947be 100644
--- a/source/net/yacy/peers/SeedDB.java
+++ b/source/net/yacy/peers/SeedDB.java
@@ -632,7 +632,7 @@ public final class SeedDB implements AlternativeDomainNames {
//System.out.println("*** found lookupByName in seedActiveDB: " + peerName);
return seed;
}
- } catch ( IOException e ) {
+ } catch (final IOException e ) {
}}
synchronized (this) { try {
Collection<byte[]> idx = this.seedPassiveDB.select(Seed.NAME, name);
@@ -642,7 +642,7 @@ public final class SeedDB implements AlternativeDomainNames {
//System.out.println("*** found lookupByName in seedPassiveDB: " + peerName);
return seed;
}
- } catch ( IOException e ) {
+ } catch (final IOException e ) {
}}
// check local seed
@@ -683,7 +683,7 @@ public final class SeedDB implements AlternativeDomainNames {
//System.out.println("*** found lookupByIP in connected: " + peerIP.toString() + " -> " + seed.getName());
return seed;
}
- } catch ( IOException e ) {
+ } catch (final IOException e ) {
}
}
@@ -697,7 +697,7 @@ public final class SeedDB implements AlternativeDomainNames {
//System.out.println("*** found lookupByIP in disconnected: " + peerIP.toString() + " -> " + seed.getName());
return seed;
}
- } catch ( IOException e ) {
+ } catch (final IOException e ) {
}
}
@@ -711,7 +711,7 @@ public final class SeedDB implements AlternativeDomainNames {
//System.out.println("*** found lookupByIP in potential: " + peerIP.toString() + " -> " + seed.getName());
return seed;
}
- } catch ( IOException e ) {
+ } catch (final IOException e ) {
}
}
diff --git a/source/net/yacy/peers/graphics/EncodedImage.java b/source/net/yacy/peers/graphics/EncodedImage.java
index 960412b2e..92fec46bb 100644
--- a/source/net/yacy/peers/graphics/EncodedImage.java
+++ b/source/net/yacy/peers/graphics/EncodedImage.java
@@ -41,7 +41,7 @@ public class EncodedImage {
try {
bos.write(sourceImage.get());
bos.close();
- } catch (IOException e) {
+ } catch (final IOException e) {
}
this.image = new ByteBuffer(bos.toByteArray());
this.extension = "gif";
diff --git a/source/net/yacy/peers/graphics/WebStructureGraph.java b/source/net/yacy/peers/graphics/WebStructureGraph.java
index 0bfcafc5f..aa7a23c47 100644
--- a/source/net/yacy/peers/graphics/WebStructureGraph.java
+++ b/source/net/yacy/peers/graphics/WebStructureGraph.java
@@ -103,7 +103,7 @@ public class WebStructureGraph {
(this.structureFile.exists())
? FileUtils.loadMapB(this.structureFile)
: new TreeMap<String, byte[]>();
- } catch ( final OutOfMemoryError e ) {
+ } catch (final OutOfMemoryError e ) {
loadedStructureB = new TreeMap<String, byte[]>();
}
if ( loadedStructureB != null ) {
@@ -147,7 +147,7 @@ public class WebStructureGraph {
while ( (lro = WebStructureGraph.this.publicRefDNSResolvingQueue.take()) != leanrefObjectPOISON ) {
learnrefs(lro);
}
- } catch ( final InterruptedException e ) {
+ } catch (final InterruptedException e ) {
}
}
}
@@ -183,7 +183,7 @@ public class WebStructureGraph {
} else {
learnrefs(lro);
}
- } catch ( final InterruptedException e ) {
+ } catch (final InterruptedException e ) {
learnrefs(lro);
}
}
@@ -201,7 +201,7 @@ public class WebStructureGraph {
} else {
learnrefs(lro);
}
- } catch ( final InterruptedException e ) {
+ } catch (final InterruptedException e ) {
learnrefs(lro);
}
}
@@ -223,7 +223,7 @@ public class WebStructureGraph {
c = refs.substring(8 + i * 10, 8 + (i + 1) * 10);
try {
d = Integer.valueOf(c.substring(6), 16);
- } catch ( final NumberFormatException e ) {
+ } catch (final NumberFormatException e ) {
d = 1;
}
map.put(c.substring(0, 6), d);
@@ -503,7 +503,7 @@ public class WebStructureGraph {
ASCII.getBytes(sentry.hosthash),
GenericFormatter.SHORT_DAY_FORMATTER.parse(sentry.date).getTime(),
refhosthashandcounter.getValue().intValue());
- } catch ( final ParseException e ) {
+ } catch (final ParseException e ) {
continue refloop;
}
// each term refers to an index entry. look if we already have such an entry
@@ -516,7 +516,7 @@ public class WebStructureGraph {
} else {
r.put(hr);
}
- } catch ( final SpaceExceededException e ) {
+ } catch (final SpaceExceededException e ) {
continue refloop;
}
}
@@ -551,7 +551,7 @@ public class WebStructureGraph {
}
}
}
- } catch (Throwable t) {
+ } catch (final Throwable t) {
this.clear();
}
return c;
@@ -798,7 +798,7 @@ public class WebStructureGraph {
try {
this.publicRefDNSResolvingQueue.put(leanrefObjectPOISON);
this.publicRefDNSResolvingWorker.join(5000);
- } catch ( final InterruptedException e ) {
+ } catch (final InterruptedException e ) {
}
}
diff --git a/source/net/yacy/repository/Blacklist.java b/source/net/yacy/repository/Blacklist.java
index 297a9db30..47ee0e24b 100644
--- a/source/net/yacy/repository/Blacklist.java
+++ b/source/net/yacy/repository/Blacklist.java
@@ -657,7 +657,7 @@ public class Blacklist {
this.cachedUrlHashs.put(type, rhs == null ? new RowHandleSet(URIMetadataRow.rowdef.primaryKeyLength, URIMetadataRow.rowdef.objectOrder, 0) : rhs);
in.close();
return;
- } catch (Throwable e) {
+ } catch (final Throwable e) {
ConcurrentLog.logException(e);
}
}
diff --git a/source/net/yacy/search/ResourceObserver.java b/source/net/yacy/search/ResourceObserver.java
index f6982dc0f..7a5abb6a8 100644
--- a/source/net/yacy/search/ResourceObserver.java
+++ b/source/net/yacy/search/ResourceObserver.java
@@ -191,7 +191,7 @@ public class ResourceObserver {
final Method getFreeSpace = file6.getClass().getMethod("getUsableSpace", (Class[])null);
final Object space = getFreeSpace.invoke(file6, (Object[])null);
return Long.parseLong(space.toString());
- } catch (Throwable e) {
+ } catch (final Throwable e) {
return -1L;
}
}
diff --git a/source/net/yacy/search/Shutdown.java b/source/net/yacy/search/Shutdown.java
index 521b93e41..3d18c4125 100644
--- a/source/net/yacy/search/Shutdown.java
+++ b/source/net/yacy/search/Shutdown.java
@@ -37,9 +37,9 @@ public class Shutdown extends Thread {
public void run() {
try {
Thread.sleep(this.delay);
- } catch ( final InterruptedException e ) {
+ } catch (final InterruptedException e ) {
this.sb.getLog().info("interrupted delayed shutdown");
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
ConcurrentLog.logException(e);
}
this.sb.terminate(this.reason);
diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.java
index a88706604..d91a98e38 100644
--- a/source/net/yacy/search/Switchboard.java
+++ b/source/net/yacy/search/Switchboard.java
@@ -294,7 +294,7 @@ public final class Switchboard extends serverSwitch {
+ port
+ "; possibly another YaCy process has not terminated yet. Please stop YaCy before running a new instance.");
}
- } catch ( final ExecutionException e1 ) {
+ } catch (final ExecutionException e1 ) {
}
MemoryTracker.startSystemProfiling();
@@ -347,7 +347,7 @@ public final class Switchboard extends serverSwitch {
if (!wf.exists()) {
try {
Files.copy(new File(defaultWorkPath, fs), wf);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -389,9 +389,9 @@ public final class Switchboard extends serverSwitch {
// load the network definition
try {
overwriteNetworkDefinition();
- } catch (FileNotFoundException e) {
+ } catch (final FileNotFoundException e) {
ConcurrentLog.logException(e);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
@@ -421,7 +421,7 @@ public final class Switchboard extends serverSwitch {
// initialize the collection schema if it does not yet exist
if (!solrCollectionConfigurationWorkFile.exists()) try {
Files.copy(solrCollectionConfigurationInitFile, solrCollectionConfigurationWorkFile);
- } catch (IOException e) {ConcurrentLog.logException(e);}
+ } catch (final IOException e) {ConcurrentLog.logException(e);}
// lazy definition of schema: do not write empty fields
final boolean solrlazy = getConfigBool(SwitchboardConstants.FEDERATED_SERVICE_SOLR_INDEXING_LAZY, true);
@@ -448,12 +448,12 @@ public final class Switchboard extends serverSwitch {
// activate some fields that are necessary here
solrCollectionConfigurationWork.get(CollectionSchema.images_urlstub_sxt.getSolrFieldName()).setEnable(true);
solrCollectionConfigurationWork.commit();
- } catch (IOException e) {ConcurrentLog.logException(e);}
+ } catch (final IOException e) {ConcurrentLog.logException(e);}
// initialize the webgraph schema if it does not yet exist
if (!solrWebgraphConfigurationWorkFile.exists()) try {
Files.copy(solrWebgraphConfigurationInitFile, solrWebgraphConfigurationWorkFile);
- } catch (IOException e) {ConcurrentLog.logException(e);}
+ } catch (final IOException e) {ConcurrentLog.logException(e);}
// define webgraph schema
try {
@@ -461,7 +461,7 @@ public final class Switchboard extends serverSwitch {
solrWebgraphConfigurationWork = new WebgraphConfiguration(solrWebgraphConfigurationWorkFile, solrlazy);
solrWebgraphConfigurationWork.fill(solrWebgraphConfigurationInit, true);
solrWebgraphConfigurationWork.commit();
- } catch (IOException e) {ConcurrentLog.logException(e);}
+ } catch (final IOException e) {ConcurrentLog.logException(e);}
// define boosts
Ranking.setMinTokenLen(this.getConfigInt(SwitchboardConstants.SEARCH_RANKING_SOLR_DOUBLEDETECTION_MINLENGTH, 3));
@@ -481,13 +481,13 @@ public final class Switchboard extends serverSwitch {
this.index = new Segment(this.log, segmentsPath, solrCollectionConfigurationWork, solrWebgraphConfigurationWork);
if (this.getConfigBool(SwitchboardConstants.CORE_SERVICE_RWI, true)) try {
this.index.connectRWI(wordCacheMaxCount, fileSizeMax);
- } catch (IOException e) {ConcurrentLog.logException(e);}
+ } catch (final IOException e) {ConcurrentLog.logException(e);}
if (this.getConfigBool(SwitchboardConstants.CORE_SERVICE_CITATION, true)) try {
this.index.connectCitation(wordCacheMaxCount, fileSizeMax);
- } catch (IOException e) {ConcurrentLog.logException(e);}
+ } catch (final IOException e) {ConcurrentLog.logException(e);}
if (this.getConfigBool(SwitchboardConstants.CORE_SERVICE_FULLTEXT, true)) {
this.index.connectUrlDb(this.useTailCache, this.exceed134217727);
- try {this.index.fulltext().connectLocalSolr();} catch (IOException e) {ConcurrentLog.logException(e);}
+ try {this.index.fulltext().connectLocalSolr();} catch (final IOException e) {ConcurrentLog.logException(e);}
}
this.index.writeWebgraph(this.getConfigBool(SwitchboardConstants.CORE_SERVICE_WEBGRAPH, false));
@@ -499,7 +499,7 @@ public final class Switchboard extends serverSwitch {
try {
ArrayList<RemoteInstance> instances = RemoteInstance.getShardInstances(solrurls, null, null, 10000);
this.index.fulltext().connectRemoteSolr(instances);
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
}
}
@@ -507,7 +507,7 @@ public final class Switchboard extends serverSwitch {
// for index migration in case of obsolete entries, delete entries now
try {
this.index.fulltext().getDefaultConnector().deleteByQuery("failreason_t:[* TO *]"); // field was renamed to failreason_s
- } catch (IOException e1) {
+ } catch (final IOException e1) {
}
// initialize network database
@@ -534,9 +534,9 @@ public final class Switchboard extends serverSwitch {
this.domainList = new FilterEngine();
this.domainList.loadList(new BufferedReader(r), null);
}
- } catch ( final FileNotFoundException e ) {
+ } catch (final FileNotFoundException e ) {
this.log.severe("CONFIG: domainlist not found: " + e.getMessage());
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
this.log.severe("CONFIG: error while retrieving domainlist: " + e.getMessage());
}
@@ -675,21 +675,21 @@ public final class Switchboard extends serverSwitch {
// starting message board
try {
initMessages();
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
// starting wiki
try {
initWiki();
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
//starting blog
try {
initBlog();
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
@@ -705,7 +705,7 @@ public final class Switchboard extends serverSwitch {
+ " entries"
+ ", "
+ ppRamString(userDbFile.length() / 1024));
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
@@ -719,7 +719,7 @@ public final class Switchboard extends serverSwitch {
if ( l.startsWith("parser.") && l.endsWith(".properties") ) {
try {
Evaluation.add(new File(parserPropertiesPath, l));
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -730,7 +730,7 @@ public final class Switchboard extends serverSwitch {
if ( l.startsWith("parser.") && l.endsWith(".properties") ) {
try {
Evaluation.add(new File(parserPropertiesPath, l));
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -744,7 +744,7 @@ public final class Switchboard extends serverSwitch {
Thread.currentThread().setName("Switchboard.initBookmarks");
try {
initBookmarks();
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
}
}
@@ -788,7 +788,7 @@ public final class Switchboard extends serverSwitch {
this.robots = new RobotsTxt(this.tables, this.loader);
try {
this.log.config("Loaded robots.txt DB: " + this.robots.size() + " entries");
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
@@ -834,13 +834,13 @@ public final class Switchboard extends serverSwitch {
"notifier.gif");
try {
Files.copy(notifierSource, notifierDest);
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
}
// init nameCacheNoCachingList
try {
Domains.setNoCachingPatterns(getConfig(SwitchboardConstants.HTTPC_NAME_CACHE_CACHING_PATTERNS_NO, ""));
- } catch (PatternSyntaxException pse) {
+ } catch (final PatternSyntaxException pse) {
ConcurrentLog.severe("Switchboard", "Invalid regular expression in "
+ SwitchboardConstants.HTTPC_NAME_CACHE_CACHING_PATTERNS_NO
+ " property: " + pse.getMessage());
@@ -1121,7 +1121,7 @@ public final class Switchboard extends serverSwitch {
// finally start jobs which shall be started after start-up
new Thread() {
public void run() {
- try {Thread.sleep(10000);} catch (InterruptedException e) {} // we must wait until the httpd comes up
+ try {Thread.sleep(10000);} catch (final InterruptedException e) {} // we must wait until the httpd comes up
execAPIActions(); // trigger startup actions
}
}.start();
@@ -1190,7 +1190,7 @@ public final class Switchboard extends serverSwitch {
try {
// try to parse url
locationURL = new DigestURI(location);
- } catch ( final MalformedURLException e ) {
+ } catch (final MalformedURLException e ) {
break;
}
PublicKey publicKey = null;
@@ -1203,7 +1203,7 @@ public final class Switchboard extends serverSwitch {
Base64Order.standardCoder.decode(publicKeyString.trim());
publicKey = cryptoLib.getPublicKeyFromBytes(publicKeyBytes);
}
- } catch ( final InvalidKeySpecException e ) {
+ } catch (final InvalidKeySpecException e ) {
ConcurrentLog.logException(e);
}
final yacyUpdateLocation updateLocation = new yacyUpdateLocation(locationURL, publicKey);
@@ -1337,7 +1337,7 @@ public final class Switchboard extends serverSwitch {
try {
ArrayList<RemoteInstance> instances = RemoteInstance.getShardInstances(solrurls, null, null, 10000);
this.index.fulltext().connectRemoteSolr(instances);
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
}
}
@@ -1367,9 +1367,9 @@ public final class Switchboard extends serverSwitch {
this.domainList = new FilterEngine();
this.domainList.loadList(new BufferedReader(r), null);
}
- } catch ( final FileNotFoundException e ) {
+ } catch (final FileNotFoundException e ) {
this.log.severe("CONFIG: domainlist not found: " + e.getMessage());
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
this.log.severe("CONFIG: error while retrieving domainlist: " + e.getMessage());
}
@@ -1740,7 +1740,7 @@ public final class Switchboard extends serverSwitch {
this.tray.remove();
try {
HTTPClient.closeConnectionManager();
- } catch ( final InterruptedException e ) {
+ } catch (final InterruptedException e ) {
ConcurrentLog.logException(e);
}
this.log.config("SWITCHBOARD SHUTDOWN TERMINATED");
@@ -1847,11 +1847,11 @@ public final class Switchboard extends serverSwitch {
baos.close();
if (shallTerminate()) break;
}
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
} finally {
moved = infile.renameTo(outfile);
- if (zis != null) try {zis.close();} catch (IOException e) {}
+ if (zis != null) try {zis.close();} catch (final IOException e) {}
}
return moved;
}
@@ -1861,7 +1861,7 @@ public final class Switchboard extends serverSwitch {
is = new GZIPInputStream(is);
}
processSurrogate(is, infile.getName());
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
} finally {
if (!shallTerminate()) {
@@ -1879,9 +1879,9 @@ public final class Switchboard extends serverSwitch {
if ( gzfile.exists() ) {
FileUtils.deletedelete(outfile);
}
- } catch ( final FileNotFoundException e ) {
+ } catch (final FileNotFoundException e ) {
ConcurrentLog.logException(e);
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
}
}
@@ -1989,7 +1989,7 @@ public final class Switchboard extends serverSwitch {
}
}
- } catch ( final InterruptedException e ) {
+ } catch (final InterruptedException e ) {
return false;
}
return false;
@@ -2102,7 +2102,7 @@ public final class Switchboard extends serverSwitch {
this.crawler.putActive(UTF8.getBytes(selentry.handle()), selentry);
}
}
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
ConcurrentLog.logException(e);
}
@@ -2160,7 +2160,7 @@ public final class Switchboard extends serverSwitch {
+ " entries on stack");
}
this.peers.newsPool.automaticProcess(this.peers);
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
ConcurrentLog.logException(e);
}
if ( getConfigBool("cleanup.deletionProcessedNews", true) ) {
@@ -2240,12 +2240,12 @@ public final class Switchboard extends serverSwitch {
try {
fileIn = new FileInputStream(new File("DATA/SETTINGS/profile.txt"));
profile.load(fileIn);
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
} finally {
if ( fileIn != null ) {
try {
fileIn.close();
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
}
}
}
@@ -2319,7 +2319,7 @@ public final class Switchboard extends serverSwitch {
if (Memory.deadlocks() > 0) Memory.logDeadlocks();
return true;
- } catch ( final InterruptedException e ) {
+ } catch (final InterruptedException e ) {
this.log.info("cleanupJob: Shutdown detected");
return false;
}
@@ -2367,7 +2367,7 @@ public final class Switchboard extends serverSwitch {
sb.tables.update(WorkTables.TABLE_API_NAME, row);
}
}
- } catch (ParseException e) {}
+ } catch (final ParseException e) {}
}
}
} catch (final IOException e) {
@@ -2378,7 +2378,7 @@ public final class Switchboard extends serverSwitch {
row = this.tables.select(WorkTables.TABLE_API_NAME, UTF8.getBytes(pk));
WorkTables.calculateAPIScheduler(row, true); // calculate next update time
this.tables.update(WorkTables.TABLE_API_NAME, row);
- } catch ( final Throwable e ) {
+ } catch (final Throwable e ) {
ConcurrentLog.logException(e);
continue;
}
@@ -2440,9 +2440,9 @@ public final class Switchboard extends serverSwitch {
Document[] documents = null;
try {
documents = parseDocument(in.queueEntry);
- } catch ( final InterruptedException e ) {
+ } catch (final InterruptedException e ) {
documents = null;
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
documents = null;
}
if ( documents == null ) {
@@ -2496,7 +2496,7 @@ public final class Switchboard extends serverSwitch {
if ( documents == null ) {
throw new Parser.Failure("Parser returned null.", response.url());
}
- } catch ( final Parser.Failure e ) {
+ } catch (final Parser.Failure e ) {
this.log.warn("Unable to parse the resource '" + response.url() + "'. " + e.getMessage());
addURLtoErrorDB(
response.url(),
@@ -2566,7 +2566,7 @@ public final class Switchboard extends serverSwitch {
0,
0,
response.size() < 0 ? 0 : response.size()));
- } catch ( final MalformedURLException e ) {
+ } catch (final MalformedURLException e ) {
ConcurrentLog.logException(e);
}
}
@@ -2772,7 +2772,7 @@ public final class Switchboard extends serverSwitch {
rssRow.put("recording_date", new Date());
try {
this.tables.update("rss", rssEntry.getKey().hash(), rssRow);
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
ConcurrentLog.logException(e);
}
}
@@ -2865,10 +2865,10 @@ public final class Switchboard extends serverSwitch {
};
t.start();
stackthreads.add(t);
- try {Thread.sleep(10);} catch (InterruptedException e) {} // to prevent that this fires more than 100 connections pre second!
+ try {Thread.sleep(10);} catch (final InterruptedException e) {} // to prevent that this fires more than 100 connections pre second!
}
long waitingtime = 1 + (30000 / rootURLs.size()); // at most wait only halve an minute to prevent that the crawl start runs into a time-out
- for (Thread t: stackthreads) try {t.join(waitingtime);} catch (InterruptedException e) {}
+ for (Thread t: stackthreads) try {t.join(waitingtime);} catch (final InterruptedException e) {}
}
/**
@@ -2890,7 +2890,7 @@ public final class Switchboard extends serverSwitch {
// we must wait here until the url has actually disappeared
int t = 100;
while (t-- > 0 && this.index.exists(ASCII.String(urlhash))) {
- try {Thread.sleep(100);} catch (InterruptedException e) {}
+ try {Thread.sleep(100);} catch (final InterruptedException e) {}
ConcurrentLog.fine("Switchboard", "STACKURL: waiting for deletion, t=" + t);
if (t == 20) this.index.fulltext().commit(true);
if (t == 50) this.index.fulltext().commit(false);
@@ -2913,7 +2913,7 @@ public final class Switchboard extends serverSwitch {
Document scraper;
try {
scraper = this.loader.loadDocument(url, CacheStrategy.IFFRESH, BlacklistType.CRAWLER, ClientIdentification.minLoadDelay(), ClientIdentification.DEFAULT_TIMEOUT);
- } catch (IOException e) {
+ } catch (final IOException e) {
return "scraper cannot load URL: " + e.getMessage();
}
@@ -2967,9 +2967,9 @@ public final class Switchboard extends serverSwitch {
// TODO: could a non admin user add crawls?
try {
this.tables.bookmarks.createBookmark(this.loader, url, YMarkTables.USER_ADMIN, true, "crawlStart", "/Crawl Start");
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (Failure e) {
+ } catch (final Failure e) {
ConcurrentLog.logException(e);
}
@@ -3049,9 +3049,9 @@ public final class Switchboard extends serverSwitch {
Switchboard.this.log.info("addToIndex fill of url " + urlName + " finished");
}
}
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
Switchboard.this.log.warn("addToIndex: failed loading " + urlName + ": " + e.getMessage());
- } catch ( final Parser.Failure e ) {
+ } catch (final Parser.Failure e ) {
Switchboard.this.log.warn("addToIndex: failed parsing " + urlName + ": " + e.getMessage());
}
}
@@ -3406,7 +3406,7 @@ public final class Switchboard extends serverSwitch {
DigestURI url;
try {
url = new DigestURI(r);
- } catch ( final MalformedURLException e ) {
+ } catch (final MalformedURLException e ) {
ConcurrentLog.logException(e);
return;
}
@@ -3426,7 +3426,7 @@ public final class Switchboard extends serverSwitch {
// add all pages to the index
addAllToIndex(url, links, searchEvent, "site", new String[]{"site"});
}
- } catch ( final Throwable e ) {
+ } catch (final Throwable e ) {
ConcurrentLog.logException(e);
} finally {
searchEvent.oneFeederTerminated();
@@ -3508,7 +3508,7 @@ public final class Switchboard extends serverSwitch {
final DigestURI url;
try {
url = new DigestURI(MultiProtocolURI.unescape(urlString));
- } catch ( final MalformedURLException e1 ) {
+ } catch (final MalformedURLException e1 ) {
ConcurrentLog.warn("heuristicRSS", "url not well-formed: '" + urlString + "'");
return;
}
@@ -3529,7 +3529,7 @@ public final class Switchboard extends serverSwitch {
try {
uri = new DigestURI(message.getLink());
links.put(uri, message.getTitle());
- } catch ( final MalformedURLException e ) {
+ } catch (final MalformedURLException e ) {
}
}
@@ -3541,7 +3541,7 @@ public final class Switchboard extends serverSwitch {
// add all pages to the index
addAllToIndex(null, links, searchEvent, feedName, new String[]{"rss"});
}
- } catch ( final Throwable e ) {
+ } catch (final Throwable e ) {
//Log.logException(e);
} finally {
searchEvent.oneFeederTerminated();
@@ -3690,7 +3690,7 @@ public final class Switchboard extends serverSwitch {
}
}
}
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
Network.log.info("BOOTSTRAP: bad seed from " + seedListFileURL + ": " + e.getMessage());
}
}
@@ -3703,11 +3703,11 @@ public final class Switchboard extends serverSwitch {
+ "h");
}
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
// this is when wget fails, commonly because of timeout
Network.log.info("BOOTSTRAP: failed (1) to load seeds from seed-list URL "
+ seedListFileURL + ": " + e.getMessage());
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
// this is when wget fails; may be because of missing internet connection
Network.log.severe("BOOTSTRAP: failed (2) to load seeds from seed-list URL "
+ seedListFileURL + ": " + e.getMessage(), e);
@@ -3724,7 +3724,7 @@ public final class Switchboard extends serverSwitch {
int port;
try {
port = Integer.parseInt(getConfig("remoteProxyPort", "3128"));
- } catch ( final NumberFormatException e ) {
+ } catch (final NumberFormatException e ) {
port = 3128;
}
diff --git a/source/net/yacy/search/index/DocumentIndex.java b/source/net/yacy/search/index/DocumentIndex.java
index 7fe4458b9..c0dc54eab 100644
--- a/source/net/yacy/search/index/DocumentIndex.java
+++ b/source/net/yacy/search/index/DocumentIndex.java
@@ -55,7 +55,7 @@ public class DocumentIndex extends Segment {
static {
try {
poison = new DigestURI("file://.");
- } catch ( final MalformedURLException e ) {
+ } catch (final MalformedURLException e ) {
}
}
BlockingQueue<DigestURI> queue; // a queue of document ID's
@@ -110,14 +110,14 @@ public class DocumentIndex extends Segment {
}
}
}
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
if ( e.getMessage().indexOf("cannot parse", 0) < 0 ) {
ConcurrentLog.logException(e);
}
DocumentIndex.this.callback.fail(f, e.getMessage());
}
}
- } catch ( final InterruptedException e ) {
+ } catch (final InterruptedException e ) {
}
}
}
@@ -147,12 +147,12 @@ public class DocumentIndex extends Segment {
long length;
try {
length = url.length();
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
length = -1;
}
try {
documents = TextParser.parseSource(url, null, null, length, url.getInputStream(null, -1));
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
throw new IOException("cannot parse " + url.toString() + ": " + e.getMessage());
}
//Document document = Document.mergeDocuments(url, null, documents);
@@ -188,7 +188,7 @@ public class DocumentIndex extends Segment {
if ( !start.isDirectory() ) {
try {
this.queue.put(start);
- } catch ( final InterruptedException e ) {
+ } catch (final InterruptedException e ) {
}
return;
}
@@ -203,11 +203,11 @@ public class DocumentIndex extends Segment {
} else {
try {
this.queue.put(w);
- } catch ( final InterruptedException e ) {
+ } catch (final InterruptedException e ) {
}
}
}
- } catch ( final MalformedURLException e1 ) {
+ } catch (final MalformedURLException e1 ) {
ConcurrentLog.logException(e1);
}
}
@@ -223,14 +223,14 @@ public class DocumentIndex extends Segment {
final Worker element : this.worker ) {
try {
this.queue.put(poison);
- } catch ( final InterruptedException e ) {
+ } catch (final InterruptedException e ) {
}
}
// wait for termination
for ( final Worker element : this.worker ) {
try {
element.join();
- } catch ( final InterruptedException e ) {
+ } catch (final InterruptedException e ) {
}
}
// close the segment
diff --git a/source/net/yacy/search/index/Fulltext.java b/source/net/yacy/search/index/Fulltext.java
index b8e577373..f08d7c689 100644
--- a/source/net/yacy/search/index/Fulltext.java
+++ b/source/net/yacy/search/index/Fulltext.java
@@ -199,7 +199,7 @@ public final class Fulltext {
if (this.solrInstances.getSolr1() == null) return null;
try {
return new RemoteSolrConnector(this.solrInstances.getSolr1());
- } catch (IOException e) {
+ } catch (final IOException e) {
return null;
}
}
@@ -302,7 +302,7 @@ public final class Fulltext {
Date x;
try {
x = (Date) this.getDefaultConnector().getFieldById(urlHash, CollectionSchema.load_date_dt.getSolrFieldName());
- } catch (IOException e) {
+ } catch (final IOException e) {
return null;
}
return x;
@@ -314,14 +314,14 @@ public final class Fulltext {
String x;
try {
x = (String) this.getDefaultConnector().getFieldById(ASCII.String(urlHash), CollectionSchema.sku.getSolrFieldName());
- } catch (IOException e) {
+ } catch (final IOException e) {
return null;
}
if (x == null) return null;
try {
DigestURI uri = new DigestURI(x, urlHash);
return uri;
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
return null;
}
}
@@ -350,7 +350,7 @@ public final class Fulltext {
if (this.urlIndexFile != null) this.urlIndexFile.remove(urlHash); // migration
return new URIMetadataNode(doc, wre, weight);
}
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
@@ -385,7 +385,7 @@ public final class Fulltext {
//if (sdDate == null || (docDate = SchemaConfiguration.getDate(doc, CollectionSchema.last_modified)) == null || sdDate.before(docDate)) {
connector.add(doc);
//}
- } catch (SolrException e) {
+ } catch (final SolrException e) {
throw new IOException(e.getMessage(), e);
}
this.statsDump = null;
@@ -396,7 +396,7 @@ public final class Fulltext {
if (edges == null || edges.size() == 0) return;
try {
this.getWebgraphConnector().add(edges);
- } catch (SolrException e) {
+ } catch (final SolrException e) {
throw new IOException(e.getMessage(), e);
}
this.statsDump = null;
@@ -413,7 +413,7 @@ public final class Fulltext {
if (sd == null || (new URIMetadataNode(sd)).isOlder(entry)) {
putDocument(getDefaultConfiguration().metadata2solr(entry));
}
- } catch (SolrException e) {
+ } catch (final SolrException e) {
throw new IOException(e.getMessage(), e);
}
this.statsDump = null;
@@ -442,8 +442,8 @@ public final class Fulltext {
);
// delete in solr
- try {Fulltext.this.getDefaultConnector().deleteByQuery(collection1Query);} catch (IOException e) {}
- try {Fulltext.this.getWebgraphConnector().deleteByQuery(webgraphQuery);} catch (IOException e) {}
+ try {Fulltext.this.getDefaultConnector().deleteByQuery(collection1Query);} catch (final IOException e) {}
+ try {Fulltext.this.getWebgraphConnector().deleteByQuery(webgraphQuery);} catch (final IOException e) {}
// delete in old metadata structure
if (Fulltext.this.urlIndexFile != null) {
@@ -459,7 +459,7 @@ public final class Fulltext {
// then delete the urls using this list
for (final String h: l) Fulltext.this.urlIndexFile.delete(ASCII.getBytes(h));
- } catch (IOException e) {}
+ } catch (final IOException e) {}
}
// finally remove the line with statistics
@@ -492,8 +492,8 @@ public final class Fulltext {
);
// delete in solr
- try {Fulltext.this.getDefaultConnector().deleteByQuery(collectionQuery);} catch (IOException e) {}
- try {Fulltext.this.getWebgraphConnector().deleteByQuery(webgraphQuery);} catch (IOException e) {}
+ try {Fulltext.this.getDefaultConnector().deleteByQuery(collectionQuery);} catch (final IOException e) {}
+ try {Fulltext.this.getWebgraphConnector().deleteByQuery(webgraphQuery);} catch (final IOException e) {}
// finally remove the line with statistics
if (Fulltext.this.statsDump != null) {
@@ -517,7 +517,7 @@ public final class Fulltext {
*/
public int remove(final String basepath, Date freshdate) {
DigestURI uri;
- try {uri = new DigestURI(basepath);} catch (MalformedURLException e) {return 0;}
+ try {uri = new DigestURI(basepath);} catch (final MalformedURLException e) {return 0;}
final String host = uri.getHost();
final String collectionQuery = CollectionSchema.host_s.getSolrFieldName() + ":\"" + host + "\"" +
((freshdate != null && freshdate.before(new Date())) ? (" AND " + CollectionSchema.load_date_dt.getSolrFieldName() + ":[* TO " + ISO8601Formatter.FORMATTER.format(freshdate) + "]") : "");
@@ -533,7 +533,7 @@ public final class Fulltext {
}
}
if (count.get() > 0) Fulltext.this.commit(true);
- } catch (InterruptedException e) {}
+ } catch (final InterruptedException e) {}
return count.get();
}
@@ -663,13 +663,13 @@ public final class Fulltext {
this.solrInstances.close();
try {
ZIPWriter.zip(storagePath, zipOut);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
} finally {
this.solrInstances = new InstanceMirror();
try {
this.connectLocalSolr();
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -689,13 +689,13 @@ public final class Fulltext {
this.solrInstances.close();
try {
ZIPReader.unzip(solrDumpZipFile, storagePath);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
} finally {
this.solrInstances = new InstanceMirror();
try {
this.connectLocalSolr();
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -722,7 +722,7 @@ public final class Fulltext {
this.solrInstances = new InstanceMirror();
try {
this.connectLocalSolr();
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
diff --git a/source/net/yacy/search/index/ReindexSolrBusyThread.java b/source/net/yacy/search/index/ReindexSolrBusyThread.java
index 0b45ec370..e5d8aa501 100644
--- a/source/net/yacy/search/index/ReindexSolrBusyThread.java
+++ b/source/net/yacy/search/index/ReindexSolrBusyThread.java
@@ -132,7 +132,7 @@ import org.apache.solr.common.SolrInputDocument;
processed++;
}
}
- } catch (IOException ex) {
+ } catch (final IOException ex) {
ConcurrentLog.logException(ex);
} finally {
sem.release();
diff --git a/source/net/yacy/search/index/Segment.java b/source/net/yacy/search/index/Segment.java
index 64f4e6019..387bc5ee8 100644
--- a/source/net/yacy/search/index/Segment.java
+++ b/source/net/yacy/search/index/Segment.java
@@ -234,7 +234,7 @@ public class Segment {
RowHandleSet ignore = new RowHandleSet(URIMetadataRow.rowdef.primaryKeyLength, URIMetadataRow.rowdef.objectOrder, 100); // a set of urlhashes to be ignored. This is generated from all hashes that are seen during recursion to prevent enless loops
RowHandleSet levelhashes = new RowHandleSet(URIMetadataRow.rowdef.primaryKeyLength, URIMetadataRow.rowdef.objectOrder, 1); // all hashes of a clickdepth. The first call contains the target hash only and therefore just one entry
- try {levelhashes.put(searchhash);} catch (SpaceExceededException e) {throw new IOException(e);}
+ try {levelhashes.put(searchhash);} catch (final SpaceExceededException e) {throw new IOException(e);}
int leveldepth = 0; // the recursion depth and therefore the result depth-1. Shall be 0 for the first call
final byte[] hosthash = new byte[6]; // the host of the url to be checked
System.arraycopy(searchhash, 6, hosthash, 0, 6);
@@ -268,8 +268,8 @@ public class Segment {
}
// step to next depth level
- try {checknext.put(u);} catch (SpaceExceededException e) {}
- try {ignore.put(u);} catch (SpaceExceededException e) {}
+ try {checknext.put(u);} catch (final SpaceExceededException e) {}
+ try {ignore.put(u);} catch (final SpaceExceededException e) {}
}
}
leveldepth++;
@@ -295,7 +295,7 @@ public class Segment {
rr = new ReferenceReport(id, acceptSelfReference);
cache.put(id, rr);
return rr;
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
throw new IOException(e.getMessage());
}
@@ -341,7 +341,7 @@ public class Segment {
external++;
}
}
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
}
} else {
@@ -408,7 +408,7 @@ public class Segment {
}
try {
return (int) this.fulltext.getDefaultConnector().getCountByQuery(CollectionSchema.text_t.getSolrFieldName() + ":\"" + word + "\"");
- } catch (Throwable e) {
+ } catch (final Throwable e) {
ConcurrentLog.logException(e);
return 0;
}
@@ -455,7 +455,7 @@ public class Segment {
SolrDocument doc;
try {
doc = docQueue.take();
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
ConcurrentLog.logException(e);
return null;
}
@@ -465,7 +465,7 @@ public class Segment {
DigestURI url;
try {
url = new DigestURI(u, ASCII.getBytes(id));
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
continue;
}
if (urlstub == null || u.startsWith(urlstub)) return url;
@@ -564,7 +564,7 @@ public class Segment {
public void putDocument(final StorageQueueEntry queueEntry) {
try {
this.fulltext().putDocument(queueEntry.queueEntry);
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -640,7 +640,7 @@ public class Segment {
// change unique attribut in content
vector.setField(uniquefield.getSolrFieldName(), false);
}
- } catch (IOException e) {}
+ } catch (final IOException e) {}
}
}
@@ -675,7 +675,7 @@ public class Segment {
} else {
vector.setField(uniquefield.getSolrFieldName(), true);
}
- } catch (IOException e) {}
+ } catch (final IOException e) {}
}
}
}
@@ -693,11 +693,11 @@ public class Segment {
error = null;
this.fulltext.putEdges(vector.getWebgraphDocuments());
break tryloop;
- } catch ( final IOException e ) {
+ } catch (final IOException e ) {
error = "failed to send " + urlNormalform + " to solr: " + e.getMessage();
ConcurrentLog.warn("SOLR", error);
if (i == 10) this.fulltext.commit(false);
- try {Thread.sleep(1000);} catch (InterruptedException e1) {}
+ try {Thread.sleep(1000);} catch (final InterruptedException e1) {}
continue tryloop;
}
}
diff --git a/source/net/yacy/search/query/AccessTracker.java b/source/net/yacy/search/query/AccessTracker.java
index 9d4f4ec91..f299f2cec 100644
--- a/source/net/yacy/search/query/AccessTracker.java
+++ b/source/net/yacy/search/query/AccessTracker.java
@@ -162,7 +162,7 @@ public class AccessTracker {
} catch (final IOException e) {
ConcurrentLog.logException(e);
} finally {
- if (raf != null) try {raf.close();} catch (IOException e) {}
+ if (raf != null) try {raf.close();} catch (final IOException e) {}
}
}
};
diff --git a/source/net/yacy/search/query/QueryGoal.java b/source/net/yacy/search/query/QueryGoal.java
index 1aadc5deb..544efe6a7 100644
--- a/source/net/yacy/search/query/QueryGoal.java
+++ b/source/net/yacy/search/query/QueryGoal.java
@@ -154,7 +154,7 @@ public class QueryGoal {
if (encodeHTML){
try {
ret = URLEncoder.encode(this.query_original, "UTF-8");
- } catch (UnsupportedEncodingException e) {
+ } catch (final UnsupportedEncodingException e) {
ret = this.query_original;
}
} else {
diff --git a/source/net/yacy/search/query/SearchEvent.java b/source/net/yacy/search/query/SearchEvent.java
index 6db0fea4d..77de295ea 100644
--- a/source/net/yacy/search/query/SearchEvent.java
+++ b/source/net/yacy/search/query/SearchEvent.java
@@ -101,7 +101,7 @@ public final class SearchEvent {
static {
try {
noRobinsonLocalRWISearch = GenericFormatter.FORMAT_SHORT_DAY.parse("20121107").getTime();
- } catch (ParseException e) {
+ } catch (final ParseException e) {
}
}
*/
@@ -337,7 +337,7 @@ public final class SearchEvent {
// we need the results now
try {
if (rwiProcess != null && query.getSegment().connectedRWI()) rwiProcess.join();
- } catch ( final Throwable e ) {
+ } catch (final Throwable e ) {
}
// compute index abstracts
final long timer = System.currentTimeMillis();
@@ -370,7 +370,7 @@ public final class SearchEvent {
// before a reading process wants to get results from it
try {
if (rwiProcess != null && query.getSegment().connectedRWI()) rwiProcess.join(100);
- } catch ( final Throwable e ) {
+ } catch (final Throwable e ) {
}
// this will reduce the maximum waiting time until results are available to 100 milliseconds
// while we always get a good set of ranked data
@@ -455,7 +455,7 @@ public final class SearchEvent {
addRWIs(index, true, "local index: " + SearchEvent.this.query.getSegment().getLocation(), index.size(), SearchEvent.this.maxtime);
SearchEvent.this.addFinalize();
}
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
ConcurrentLog.logException(e);
} finally {
oneFeederTerminated();
@@ -573,7 +573,7 @@ public final class SearchEvent {
try {
this.rwiStack.put(new ReverseElement<WordReferenceVars>(iEntry, this.order.cardinal(iEntry))); // inserts the element and removes the worst (which is smallest)
break rankingtryloop;
- } catch ( final ArithmeticException e ) {
+ } catch (final ArithmeticException e ) {
// this may happen if the concurrent normalizer changes values during cardinal computation
if (log.isFine()) log.fine("dropped RWI: arithmetic exception");
continue rankingtryloop;
@@ -584,8 +584,8 @@ public final class SearchEvent {
}
if (System.currentTimeMillis() >= timeout) ConcurrentLog.warn("SearchEvent", "rwi normalization ended with timeout = " + maxtime);
- } catch ( final InterruptedException e ) {
- } catch ( final SpaceExceededException e ) {
+ } catch (final InterruptedException e ) {
+ } catch (final SpaceExceededException e ) {
}
//if ((query.neededResults() > 0) && (container.size() > query.neededResults())) remove(true, true);
@@ -854,7 +854,7 @@ public final class SearchEvent {
long score = iEntry.ranking();
this.nodeStack.put(new ReverseElement<URIMetadataNode>(iEntry, score == 0 ? this.order.cardinal(iEntry) : score)); // inserts the element and removes the worst (which is smallest)
break rankingtryloop;
- } catch ( final ArithmeticException e ) {
+ } catch (final ArithmeticException e ) {
// this may happen if the concurrent normalizer changes values during cardinal computation
continue rankingtryloop;
}
@@ -862,7 +862,7 @@ public final class SearchEvent {
// increase counter for statistics
if (local) this.local_solr_available.incrementAndGet(); else this.remote_solr_available.incrementAndGet();
}
- } catch ( final SpaceExceededException e ) {
+ } catch (final SpaceExceededException e ) {
}
EventTracker.update(EventTracker.EClass.SEARCH, new ProfilingGraph.EventSearch(this.query.id(true), SearchEventType.PRESORT, resourceName, nodeList.size(), System.currentTimeMillis() - timer), false);
}
@@ -1151,10 +1151,10 @@ public final class SearchEvent {
SearchEvent.this.snippetFetchAlive.incrementAndGet();
try {
addResult(getSnippet(node1, SearchEvent.this.query.snippetCacheStrategy));
- } catch (Throwable e) {} finally {
+ } catch (final Throwable e) {} finally {
SearchEvent.this.snippetFetchAlive.decrementAndGet();
}
- } catch (Throwable e) {} finally {
+ } catch (final Throwable e) {} finally {
SearchEvent.this.oneFeederTerminated();
}
}
@@ -1179,11 +1179,11 @@ public final class SearchEvent {
SearchEvent.this.snippetFetchAlive.incrementAndGet();
try {
addResult(getSnippet(node, SearchEvent.this.query.snippetCacheStrategy));
- } catch (Throwable e) {} finally {
+ } catch (final Throwable e) {} finally {
SearchEvent.this.snippetFetchAlive.decrementAndGet();
}
}
- } catch (Throwable e) {} finally {
+ } catch (final Throwable e) {} finally {
SearchEvent.this.oneFeederTerminated();
}
}
@@ -1310,12 +1310,12 @@ public final class SearchEvent {
EventTracker.update(EventTracker.EClass.SEARCH, new ProfilingGraph.EventSearch(this.query.id(true), SearchEventType.ONERESULT, "started, item = " + item + ", available = " + this.getResultCount(), 0, 0), false);
// wait until a local solr is finished, we must do that to be able to check if we need more
- if (this.localsolrsearch != null && this.localsolrsearch.isAlive()) {try {this.localsolrsearch.join(100);} catch (InterruptedException e) {}}
- if (item >= this.localsolroffset && this.local_solr_stored.get() == 0 && this.localsolrsearch.isAlive()) {try {this.localsolrsearch.join();} catch (InterruptedException e) {}}
+ if (this.localsolrsearch != null && this.localsolrsearch.isAlive()) {try {this.localsolrsearch.join(100);} catch (final InterruptedException e) {}}
+ if (item >= this.localsolroffset && this.local_solr_stored.get() == 0 && this.localsolrsearch.isAlive()) {try {this.localsolrsearch.join();} catch (final InterruptedException e) {}}
if (item >= this.localsolroffset && this.local_solr_stored.get() >= item) {
// load remaining solr results now
int nextitems = item - this.localsolroffset + this.query.itemsPerPage; // example: suddenly switch to item 60, just 10 had been shown, 20 loaded.
- if (this.localsolrsearch != null && this.localsolrsearch.isAlive()) {try {this.localsolrsearch.join();} catch (InterruptedException e) {}}
+ if (this.localsolrsearch != null && this.localsolrsearch.isAlive()) {try {this.localsolrsearch.join();} catch (final InterruptedException e) {}}
if (!Switchboard.getSwitchboard().getConfigBool(SwitchboardConstants.DEBUG_SEARCH_LOCAL_SOLR_OFF, false)) {
this.localsolrsearch = RemoteSearch.solrRemoteSearch(this, this.query.solrQuery(this.localsolroffset == 0), this.localsolroffset, nextitems, null /*this peer*/, Switchboard.urlBlacklist);
}
diff --git a/source/net/yacy/search/query/SecondarySearchSuperviser.java b/source/net/yacy/search/query/SecondarySearchSuperviser.java
index a0f465b51..822c43087 100644
--- a/source/net/yacy/search/query/SecondarySearchSuperviser.java
+++ b/source/net/yacy/search/query/SecondarySearchSuperviser.java
@@ -98,7 +98,7 @@ public class SecondarySearchSuperviser extends Thread {
// a trigger was released
prepareSecondarySearch();
}
- } catch ( final InterruptedException e ) {
+ } catch (final InterruptedException e ) {
// the thread was interrupted
// do nothing
}
diff --git a/source/net/yacy/search/schema/CollectionConfiguration.java b/source/net/yacy/search/schema/CollectionConfiguration.java
index afd57ac64..8dd5039c5 100644
--- a/source/net/yacy/search/schema/CollectionConfiguration.java
+++ b/source/net/yacy/search/schema/CollectionConfiguration.java
@@ -112,7 +112,7 @@ public class CollectionConfiguration extends SchemaConfiguration implements Seri
try {
CollectionSchema f = CollectionSchema.valueOf(etr.key());
f.setSolrFieldName(etr.getValue());
- } catch (IllegalArgumentException e) {
+ } catch (final IllegalArgumentException e) {
ConcurrentLog.fine("SolrCollectionWriter", "solr schema file " + configurationFile.getAbsolutePath() + " defines unknown attribute '" + etr.toString() + "'");
it.remove();
}
@@ -154,7 +154,7 @@ public class CollectionConfiguration extends SchemaConfiguration implements Seri
try {
SchemaDeclaration f = CollectionSchema.valueOf(etr.key());
f.setSolrFieldName(etr.getValue());
- } catch (IllegalArgumentException e) {
+ } catch (final IllegalArgumentException e) {
continue;
}
}
@@ -741,7 +741,7 @@ public class CollectionConfiguration extends SchemaConfiguration implements Seri
outboundLinks.remove(refreshURL);
add(doc, CollectionSchema.refresh_s, refreshURL.toNormalform(false));
}
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
add(doc, CollectionSchema.refresh_s, refresh);
}
}
@@ -904,7 +904,7 @@ public class CollectionConfiguration extends SchemaConfiguration implements Seri
crh.log(crn);
ranking.putAll(crn); // accumulate this here for usage in document update later
}
- } catch (IOException e2) {
+ } catch (final IOException e2) {
}
// process all documents
@@ -959,14 +959,14 @@ public class CollectionConfiguration extends SchemaConfiguration implements Seri
//connector.deleteById(ASCII.String(id));
connector.add(sid);
proccount++;
- } catch (Throwable e1) {
+ } catch (final Throwable e1) {
}
}
ConcurrentLog.info("CollectionConfiguration", "cleanup_processing: re-calculated " + proccount+ " new documents, " +
proccount_clickdepthchange + " clickdepth changes, " +
proccount_referencechange + " reference-count changes," +
proccount_citationchange + " citation ranking changes.");
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
}
return proccount;
}
@@ -1010,7 +1010,7 @@ public class CollectionConfiguration extends SchemaConfiguration implements Seri
while ((id = ids.take()) != AbstractSolrConnector.POISON_ID) {
crt.put(ASCII.getBytes(id), new double[]{0.0d,0.0d}); //{old value, new value}
}
- } catch (InterruptedException e2) {
+ } catch (final InterruptedException e2) {
}
this.cr_host_count = crt.size();
double initval = 1.0d / cr_host_count;
@@ -1062,7 +1062,7 @@ public class CollectionConfiguration extends SchemaConfiguration implements Seri
String url = (String) connector.getDocumentById(ASCII.String(entry.getKey()), CollectionSchema.sku.getSolrFieldName()).getFieldValue(CollectionSchema.sku.getSolrFieldName());
ConcurrentLog.info("CollectionConfiguration.CRHost", "CR for " + url);
ConcurrentLog.info("CollectionConfiguration.CRHost", ">> " + entry.getValue().toString());
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -1090,12 +1090,12 @@ public class CollectionConfiguration extends SchemaConfiguration implements Seri
il = (x == null) ? 0 : (x instanceof Integer) ? ((Integer) x).intValue() : (x instanceof Long) ? ((Long) x).intValue() : 0;
this.internal_links_counter.put(id, il);
return il;
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
- } catch (SpaceExceededException e) {
+ } catch (final SpaceExceededException e) {
ConcurrentLog.logException(e);
}
- try {this.internal_links_counter.put(id, 0);} catch (SpaceExceededException e) {}
+ try {this.internal_links_counter.put(id, 0);} catch (final SpaceExceededException e) {}
return 0;
}
/**
@@ -1126,7 +1126,7 @@ public class CollectionConfiguration extends SchemaConfiguration implements Seri
for (Map.Entry<byte[], double[]> entry: crt.entrySet()) {
entry.getValue()[0] = entry.getValue()[1];
}
- } catch (IOException e) {
+ } catch (final IOException e) {
}
return convergence;
}
diff --git a/source/net/yacy/search/schema/WebgraphConfiguration.java b/source/net/yacy/search/schema/WebgraphConfiguration.java
index 47d5f27a9..a4817a892 100644
--- a/source/net/yacy/search/schema/WebgraphConfiguration.java
+++ b/source/net/yacy/search/schema/WebgraphConfiguration.java
@@ -88,7 +88,7 @@ public class WebgraphConfiguration extends SchemaConfiguration implements Serial
try {
WebgraphSchema f = WebgraphSchema.valueOf(etr.key());
f.setSolrFieldName(etr.getValue());
- } catch (IllegalArgumentException e) {
+ } catch (final IllegalArgumentException e) {
ConcurrentLog.fine("SolrWebgraphWriter", "solr schema file " + configurationFile.getAbsolutePath() + " defines unknown attribute '" + etr.toString() + "'");
it.remove();
}
@@ -323,13 +323,13 @@ public class WebgraphConfiguration extends SchemaConfiguration implements Serial
// send back to index
connector.add(sid);
proccount++;
- } catch (Throwable e1) {
+ } catch (final Throwable e1) {
}
}
}
ConcurrentLog.info("WebgraphConfiguration", "cleanup_processing: re-calculated " + proccount + " new documents, " + proccount_clickdepthchange + " clickdepth values changed.");
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
}
return proccount;
}
@@ -363,7 +363,7 @@ public class WebgraphConfiguration extends SchemaConfiguration implements Serial
try {
SchemaDeclaration f = WebgraphSchema.valueOf(etr.key());
f.setSolrFieldName(etr.getValue());
- } catch (IllegalArgumentException e) {
+ } catch (final IllegalArgumentException e) {
continue;
}
}
diff --git a/source/net/yacy/search/snippet/ResultEntry.java b/source/net/yacy/search/snippet/ResultEntry.java
index 672861b94..6c7080750 100644
--- a/source/net/yacy/search/snippet/ResultEntry.java
+++ b/source/net/yacy/search/snippet/ResultEntry.java
@@ -95,7 +95,7 @@ public class ResultEntry implements Comparable<ResultEntry>, Comparator<ResultEn
" " +
urlentry.dc_title()), null).keySet()),
urlentry.hash());
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
indexSegment.fulltext().remove(urlentry.hash()); // clean up
diff --git a/source/net/yacy/search/snippet/TextSnippet.java b/source/net/yacy/search/snippet/TextSnippet.java
index 561f118b2..118d2007c 100644
--- a/source/net/yacy/search/snippet/TextSnippet.java
+++ b/source/net/yacy/search/snippet/TextSnippet.java
@@ -205,7 +205,7 @@ public class TextSnippet implements Comparable<TextSnippet>, Comparator<TextSnip
Response response;
try {
response = loader == null || request == null ? null : loader.load(request, CacheStrategy.CACHEONLY, BlacklistType.SEARCH, snippetMinLoadDelay, 3000);
- } catch (IOException e1) {
+ } catch (final IOException e1) {
response = null;
}
Document document = null;
@@ -259,7 +259,7 @@ public class TextSnippet implements Comparable<TextSnippet>, Comparator<TextSnip
Response response = null;
try {
response = loader == null ? null : loader.load(loader.request(url, true, reindexing), (url.isFile() || url.isSMB()) ? CacheStrategy.NOCACHE : (cacheStrategy == null ? CacheStrategy.CACHEONLY : cacheStrategy), BlacklistType.SEARCH, snippetMinLoadDelay, 3000);
- } catch (IOException e) {
+ } catch (final IOException e) {
response = null;
}
diff --git a/source/net/yacy/server/http/ChunkedInputStream.java b/source/net/yacy/server/http/ChunkedInputStream.java
index 4b4a30d40..961b2bb35 100644
--- a/source/net/yacy/server/http/ChunkedInputStream.java
+++ b/source/net/yacy/server/http/ChunkedInputStream.java
@@ -275,7 +275,7 @@ public class ChunkedInputStream extends InputStream {
int result;
try {
result = Integer.parseInt(dataString.trim(), 16);
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
throw new IOException ("Bad chunk size: " + dataString);
}
return result;
@@ -299,7 +299,7 @@ public class ChunkedInputStream extends InputStream {
try {
return new String(data, 0, data.length, "US-ASCII");
- } catch (UnsupportedEncodingException e) {
+ } catch (final UnsupportedEncodingException e) {
throw new IOException("HttpClient requires ASCII support");
}
}
@@ -383,7 +383,7 @@ public class ChunkedInputStream extends InputStream {
try {
return new String(data, offset, length, charset);
- } catch (UnsupportedEncodingException e) {
+ } catch (final UnsupportedEncodingException e) {
return new String(data, offset, length);
}
}
diff --git a/source/net/yacy/server/http/HTTPDFileHandler.java b/source/net/yacy/server/http/HTTPDFileHandler.java
index 216513104..5e0d05165 100644
--- a/source/net/yacy/server/http/HTTPDFileHandler.java
+++ b/source/net/yacy/server/http/HTTPDFileHandler.java
@@ -1304,10 +1304,10 @@ public final class HTTPDFileHandler {
ret.addAll(Arrays.asList(CommonPattern.SPACE.split(line.substring(2))));
}
ret.add(targetFile.getAbsolutePath());
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
} finally {
- try {br.close();} catch (IOException e) {}
+ try {br.close();} catch (final IOException e) {}
}
return ret;
}
@@ -1385,7 +1385,7 @@ public final class HTTPDFileHandler {
serverSwitch.class };
try {
m = c.getMethod(methodName, params);
- } catch (NoSuchMethodException e) {
+ } catch (final NoSuchMethodException e) {
params = new Class[] {
RequestHeader.class,
serverObjects.class,
@@ -1492,7 +1492,7 @@ public final class HTTPDFileHandler {
try {
proxyurl = new URL(strUrl);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
proxyurl = new URL (URLDecoder.decode(strUrl, UTF8.charset.name()));
}
diff --git a/source/net/yacy/server/http/HTTPDemon.java b/source/net/yacy/server/http/HTTPDemon.java
index 7e6ac9600..9a53ac48c 100644
--- a/source/net/yacy/server/http/HTTPDemon.java
+++ b/source/net/yacy/server/http/HTTPDemon.java
@@ -558,7 +558,7 @@ public final class HTTPDemon implements serverHandler, Cloneable {
} finally {
if (sessionIn != null && (sessionIn instanceof ChunkedInputStream)) {
// read to end, but do not close the stream (maybe HTTP/1.1 persistent)
- try {sessionIn.close();} catch (IOException e) {}
+ try {sessionIn.close();} catch (final IOException e) {}
}
}
return retv;
diff --git a/source/net/yacy/server/serverObjects.java b/source/net/yacy/server/serverObjects.java
index f4a0507c1..6700da916 100644
--- a/source/net/yacy/server/serverObjects.java
+++ b/source/net/yacy/server/serverObjects.java
@@ -170,7 +170,7 @@ public class serverObjects implements Serializable, Cloneable {
if (result == null) return dflt;
try {
return Integer.parseInt(result);
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
return dflt;
}
}
diff --git a/source/net/yacy/server/serverSwitch.java b/source/net/yacy/server/serverSwitch.java
index 2c55fa8a2..8252a8f94 100644
--- a/source/net/yacy/server/serverSwitch.java
+++ b/source/net/yacy/server/serverSwitch.java
@@ -232,7 +232,7 @@ public class serverSwitch
public long getConfigLong(final String key, final long dflt) {
try {
return Long.parseLong(getConfig(key, Long.toString(dflt)));
- } catch ( final NumberFormatException e ) {
+ } catch (final NumberFormatException e ) {
return dflt;
}
}
@@ -247,7 +247,7 @@ public class serverSwitch
public float getConfigFloat(final String key, final float dflt) {
try {
return Float.parseFloat(getConfig(key, Float.toString(dflt)));
- } catch ( final NumberFormatException e ) {
+ } catch (final NumberFormatException e ) {
return dflt;
}
}
@@ -262,7 +262,7 @@ public class serverSwitch
public int getConfigInt(final String key, final int dflt) {
try {
return Integer.parseInt(getConfig(key, Integer.toString(dflt)));
- } catch ( final NumberFormatException e ) {
+ } catch (final NumberFormatException e ) {
return dflt;
}
}
@@ -368,21 +368,21 @@ public class serverSwitch
try {
x = Long.parseLong(getConfig(threadName + "_idlesleep", "novalue"));
newThread.setIdleSleep(x);
- } catch ( final NumberFormatException e ) {
+ } catch (final NumberFormatException e ) {
newThread.setIdleSleep(initialIdleSleep);
setConfig(threadName + "_idlesleep", initialIdleSleep);
}
try {
x = Long.parseLong(getConfig(threadName + "_busysleep", "novalue"));
newThread.setBusySleep(x);
- } catch ( final NumberFormatException e ) {
+ } catch (final NumberFormatException e ) {
newThread.setBusySleep(initialBusySleep);
setConfig(threadName + "_busysleep", initialBusySleep);
}
try {
x = Long.parseLong(getConfig(threadName + "_memprereq", "novalue"));
newThread.setMemPreReqisite(x);
- } catch ( final NumberFormatException e ) {
+ } catch (final NumberFormatException e ) {
newThread.setMemPreReqisite(initialMemoryPreRequisite);
setConfig(threadName + "_memprereq", initialMemoryPreRequisite);
}
@@ -451,14 +451,14 @@ public class serverSwitch
s.setStopped(true);
try {
Thread.sleep(100);
- } catch ( final InterruptedException ex ) {
+ } catch (final InterruptedException ex ) {
}
// try to interrupt session
s.interrupt();
try {
Thread.sleep(100);
- } catch ( final InterruptedException ex ) {
+ } catch (final InterruptedException ex ) {
}
// try to close socket
@@ -470,7 +470,7 @@ public class serverSwitch
if ( s.isAlive() ) {
try {
s.join(500);
- } catch ( final InterruptedException ex ) {
+ } catch (final InterruptedException ex ) {
}
}
}
@@ -603,7 +603,7 @@ public class serverSwitch
f.close();
}
return new InputStreamReader(new BufferedInputStream(new ByteArrayInputStream(data)));
- } catch ( final Exception e ) {
+ } catch (final Exception e ) {
continue;
}
}
diff --git a/source/net/yacy/upnp/Discovery.java b/source/net/yacy/upnp/Discovery.java
index 4259650a6..6635113e1 100644
--- a/source/net/yacy/upnp/Discovery.java
+++ b/source/net/yacy/upnp/Discovery.java
@@ -170,7 +170,7 @@ public class Discovery {
try {
UPNPRootDevice device = new UPNPRootDevice( location, maxAge, firmware, usn, udn );
devices.put( usn, device );
- } catch ( Exception ex ) {
+ } catch (final Exception ex ) {
log.error( "Error occured during upnp root device object creation from location " + location, ex );
}
}
@@ -200,7 +200,7 @@ public class Discovery {
try {
Thread.sleep( timeOut );
- } catch ( InterruptedException ex ) {
+ } catch (final InterruptedException ex ) {
// don't care
}
diff --git a/source/net/yacy/upnp/DiscoveryAdvertisement.java b/source/net/yacy/upnp/DiscoveryAdvertisement.java
index e926fdf98..feeee4572 100644
--- a/source/net/yacy/upnp/DiscoveryAdvertisement.java
+++ b/source/net/yacy/upnp/DiscoveryAdvertisement.java
@@ -211,7 +211,7 @@ public class DiscoveryAdvertisement implements Runnable
// let's wait a few ms
try {
Thread.sleep(2);
- } catch ( InterruptedException ex ) {
+ } catch (final InterruptedException ex ) {
// don t care
}
}
@@ -247,12 +247,12 @@ public class DiscoveryAdvertisement implements Runnable
while ( this.inService ) {
try {
listenBroadCast();
- } catch ( SocketTimeoutException ex ) {
+ } catch (final SocketTimeoutException ex ) {
// ignoring
- } catch ( IOException ioEx ) {
+ } catch (final IOException ioEx ) {
// fail silently
//log.warn("IO Exception during UPNP DiscoveryAdvertisement messages listening thread");
- } catch ( Exception ex ) {
+ } catch (final Exception ex ) {
// fail silently
//log.warn("Fatal Error during UPNP DiscoveryAdvertisement messages listening thread, thread will exit");
this.inService = false;
@@ -265,7 +265,7 @@ public class DiscoveryAdvertisement implements Runnable
try {
this.skt.leaveGroup(InetAddress.getByName(Discovery.SSDP_IP));
this.skt.close();
- } catch ( Exception ex ) {
+ } catch (final Exception ex ) {
// ignoring
}
}
@@ -278,7 +278,7 @@ public class DiscoveryAdvertisement implements Runnable
HttpResponse msg = null;
try {
msg = new HttpResponse(received);
- } catch ( IllegalArgumentException ex ) {
+ } catch (final IllegalArgumentException ex ) {
// crappy http sent
if ( log.isDebugEnabled() ) {
log.debug("Skipping uncompliant HTTP message " + received);
diff --git a/source/net/yacy/upnp/DiscoveryListener.java b/source/net/yacy/upnp/DiscoveryListener.java
index 358a93020..7f213c6e8 100644
--- a/source/net/yacy/upnp/DiscoveryListener.java
+++ b/source/net/yacy/upnp/DiscoveryListener.java
@@ -199,9 +199,9 @@ public void run() {
while ( this.inService ) {
try {
listenBroadCast();
- } catch ( SocketTimeoutException ex ) {
+ } catch (final SocketTimeoutException ex ) {
// ignoring
- } catch ( IOException ioEx ) {
+ } catch (final IOException ioEx ) {
log.error( "IO Exception during UPNP DiscoveryListener messages listening thread" );
} catch( Exception ex ) {
log.error( "Fatal Error during UPNP DiscoveryListener messages listening thread, thread will exit" );
@@ -212,7 +212,7 @@ public void run() {
try {
this.skt.leaveGroup( InetAddress.getByName( Discovery.SSDP_IP ) );
this.skt.close();
- } catch ( Exception ex ) {
+ } catch (final Exception ex ) {
// ignoring
}
}
@@ -225,7 +225,7 @@ public void run() {
HttpResponse msg = null;
try {
msg = new HttpResponse( received );
- } catch (IllegalArgumentException ex ) {
+ } catch (final IllegalArgumentException ex ) {
// crappy http sent
if ( log.isDebugEnabled() ) log.debug( "Skipping uncompliant HTTP message " + received );
return;
diff --git a/source/net/yacy/upnp/JXPathParser.java b/source/net/yacy/upnp/JXPathParser.java
index 213d5df55..d8872fd82 100644
--- a/source/net/yacy/upnp/JXPathParser.java
+++ b/source/net/yacy/upnp/JXPathParser.java
@@ -78,7 +78,7 @@ public class JXPathParser implements XMLParser {
while ( ( readen = in.read( buffer ) ) != -1 ) {
xml.append( new String( buffer, 0, readen ) );
}
- } catch ( IOException ex ) {
+ } catch (final IOException ex ) {
log.error( "IOException occured during XML reception", ex );
return null;
}
diff --git a/source/net/yacy/upnp/ServicesEventing.java b/source/net/yacy/upnp/ServicesEventing.java
index 160012459..186c875a4 100644
--- a/source/net/yacy/upnp/ServicesEventing.java
+++ b/source/net/yacy/upnp/ServicesEventing.java
@@ -315,7 +315,7 @@ public class ServicesEventing implements Runnable {
inService = false;
try {
server.close();
- } catch ( IOException ex ) {
+ } catch (final IOException ex ) {
// should not happen
}
}
@@ -326,7 +326,7 @@ public class ServicesEventing implements Runnable {
if ( !Thread.currentThread().getName().equals( "ServicesEventing daemon" ) ) return;
try {
server = new ServerSocket( daemonPort );
- } catch ( IOException ex ) {
+ } catch (final IOException ex ) {
log.error( "Error during daemon server socket on port " + daemonPort + " creation", ex );
return;
}
@@ -334,7 +334,7 @@ public class ServicesEventing implements Runnable {
try {
Socket skt = server.accept();
new Thread( new RequestProcessor( skt ) ).start();
- } catch ( IOException ioEx ) {
+ } catch (final IOException ioEx ) {
if ( inService ) {
log.error( "IO Exception during UPNP messages listening thread", ioEx );
}
@@ -425,7 +425,7 @@ public class ServicesEventing implements Runnable {
}
}
}
- } catch ( IOException ioEx ) {
+ } catch (final IOException ioEx ) {
log.error( "IO Exception during client processing thread", ioEx );
} catch( Exception ex ) {
log.error( "Unexpected error during client processing thread", ex );
diff --git a/source/net/yacy/upnp/devices/UPNPRootDevice.java b/source/net/yacy/upnp/devices/UPNPRootDevice.java
index aa21b67b3..423639031 100644
--- a/source/net/yacy/upnp/devices/UPNPRootDevice.java
+++ b/source/net/yacy/upnp/devices/UPNPRootDevice.java
@@ -160,9 +160,9 @@ public class UPNPRootDevice extends UPNPDevice {
if ( log.isDebugEnabled() ) log.debug( "device URLBase " + URLBase );
buildURLBase = false;
}
- } catch ( JXPathException ex ) {
+ } catch (final JXPathException ex ) {
// URLBase is not mandatory we assume we use the URL of the device
- } catch ( MalformedURLException malformedEx ) {
+ } catch (final MalformedURLException malformedEx ) {
// crappy urlbase provided
log.warn( "Error occured during device baseURL " + base + " parsing, building it from device default location", malformedEx );
}
@@ -258,12 +258,12 @@ public class UPNPRootDevice extends UPNPDevice {
String base = getNonMandatoryData( deviceCtx, "upnp:manufacturerURL" );
try {
if ( base != null ) device.manufacturerURL = new URL( base );
- } catch ( java.net.MalformedURLException ex ) {
+ } catch (final java.net.MalformedURLException ex ) {
// crappy data provided, keep the field null
}
try {
device.presentationURL = getURL( getNonMandatoryData( deviceCtx, "upnp:presentationURL" ), URLBase );
- } catch ( java.net.MalformedURLException ex ) {
+ } catch (final java.net.MalformedURLException ex ) {
// crappy data provided, keep the field null
}
device.modelDescription = getNonMandatoryData( deviceCtx, "upnp:modelDescription" );
@@ -277,7 +277,7 @@ public class UPNPRootDevice extends UPNPDevice {
if ( tmp != null ) {
try {
device.UPC = Long.parseLong( tmp );
- } catch ( Exception ex ) {
+ } catch (final Exception ex ) {
// non all numeric field provided, non upnp compliant device
}
}
@@ -289,7 +289,7 @@ public class UPNPRootDevice extends UPNPDevice {
Pointer deviceListPtr;
try {
deviceListPtr = deviceCtx.getPointer( "upnp:deviceList" );
- } catch ( JXPathException ex ) {
+ } catch (final JXPathException ex ) {
// no pointers for this device list, this can happen
// if the device has no child devices, simply returning
return;
@@ -325,7 +325,7 @@ public class UPNPRootDevice extends UPNPDevice {
if ( value != null && value.isEmpty() ) {
value = null;
}
- } catch ( JXPathException ex ) {
+ } catch (final JXPathException ex ) {
value = null;
}
return value;
@@ -369,7 +369,7 @@ public class UPNPRootDevice extends UPNPDevice {
Pointer iconListPtr;
try {
iconListPtr = deviceCtx.getPointer( "upnp:iconList" );
- } catch ( JXPathException ex ) {
+ } catch (final JXPathException ex ) {
// no pointers for icons list, this can happen
// simply returning
return;
@@ -405,7 +405,7 @@ public class UPNPRootDevice extends UPNPDevice {
if ( url == null || url.trim().isEmpty() ) return null;
try {
rtrVal = new URL( url );
- } catch ( MalformedURLException malEx ) {
+ } catch (final MalformedURLException malEx ) {
// maybe that the url is relative, we add the baseURL and reparse it
// if relative then we take the device baser url root and add the url
if ( baseURL != null ) {
@@ -445,7 +445,7 @@ public class UPNPRootDevice extends UPNPDevice {
}
in.close();
deviceDefLocData = strBuff.toString();
- } catch ( IOException ioEx ) {
+ } catch (final IOException ioEx ) {
return null;
}
}
diff --git a/source/net/yacy/upnp/impls/InternetGatewayDevice.java b/source/net/yacy/upnp/impls/InternetGatewayDevice.java
index cb97c3780..7806f8e6b 100644
--- a/source/net/yacy/upnp/impls/InternetGatewayDevice.java
+++ b/source/net/yacy/upnp/impls/InternetGatewayDevice.java
@@ -123,9 +123,9 @@ public class InternetGatewayDevice {
ActionResponse resp = msg.getMessage( "GetActiveConnection" ).setInputParameter( "NewActiveConnectionIndex", 0 ).service();
deviceContainer = resp.getOutActionArgumentValue( "NewActiveConnDeviceContainer" );
serviceID = resp.getOutActionArgumentValue( "NewActiveConnectionServiceID" );
- } catch ( IOException ex ) {
+ } catch (final IOException ex ) {
// no response returned
- } catch ( UPNPResponseException respEx ) {
+ } catch (final UPNPResponseException respEx ) {
// should never happen unless the damn thing is bugged
}
if ( deviceContainer != null && deviceContainer.trim().length() > 0 &&
@@ -164,16 +164,16 @@ public class InternetGatewayDevice {
String ipToParse = null;
try {
ipToParse = msg.service().getOutActionArgumentValue( "NewExternalIPAddress" );
- } catch ( UPNPResponseException ex ) {
+ } catch (final UPNPResponseException ex ) {
// ok probably not the IP interface
- } catch ( IOException ex ) {
+ } catch (final IOException ex ) {
// not really normal
//log.warn( "IOException occured during device detection", ex );
}
if ( ipToParse != null && ipToParse.length() > 0 && !ipToParse.equals( "0.0.0.0" ) ) {
try {
return InetAddress.getByName( ipToParse ) != null;
- } catch ( UnknownHostException ex ) {
+ } catch (final UnknownHostException ex ) {
// ok a crappy IP provided, definitly the wrong interface..
}
}
@@ -254,7 +254,7 @@ public class InternetGatewayDevice {
for (UPNPRootDevice device : devices) {
try {
valid.add( new InternetGatewayDevice( device, WANIPConnection, WANPPPConnection ) );
- } catch ( UnsupportedOperationException ex ) {
+ } catch (final UnsupportedOperationException ex ) {
// the device is either not IP or PPP
//if ( log.isDebugEnabled() ) log.debug( "UnsupportedOperationException during discovery " + ex.getMessage() );
}
@@ -299,7 +299,7 @@ public class InternetGatewayDevice {
try {
return msg.service();
- } catch ( UPNPResponseException ex ) {
+ } catch (final UPNPResponseException ex ) {
if ( ex.getDetailErrorCode() == 714 ) {
return null;
}
@@ -331,7 +331,7 @@ public class InternetGatewayDevice {
try {
return msg.service();
- } catch ( UPNPResponseException ex ) {
+ } catch (final UPNPResponseException ex ) {
if ( ex.getDetailErrorCode() == 714 ) {
return null;
}
@@ -385,7 +385,7 @@ public class InternetGatewayDevice {
try {
msg.service();
return true;
- } catch ( UPNPResponseException ex ) {
+ } catch (final UPNPResponseException ex ) {
if ( ex.getDetailErrorCode() == 718 ) {
return false;
}
@@ -414,7 +414,7 @@ public class InternetGatewayDevice {
try {
msg.service();
return true;
- } catch ( UPNPResponseException ex ) {
+ } catch (final UPNPResponseException ex ) {
if ( ex.getDetailErrorCode() == 714 ) {
return false;
}
@@ -435,7 +435,7 @@ public class InternetGatewayDevice {
try {
StateVariableResponse resp = natTableSize.service();
rtrval = new Integer( resp.getStateVariableValue() );
- } catch ( UPNPResponseException ex ) {
+ } catch (final UPNPResponseException ex ) {
// 404 can happen if device do not implement state variables queries
if ( ex.getDetailErrorCode() != 404 ) {
throw ex;
@@ -461,7 +461,7 @@ public class InternetGatewayDevice {
this.getGenericPortMappingEntry( i );
startIndex = i;
break;
- } catch ( UPNPResponseException ex ) {
+ } catch (final UPNPResponseException ex ) {
// some devices return the 402 code
if ( ex.getDetailErrorCode() != 713 && ex.getDetailErrorCode() != 402 ) {
throw ex;
@@ -479,7 +479,7 @@ public class InternetGatewayDevice {
try {
this.getGenericPortMappingEntry( startIndex++ );
size++;
- } catch ( UPNPResponseException ex ) {
+ } catch (final UPNPResponseException ex ) {
if ( ex.getDetailErrorCode() == 713 || ex.getDetailErrorCode() == 402 ) {
/// ok index unknown
break;
diff --git a/source/net/yacy/upnp/messages/ActionMessage.java b/source/net/yacy/upnp/messages/ActionMessage.java
index a8e080584..3c2929671 100644
--- a/source/net/yacy/upnp/messages/ActionMessage.java
+++ b/source/net/yacy/upnp/messages/ActionMessage.java
@@ -151,7 +151,7 @@ public class ActionMessage {
if ( log.isDebugEnabled() ) log.debug( "executing query :\n" + body );
try {
input = conn.getInputStream();
- } catch ( IOException ex ) {
+ } catch (final IOException ex ) {
// java can throw an exception if he error code is 500 or 404 or something else than 200
// but the device sends 500 error message with content that is required
// this content is accessible with the getErrorStream
@@ -171,17 +171,17 @@ public class ActionMessage {
try {
SAXParser parser = saxParFact.newSAXParser();
parser.parse( src, msgParser );
- } catch ( ParserConfigurationException confEx ) {
+ } catch (final ParserConfigurationException confEx ) {
// should never happen
// we throw a runtimeException to notify the env problem
throw new RuntimeException( "ParserConfigurationException during SAX parser creation, please check your env settings:" + confEx.getMessage() );
- } catch ( SAXException saxEx ) {
+ } catch (final SAXException saxEx ) {
// kind of tricky but better than nothing..
upnpEx = new UPNPResponseException( 899, saxEx.getMessage() );
} finally {
try {
input.close();
- } catch ( IOException ex ) {
+ } catch (final IOException ex ) {
// ignore
}
}
@@ -197,7 +197,7 @@ public class ActionMessage {
}
try {
out.close();
- } catch ( IOException ex ) {
+ } catch (final IOException ex ) {
// ignore
}
conn.disconnect();
diff --git a/source/net/yacy/upnp/messages/ActionMessageResponseParser.java b/source/net/yacy/upnp/messages/ActionMessageResponseParser.java
index bec8b2e7e..727e104ac 100644
--- a/source/net/yacy/upnp/messages/ActionMessageResponseParser.java
+++ b/source/net/yacy/upnp/messages/ActionMessageResponseParser.java
@@ -113,7 +113,7 @@ public class ActionMessageResponseParser extends org.xml.sax.helpers.DefaultHand
String code = new String( ch, start, length );
try {
msgEx.detailErrorCode = Integer.parseInt( code );
- } catch ( Throwable ex ) {
+ } catch (final Throwable ex ) {
log.debug( "Error during returned error code " + code + " parsing" );
}
readErrorCode = false;
diff --git a/source/net/yacy/upnp/messages/StateVariableMessage.java b/source/net/yacy/upnp/messages/StateVariableMessage.java
index d77b18aeb..8e144bba8 100644
--- a/source/net/yacy/upnp/messages/StateVariableMessage.java
+++ b/source/net/yacy/upnp/messages/StateVariableMessage.java
@@ -123,7 +123,7 @@ public class StateVariableMessage {
if ( log.isDebugEnabled() ) log.debug( "executing query :\n" + body );
try {
input = conn.getInputStream();
- } catch ( IOException ex ) {
+ } catch (final IOException ex ) {
// java can throw an exception if he error code is 500 or 404 or something else than 200
// but the device sends 500 error message with content that is required
// this content is accessible with the getErrorStream
@@ -143,17 +143,17 @@ public class StateVariableMessage {
try {
SAXParser parser = saxParFact.newSAXParser();
parser.parse( src, msgParser );
- } catch ( ParserConfigurationException confEx ) {
+ } catch (final ParserConfigurationException confEx ) {
// should never happen
// we throw a runtimeException to notify the env problem
throw new RuntimeException( "ParserConfigurationException during SAX parser creation, please check your env settings:" + confEx.getMessage() );
- } catch ( SAXException saxEx ) {
+ } catch (final SAXException saxEx ) {
// kind of tricky but better than nothing..
upnpEx = new UPNPResponseException( 899, saxEx.getMessage() );
} finally {
try {
input.close();
- } catch ( IOException ex ) {
+ } catch (final IOException ex ) {
// ignoring
}
}
@@ -169,7 +169,7 @@ public class StateVariableMessage {
}
try {
out.close();
- } catch ( IOException ex ) {
+ } catch (final IOException ex ) {
// ignore
}
conn.disconnect();
diff --git a/source/net/yacy/upnp/messages/StateVariableResponseParser.java b/source/net/yacy/upnp/messages/StateVariableResponseParser.java
index a9f6654c2..1c5a582bb 100644
--- a/source/net/yacy/upnp/messages/StateVariableResponseParser.java
+++ b/source/net/yacy/upnp/messages/StateVariableResponseParser.java
@@ -108,7 +108,7 @@ public class StateVariableResponseParser extends org.xml.sax.helpers.DefaultHand
String code = new String( ch, start, length );
try {
msgEx.detailErrorCode = Integer.parseInt( code );
- } catch ( Throwable ex ) {
+ } catch (final Throwable ex ) {
log.debug( "Error during returned error code " + code + " parsing" );
}
readErrorCode = false;
diff --git a/source/net/yacy/upnp/services/ISO8601Date.java b/source/net/yacy/upnp/services/ISO8601Date.java
index 65a334b20..45da8b9ca 100644
--- a/source/net/yacy/upnp/services/ISO8601Date.java
+++ b/source/net/yacy/upnp/services/ISO8601Date.java
@@ -69,7 +69,7 @@ public class ISO8601Date {
return true;
}
throw new NumberFormatException("Missing [" + token + "]");
- } catch (NoSuchElementException ex) {
+ } catch (final NoSuchElementException ex) {
return false;
}
}
diff --git a/source/net/yacy/upnp/services/UPNPService.java b/source/net/yacy/upnp/services/UPNPService.java
index 407b2d2c7..ba35ff067 100644
--- a/source/net/yacy/upnp/services/UPNPService.java
+++ b/source/net/yacy/upnp/services/UPNPService.java
@@ -196,7 +196,7 @@ public class UPNPService {
Pointer argumentListPtr = null;
try {
argumentListPtr = actionsListCtx.getPointer( "scpdns:action["+i+"]/scpdns:argumentList" );
- } catch ( JXPathException ex ) {
+ } catch (final JXPathException ex ) {
// there is no arguments list.
}
if ( argumentListPtr != null ) {
@@ -227,7 +227,7 @@ public class UPNPService {
UPNPServiceActions.put( action.getName(), action );
}
parsedSCPD = true;
- } catch ( Throwable t ) {
+ } catch (final Throwable t ) {
throw new RuntimeException( "Error during lazy SCDP file parsing at " + SCPDURL, t );
}
}
@@ -243,7 +243,7 @@ public class UPNPService {
String sendEventsLcl = null;
try {
sendEventsLcl = (String)serviceStateTableCtx.getValue( "scpdns:stateVariable["+i+"]/scpdns:@sendEvents" );
- } catch ( JXPathException defEx ) {
+ } catch (final JXPathException defEx ) {
// sendEvents not provided defaulting according to specs to "yes"
sendEventsLcl = "yes";
}
@@ -253,13 +253,13 @@ public class UPNPService {
srvStateVar.dataType = (String)serviceStateTableCtx.getValue( "scpdns:stateVariable["+i+"]/scpdns:dataType" );
try {
srvStateVar.defaultValue = (String)serviceStateTableCtx.getValue( "scpdns:stateVariable["+i+"]/scpdns:defaultValue" );
- } catch ( JXPathException defEx ) {
+ } catch (final JXPathException defEx ) {
// can happend since default value is not
}
Pointer allowedValuesPtr = null;
try {
allowedValuesPtr = serviceStateTableCtx.getPointer( "scpdns:stateVariable["+i+"]/scpdns:allowedValueList" );
- } catch ( JXPathException ex ) {
+ } catch (final JXPathException ex ) {
// there is no allowed values list.
}
if ( allowedValuesPtr != null ) {
@@ -276,7 +276,7 @@ public class UPNPService {
Pointer allowedValueRangePtr = null;
try {
allowedValueRangePtr = serviceStateTableCtx.getPointer( "scpdns:stateVariable["+i+"]/scpdns:allowedValueRange" );
- } catch ( JXPathException ex ) {
+ } catch (final JXPathException ex ) {
// there is no allowed values list, can happen
}
if ( allowedValueRangePtr != null ) {
@@ -285,7 +285,7 @@ public class UPNPService {
srvStateVar.maximumRangeValue = (String)serviceStateTableCtx.getValue( "scpdns:stateVariable["+i+"]/scpdns:allowedValueRange/scpdns:maximum" );
try {
srvStateVar.stepRangeValue = (String)serviceStateTableCtx.getValue( "scpdns:stateVariable["+i+"]/scpdns:allowedValueRange/scpdns:step" );
- } catch ( JXPathException stepEx ) {
+ } catch (final JXPathException stepEx ) {
// can happend since step is not mandatory
}
}
@@ -323,7 +323,7 @@ public class UPNPService {
}
in.close();
SCPDURLData = strBuff.toString();
- } catch ( IOException ioEx ) {
+ } catch (final IOException ioEx ) {
return null;
}
}
diff --git a/source/net/yacy/utils/CryptoLib.java b/source/net/yacy/utils/CryptoLib.java
index 3c6e72b76..32dbfe648 100644
--- a/source/net/yacy/utils/CryptoLib.java
+++ b/source/net/yacy/utils/CryptoLib.java
@@ -187,17 +187,17 @@ public class CryptoLib {
pubFile.close();
}
- } catch (FileNotFoundException e) {
+ } catch (final FileNotFoundException e) {
System.out.println("File not found: " + e.getMessage());
- } catch (IOException e) {
+ } catch (final IOException e) {
System.out.println("IO-Error: " + e.getMessage());
- } catch (NoSuchAlgorithmException e) {
+ } catch (final NoSuchAlgorithmException e) {
System.out.println("No such Algorithm: " + e.getMessage());
- } catch (InvalidKeySpecException e) {
+ } catch (final InvalidKeySpecException e) {
System.out.println("Key has invalid format: " + e.getMessage());
- } catch (InvalidKeyException e) {
+ } catch (final InvalidKeyException e) {
System.out.println("Invalid Key: " + e.getMessage());
- } catch (SignatureException e) {
+ } catch (final SignatureException e) {
System.out.println("Error while signing: " + e.getMessage());
}
}
diff --git a/source/net/yacy/utils/SignatureOutputStream.java b/source/net/yacy/utils/SignatureOutputStream.java
index fab474cc9..9ab2f1a05 100644
--- a/source/net/yacy/utils/SignatureOutputStream.java
+++ b/source/net/yacy/utils/SignatureOutputStream.java
@@ -60,7 +60,7 @@ public class SignatureOutputStream extends FilterOutputStream {
try {
signature = Signature.getInstance(algorithm);
signature.initVerify(publicKey);
- } catch (InvalidKeyException e) {
+ } catch (final InvalidKeyException e) {
System.out.println("Internal Error at signature:" + e.getMessage());
}
}
@@ -73,7 +73,7 @@ public class SignatureOutputStream extends FilterOutputStream {
public void write(int b) throws IOException {
try {
signature.update((byte)b);
- } catch (SignatureException e) {
+ } catch (final SignatureException e) {
throw new IOException("Signature update failed: "+ e.getMessage());
}
out.write(b);
@@ -83,7 +83,7 @@ public class SignatureOutputStream extends FilterOutputStream {
public void write(byte[] b, int off, int len) throws IOException {
try {
signature.update(b, off, len);
- } catch (SignatureException e) {
+ } catch (final SignatureException e) {
throw new IOException("Signature update failed: "+ e.getMessage());
}
out.write(b, off, len);
diff --git a/source/net/yacy/utils/UPnP.java b/source/net/yacy/utils/UPnP.java
index f7b7df389..7cec5d4e3 100644
--- a/source/net/yacy/utils/UPnP.java
+++ b/source/net/yacy/utils/UPnP.java
@@ -74,7 +74,7 @@ public class UPnP {
if (IGDs == null) IGDs = InternetGatewayDevice.getDevices(discoveryTimeout);
localHostIP = Domains.myPublicLocalIP().getHostAddress();
if (localHostIP.startsWith("127.")) log.warn("found odd local address: " + localHostIP + "; UPnP may fail");
- } catch (IOException e) {
+ } catch (final IOException e) {
init = false;
}
if (IGDs != null) {
@@ -122,7 +122,7 @@ public class UPnP {
mappedPort = port;
}
else log.warn("could not map " + msg);
- } catch (IOException e) {} catch (UPNPResponseException e) { log.severe("mapping error: " + e.getMessage()); }
+ } catch (final IOException e) {} catch (final UPNPResponseException e) { log.severe("mapping error: " + e.getMessage()); }
}
}
}
@@ -138,7 +138,7 @@ public class UPnP {
String msg = "port " + mappedPort + " on device "+ IGD.getIGDRootDevice().getFriendlyName();
if (unmapped) log.info("unmapped " + msg);
else log.warn("could not unmap " + msg);
- } catch (IOException e) {} catch (UPNPResponseException e) { log.severe("unmapping error: " + e.getMessage()); }
+ } catch (final IOException e) {} catch (final UPNPResponseException e) { log.severe("unmapping error: " + e.getMessage()); }
}
mappedPort = 0; // reset mapped port
}
@@ -171,7 +171,7 @@ public class UPnP {
try {
DiscoveryAdvertisement.getInstance().registerEvent(DiscoveryAdvertisement.EVENT_SSDP_ALIVE, devicetype, handler);
// DiscoveryAdvertisement.getInstance().registerEvent(DiscoveryAdvertisement.EVENT_SSDP_BYE_BYE, devicetype, handler);
- } catch (IOException e) {}
+ } catch (final IOException e) {}
}
public static void unregister() {
@@ -188,13 +188,13 @@ public class UPnP {
String errorMsg = null;
try {
newIGD[0] = new InternetGatewayDevice(new UPNPRootDevice(location, maxAge, "", usn, udn));
- } catch (UnsupportedOperationException e) {
+ } catch (final UnsupportedOperationException e) {
error = true;
errorMsg = e.getMessage();
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
error = true;
errorMsg = e.getMessage();
- } catch (IllegalStateException e) {
+ } catch (final IllegalStateException e) {
error = true;
errorMsg = e.getMessage();
}
diff --git a/source/net/yacy/utils/cryptbig.java b/source/net/yacy/utils/cryptbig.java
index 445484ca7..3f356df25 100644
--- a/source/net/yacy/utils/cryptbig.java
+++ b/source/net/yacy/utils/cryptbig.java
@@ -636,7 +636,7 @@ public class cryptbig {
String md5s = "";
try {
md5s = Digest.encodeMD5Hex(new File(s[1]));
- } catch (IOException e) {
+ } catch (final IOException e) {
e.printStackTrace();
}
System.out.println(md5s);
diff --git a/source/net/yacy/utils/tarTools.java b/source/net/yacy/utils/tarTools.java
index 1512a8d86..074440204 100644
--- a/source/net/yacy/utils/tarTools.java
+++ b/source/net/yacy/utils/tarTools.java
@@ -45,7 +45,7 @@ public class tarTools {
if (tarFileName.endsWith(".gz")) {
try {
return new GZIPInputStream(new FileInputStream(new File(tarFileName)));
- } catch (IOException e) {
+ } catch (final IOException e) {
// this might happen if the stream is not in gzip format.
// there may be a 'gz' extension, but it may still be a raw tar file
// this can be caused by 'one too much gzip-content header' that was attached
diff --git a/source/net/yacy/visualization/AnimationGIF.java b/source/net/yacy/visualization/AnimationGIF.java
index ee8750a50..6361bd989 100644
--- a/source/net/yacy/visualization/AnimationGIF.java
+++ b/source/net/yacy/visualization/AnimationGIF.java
@@ -102,13 +102,13 @@ public class AnimationGIF {
setMetadata(imageMetadata2, delayMillis, transparencyColorIndex);
setLoops(imageMetadata2, this.loops);
writer.writeToSequence(new IIOImage(image, null, imageMetadata2), iwp);
- } catch (IIOInvalidTreeException e) {
+ } catch (final IIOInvalidTreeException e) {
throw new IOException(e.getMessage());
}
} else try {
setMetadata(iiom, delayMillis, transparencyColorIndex);
writer.writeToSequence(new IIOImage(image, null, iiom), iwp);
- } catch (IIOInvalidTreeException e) {
+ } catch (final IIOInvalidTreeException e) {
throw new IOException(e.getMessage());
}
this.counter++;
@@ -122,7 +122,7 @@ public class AnimationGIF {
if (ios != null) try {
ios.close();
ios = null;
- } catch (IOException e) {}
+ } catch (final IOException e) {}
if (writer != null) {
writer.dispose();
writer = null;
@@ -207,7 +207,7 @@ public class AnimationGIF {
FileOutputStream fos = new FileOutputStream(new File("/tmp/giftest.gif"));
fos.write(generator.get());
fos.close();
- } catch (IOException e) {
+ } catch (final IOException e) {
e.printStackTrace();
}
}
diff --git a/source/net/yacy/visualization/RasterPlotter.java b/source/net/yacy/visualization/RasterPlotter.java
index ca0545b87..7910b2ced 100644
--- a/source/net/yacy/visualization/RasterPlotter.java
+++ b/source/net/yacy/visualization/RasterPlotter.java
@@ -289,7 +289,7 @@ public class RasterPlotter {
}
setPixel(x, y, c);
}
- } catch (ArrayIndexOutOfBoundsException e) {
+ } catch (final ArrayIndexOutOfBoundsException e) {
this.log.warn(e.getMessage() + ": x = " + x + ", y = " + y);
} // may appear when pixel coordinate is out of bounds
}
@@ -934,7 +934,7 @@ public class RasterPlotter {
baos.flush();
baos.close();
return baos;
- } catch (IOException e) {
+ } catch (final IOException e) {
// should not happen
ConcurrentLog.logException(e);
return null;
@@ -1039,8 +1039,8 @@ public class RasterPlotter {
// open file automatically, works only on Mac OS X
/*
Process p = null;
- try {p = Runtime.getRuntime().exec(new String[] {"/usr/bin/osascript", "-e", "open \"" + args[0] + "\""});} catch (java.io.IOException e) {Log.logException(e);}
- try {p.waitFor();} catch (InterruptedException e) {Log.logException(e);}
+ try {p = Runtime.getRuntime().exec(new String[] {"/usr/bin/osascript", "-e", "open \"" + args[0] + "\""});} catch (final java.io.IOException e) {Log.logException(e);}
+ try {p.waitFor();} catch (final InterruptedException e) {Log.logException(e);}
*/
}
diff --git a/source/net/yacy/yacy.java b/source/net/yacy/yacy.java
index 77dc5d67d..e1d22449d 100644
--- a/source/net/yacy/yacy.java
+++ b/source/net/yacy/yacy.java
@@ -203,7 +203,7 @@ public final class yacy {
ConcurrentLog.severe("STARTUP", "WARNING: YaCy instance was still running; just opening the browser and exit.");
System.exit(0);
}
- } catch (ExecutionException ex) {
+ } catch (final ExecutionException ex) {
ConcurrentLog.info("STARTUP", "INFO: delete old yacy.running file; likely previous YaCy session was not orderly shutdown!");
}
}
@@ -310,7 +310,7 @@ public final class yacy {
if ((s.endsWith(".rdf") || s.endsWith(".nt")) && !s.equals("local.rdf") && !s.endsWith("_triplestore.rdf") && !s.startsWith("private_store_")) {
try {
JenaTripleStore.load(new File(triplestore, s).getAbsolutePath());
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -320,7 +320,7 @@ public final class yacy {
if (local.exists()) {
try {
JenaTripleStore.load(local.getAbsolutePath());
- } catch (IOException e) {
+ } catch (final IOException e) {
ConcurrentLog.logException(e);
}
}
@@ -398,7 +398,7 @@ public final class yacy {
System.gc();
sb.setConfig("memoryFreeAfterInitAGC", MemoryControl.free());
sb.setConfig("memoryTotalAfterInitAGC", MemoryControl.total());
- //} catch (ConcurrentModificationException e) {}
+ //} catch (final ConcurrentModificationException e) {}
// wait for server shutdown
try {
diff --git a/test/de/anomic/document/ParserTest.java b/test/de/anomic/document/ParserTest.java
index f1ef4583f..dd7755f87 100644
--- a/test/de/anomic/document/ParserTest.java
+++ b/test/de/anomic/document/ParserTest.java
@@ -55,7 +55,7 @@ public class ParserTest {
assertThat(doc.dc_creator(), containsString(testFile[3]));
assertThat(doc.dc_description(), containsString(testFile[4]));
}
- } catch (InterruptedException ex) {}
+ } catch (final InterruptedException ex) {}
}
}
@@ -89,7 +89,7 @@ public class ParserTest {
assertThat(doc.dc_creator(), containsString(testFile[3]));
assertThat(doc.dc_description(), containsString(testFile[4]));
}
- } catch (InterruptedException ex) {}
+ } catch (final InterruptedException ex) {}
}
}
@@ -121,7 +121,7 @@ public class ParserTest {
assertThat(doc.dc_creator(), containsString(testFile[3]));
assertThat(doc.dc_description(), containsString(testFile[4]));
}
- } catch (InterruptedException ex) {}
+ } catch (final InterruptedException ex) {}
}
}
@@ -153,7 +153,7 @@ public class ParserTest {
assertThat(doc.dc_creator(), containsString(testFile[3]));
assertThat(doc.dc_description(), containsString(testFile[4]));
}
- } catch (InterruptedException ex) {}
+ } catch (final InterruptedException ex) {}
}
}
}
diff --git a/test/de/anomic/yacy/yacyURLTest.java b/test/de/anomic/yacy/yacyURLTest.java
index 69c924b08..a0439a4e1 100644
--- a/test/de/anomic/yacy/yacyURLTest.java
+++ b/test/de/anomic/yacy/yacyURLTest.java
@@ -33,7 +33,7 @@ public class yacyURLTest extends TestCase {
String resolvedURL="";
try {
resolvedURL = (new MultiProtocolURI(testhost + testStrings[i][0])).toString();
- } catch (MalformedURLException ex) {
+ } catch (final MalformedURLException ex) {
fail ("malformed URL");
}
// test if equal
diff --git a/test/net/yacy/cora/federate/solr/connector/EmbeddedSolrConnectorTest.java b/test/net/yacy/cora/federate/solr/connector/EmbeddedSolrConnectorTest.java
index 123602d13..ce347ee77 100644
--- a/test/net/yacy/cora/federate/solr/connector/EmbeddedSolrConnectorTest.java
+++ b/test/net/yacy/cora/federate/solr/connector/EmbeddedSolrConnectorTest.java
@@ -42,7 +42,7 @@ public class EmbeddedSolrConnectorTest {
// start a server
jetty = startServer("/solr", 8091, solr); // try http://localhost:8091/solr/select?q=*:*
- } catch (IOException ex) {
+ } catch (final IOException ex) {
fail("IOException starting Jetty");
}
}
@@ -52,7 +52,7 @@ public class EmbeddedSolrConnectorTest {
if (jetty != null) {
try {
jetty.stop();
- } catch (Exception ex) {
+ } catch (final Exception ex) {
fail("Exception stopping Jetty");
}
}
@@ -72,9 +72,9 @@ public class EmbeddedSolrConnectorTest {
doc.addField(CollectionSchema.text_t.name(), "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
try {
solr.add(doc);
- } catch (IOException ex) {
+ } catch (final IOException ex) {
fail("IOException adding test document to Solr");
- } catch (SolrException ex) {
+ } catch (final SolrException ex) {
fail("SolrExceptin adding test document to Solr");
}
solr.commit(true);
@@ -85,7 +85,7 @@ public class EmbeddedSolrConnectorTest {
try {
result = solr.getDocumentListByQuery(CollectionSchema.text_t.name() + ":tempor", 0, 10,"");
assertEquals(expResult, result.getNumFound());
- } catch (IOException ex) {
+ } catch (final IOException ex) {
fail("Solr query no result");
}
}
@@ -100,7 +100,7 @@ public class EmbeddedSolrConnectorTest {
try {
InputStream stream = url.openStream();
stream.close();
- } catch (IOException e) {
+ } catch (final IOException e) {
ex = e;
Thread.sleep(200);
continue;
@@ -135,7 +135,7 @@ public class EmbeddedSolrConnectorTest {
try {
server.start();
waitForSolr(context, port);
- } catch (Exception e) {
+ } catch (final Exception e) {
e.printStackTrace();
}
}
@@ -175,10 +175,10 @@ public class EmbeddedSolrConnectorTest {
// try http://127.0.0.1:8091/solr/select?q=ping
try {
Thread.sleep(1000 * 1000);
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
}
solr.close();
- } catch (IOException e) {
+ } catch (final IOException e) {
e.printStackTrace();
}