Made a method static (Eclipse suggested it), removed unused import, pk=null check does now output a warning in logfile

pull/1/head
Roland 'Quix0r' Haeder 13 years ago committed by Michael Peter Christen
parent 5f983faef9
commit fbb946f913

@ -34,7 +34,6 @@ import javax.imageio.ImageIO;
import net.yacy.cora.protocol.RequestHeader;
import net.yacy.peers.Seed;
import net.yacy.peers.graphics.BannerData;
import net.yacy.peers.graphics.NetworkGraph;
import net.yacy.search.Switchboard;
import net.yacy.search.SwitchboardConstants;
import net.yacy.visualization.RasterPlotter;

@ -690,7 +690,11 @@ public class Table implements Index, Iterable<Row.Entry> {
}
this.file.put(i, p, 0);
byte[] pk = lr.getPrimaryKeyBytes();
if (pk == null) continue;
if (pk == null) {
// Table file might be corrupt
Log.logWarning("TABLE", "Possible corruption found in table " + this.filename() + " detected. i=" + i + ",p=" + p);
continue;
}
this.index.put(pk, i);
break;
}

@ -466,7 +466,7 @@ public class SolrConfiguration extends ConfigurationSet implements Serializable
* @param rel
* @return binary encoded information about rel
*/
private int relEval(final String[] rel) {
private static int relEval(final String[] rel) {
int i = 0;
for (final String s: rel) {
final String s0 = s.toLowerCase().trim();

Loading…
Cancel
Save