removed some warnings

pull/1/head
Michael Peter Christen 10 years ago
parent 783cf6fbc7
commit bee5ee7cce

@ -154,9 +154,8 @@ public class ViewImage {
image = ImageParser.parse(urlString, imgb); image = ImageParser.parse(urlString, imgb);
if (image == null) { if (image == null) {
return null; return null;
} else {
if ((auth && (width == 0 || height == 0) && maxwidth == 0 && maxheight == 0)) return ext == null ? image : new EncodedImage(image, ext, isStatic);
} }
if ((auth && (width == 0 || height == 0) && maxwidth == 0 && maxheight == 0)) return ext == null ? image : new EncodedImage(image, ext, isStatic);
// find original size // find original size
final int h = image.getHeight(null); final int h = image.getHeight(null);
final int w = image.getWidth(null); final int w = image.getWidth(null);

@ -38,7 +38,6 @@ import net.yacy.cora.document.encoding.UTF8;
import net.yacy.cora.document.feed.RSSFeed; import net.yacy.cora.document.feed.RSSFeed;
import net.yacy.cora.document.feed.RSSMessage; import net.yacy.cora.document.feed.RSSMessage;
import net.yacy.cora.document.id.DigestURL; import net.yacy.cora.document.id.DigestURL;
import net.yacy.cora.protocol.ClientIdentification;
import net.yacy.cora.protocol.RequestHeader; import net.yacy.cora.protocol.RequestHeader;
import net.yacy.cora.util.ConcurrentLog; import net.yacy.cora.util.ConcurrentLog;
import net.yacy.cora.util.Html2Image; import net.yacy.cora.util.Html2Image;

@ -87,14 +87,12 @@ abstract public class AbstractFederateSearchConnector implements FederateSearchC
// mandatory to contain a mapping for "sku" or alternatively "cfg_skufieldname" for a conversion to a final url // mandatory to contain a mapping for "sku" or alternatively "cfg_skufieldname" for a conversion to a final url
if (this.localcfg.contains(CollectionSchema.sku) || this.localcfg.contains("_skufieldname")) { if (this.localcfg.contains(CollectionSchema.sku) || this.localcfg.contains("_skufieldname")) {
return true; return true;
} else {
ConcurrentLog.config(this.instancename, "mandatory mapping for sku or _skufieldname missing in " + cfgFileName);
return false;
} }
} else { ConcurrentLog.config(this.instancename, "mandatory mapping for sku or _skufieldname missing in " + cfgFileName);
this.localcfg = null;
return false; return false;
} }
this.localcfg = null;
return false;
} }
/** /**

@ -164,9 +164,8 @@ public class FederateSearchManager {
sdl.addAll(fsc.query(query)); sdl.addAll(fsc.query(query));
} }
return sdl; return sdl;
} else {
return null;
} }
return null;
} }
/** /**

@ -492,9 +492,6 @@ public class CrawlQueues {
// we know a peer which should provide remote crawl entries. load them now. // we know a peer which should provide remote crawl entries. load them now.
final RSSFeed feed = Protocol.queryRemoteCrawlURLs(this.sb.peers, seed, 60, 10000); final RSSFeed feed = Protocol.queryRemoteCrawlURLs(this.sb.peers, seed, 60, 10000);
if (feed == null || feed.isEmpty()) { if (feed == null || feed.isEmpty()) {
// something is wrong with this provider. To prevent that we get not stuck with this peer
// we remove it from the peer list
this.sb.peers.peerActions.peerDeparture(seed, "no results from provided remote crawls");
// try again and ask another peer // try again and ask another peer
return remoteCrawlLoaderJob(); return remoteCrawlLoaderJob();
} }

@ -21,7 +21,6 @@ import net.yacy.cora.document.id.DigestURL;
import net.yacy.cora.protocol.ClientIdentification; import net.yacy.cora.protocol.ClientIdentification;
import net.yacy.cora.protocol.Domains; import net.yacy.cora.protocol.Domains;
import net.yacy.cora.protocol.HeaderFramework; import net.yacy.cora.protocol.HeaderFramework;
import static net.yacy.cora.protocol.HeaderFramework.http1_1;
import net.yacy.cora.protocol.RequestHeader; import net.yacy.cora.protocol.RequestHeader;
import net.yacy.cora.protocol.ResponseHeader; import net.yacy.cora.protocol.ResponseHeader;
import net.yacy.cora.util.ConcurrentLog; import net.yacy.cora.util.ConcurrentLog;

@ -182,9 +182,8 @@ public class AutoSearch extends AbstractBusyThread {
this.lastInitTime = System.currentTimeMillis(); this.lastInitTime = System.currentTimeMillis();
saveasPropFile(); saveasPropFile();
return true; return true;
} else {
return false;
} }
return false;
} }
/** /**
@ -305,9 +304,8 @@ public class AutoSearch extends AbstractBusyThread {
int cnt = currentTargets.size(); int cnt = currentTargets.size();
cnt += querystack.size() * sb.peers.sizeConnected(); cnt += querystack.size() * sb.peers.sizeConnected();
return cnt; return cnt;
} else {
return 0;
} }
return 0;
} }
@Override @Override

@ -27,7 +27,6 @@
package net.yacy.search.snippet; package net.yacy.search.snippet;
import java.io.IOException; import java.io.IOException;
import java.net.MalformedURLException;
import java.util.Comparator; import java.util.Comparator;
import java.util.Date; import java.util.Date;

@ -30,7 +30,6 @@ import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.PrintStream; import java.io.PrintStream;
import java.net.InetAddress;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;

Loading…
Cancel
Save