Skip to content

Commit

Permalink
added missing @OverRide annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Orbiter committed Mar 28, 2014
1 parent e515dd4 commit 8b44fcf
Show file tree
Hide file tree
Showing 95 changed files with 442 additions and 68 deletions.
2 changes: 0 additions & 2 deletions htroot/Blacklist_p.java
Expand Up @@ -34,8 +34,6 @@
import java.util.Arrays;
import java.util.List;

import org.eclipse.jetty.util.log.Log;

import net.yacy.cora.document.id.Punycode.PunycodeException;
import net.yacy.cora.protocol.HeaderFramework;
import net.yacy.cora.protocol.RequestHeader;
Expand Down
1 change: 1 addition & 0 deletions htroot/HostBrowser.java
Expand Up @@ -591,6 +591,7 @@ public InfoCacheEntry(final Fulltext fulltext, final ReferenceReportCache rrCach
this.references_external = (rc_external == null || rc_external.intValue() <= 0) ? 0 : rc_external.intValue();
this.references_exthosts = (rc_exthosts == null || rc_exthosts.intValue() <= 0) ? 0 : rc_exthosts.intValue();
}
@Override
public String toString() {
StringBuilder sbi = new StringBuilder();
int c = 0;
Expand Down
3 changes: 3 additions & 0 deletions source/net/yacy/cora/date/AbstractFormatter.java
Expand Up @@ -43,8 +43,11 @@ public abstract class AbstractFormatter implements DateFormatter {
protected long last_time;
protected String last_format;

@Override
public abstract Date parse(String s) throws ParseException;
@Override
public abstract String format(final Date date);
@Override
public abstract String format();

}
1 change: 1 addition & 0 deletions source/net/yacy/cora/date/ISO8601Formatter.java
Expand Up @@ -191,6 +191,7 @@ public final String format(final Date date) {
}
return last_format;
}
@Override
public final String format() {
long time = System.currentTimeMillis();
if (Math.abs(time - last_time) < 1000) return last_format;
Expand Down
Expand Up @@ -165,6 +165,7 @@ public String toString() {
}

private static class TokenComparator implements Comparator<Token> {
@Override
public int compare(Token t1, Token t2) {
return t2.cnt - t1.cnt;
}
Expand Down
Expand Up @@ -80,6 +80,7 @@ public boolean isClosed() {
return this.solr == null || this.solr.isClosed();
}

@Override
protected void finalize() throws Throwable {
this.close();
}
Expand Down
Expand Up @@ -158,6 +158,7 @@ public boolean isClosed() {
return this.core == null || this.core.isClosed();
}

@Override
protected void finalize() throws Throwable {
this.close();
}
Expand Down Expand Up @@ -339,6 +340,7 @@ public SolrDocumentList getDocumentListByParams(ModifiableSolrParams params) thr
}
}

@Override
public long getDocumentCountByParams(ModifiableSolrParams params) throws IOException, SolrException {
SolrQueryRequest req = this.request(params);
SolrQueryResponse response = null;
Expand Down Expand Up @@ -382,6 +384,7 @@ public void close() {
this.request = null;
this.response = null;
}
@Override
protected void finalize() throws Throwable {
try {close();} finally {super.finalize();}
}
Expand Down
Expand Up @@ -88,6 +88,7 @@ public void commit(final boolean softCommit) {
* force an explicit merge of segments
* @param maxSegments the maximum number of segments. Set to 1 for maximum optimization
*/
@Override
public void optimize(int maxSegments) {
if (this.server == null) return;
if (getSegmentCount() <= maxSegments) return;
Expand Down Expand Up @@ -321,6 +322,7 @@ public Collection<FieldInfo> getFields() throws SolrServerException {
* get the number of segments.
* @return the number of segments, or 0 if unknown
*/
@Override
public int getSegmentCount() {
if (this.server == null) return 0;
try {
Expand Down
Expand Up @@ -216,6 +216,7 @@ public SolrCore getCore(String name) {
return c;
}

@Override
protected void finalize() throws Throwable {
this.close();
}
Expand Down
27 changes: 27 additions & 0 deletions source/net/yacy/cora/federate/solr/instance/ServerMirror.java
Expand Up @@ -60,6 +60,7 @@ public void connect1(SolrServer solr1) {
* @param docs the collection of documents
* @throws IOException If there is a low-level I/O error.
*/
@Override
public UpdateResponse add(Collection<SolrInputDocument> docs) throws SolrServerException, IOException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.add(docs);
Expand All @@ -74,6 +75,7 @@ public UpdateResponse add(Collection<SolrInputDocument> docs) throws SolrServerE
* @throws IOException If there is a low-level I/O error.
* @since solr 3.5
*/
@Override
public UpdateResponse add(Collection<SolrInputDocument> docs, int commitWithinMs) throws SolrServerException, IOException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.add(docs, commitWithinMs);
Expand All @@ -86,6 +88,7 @@ public UpdateResponse add(Collection<SolrInputDocument> docs, int commitWithinMs
* @param beans the collection of beans
* @throws IOException If there is a low-level I/O error.
*/
@Override
public UpdateResponse addBeans(Collection<?> beans ) throws SolrServerException, IOException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.addBeans(beans);
Expand All @@ -100,6 +103,7 @@ public UpdateResponse addBeans(Collection<?> beans ) throws SolrServerException,
* @throws IOException If there is a low-level I/O error.
* @since solr 3.5
*/
@Override
public UpdateResponse addBeans(Collection<?> beans, int commitWithinMs) throws SolrServerException, IOException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.addBeans(beans, commitWithinMs);
Expand All @@ -112,6 +116,7 @@ public UpdateResponse addBeans(Collection<?> beans, int commitWithinMs) throws S
* @param doc the input document
* @throws IOException If there is a low-level I/O error.
*/
@Override
public UpdateResponse add(SolrInputDocument doc) throws SolrServerException, IOException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.add(doc);
Expand All @@ -126,6 +131,7 @@ public UpdateResponse add(SolrInputDocument doc) throws SolrServerException, IOE
* @throws IOException If there is a low-level I/O error.
* @since solr 3.5
*/
@Override
public UpdateResponse add(SolrInputDocument doc, int commitWithinMs) throws SolrServerException, IOException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.add(doc, commitWithinMs);
Expand All @@ -138,6 +144,7 @@ public UpdateResponse add(SolrInputDocument doc, int commitWithinMs) throws Solr
* @param obj the input bean
* @throws IOException If there is a low-level I/O error.
*/
@Override
public UpdateResponse addBean(Object obj) throws IOException, SolrServerException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.addBean(obj);
Expand All @@ -152,6 +159,7 @@ public UpdateResponse addBean(Object obj) throws IOException, SolrServerExceptio
* @throws IOException If there is a low-level I/O error.
* @since solr 3.5
*/
@Override
public UpdateResponse addBean(Object obj, int commitWithinMs) throws IOException, SolrServerException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.addBean(obj, commitWithinMs);
Expand All @@ -165,6 +173,7 @@ public UpdateResponse addBean(Object obj, int commitWithinMs) throws IOException
* waitFlush=true and waitSearcher=true to be inline with the defaults for plain HTTP access
* @throws IOException If there is a low-level I/O error.
*/
@Override
public UpdateResponse commit() throws SolrServerException, IOException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.commit();
Expand All @@ -180,6 +189,7 @@ public UpdateResponse commit() throws SolrServerException, IOException {
* Note: In most cases it is not required to do explicit optimize
* @throws IOException If there is a low-level I/O error.
*/
@Override
public UpdateResponse optimize() throws SolrServerException, IOException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.optimize();
Expand All @@ -193,6 +203,7 @@ public UpdateResponse optimize() throws SolrServerException, IOException {
* @param waitSearcher block until a new searcher is opened and registered as the main query searcher, making the changes visible
* @throws IOException If there is a low-level I/O error.
*/
@Override
public UpdateResponse commit(boolean waitFlush, boolean waitSearcher) throws SolrServerException, IOException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.commit(waitFlush, waitSearcher);
Expand All @@ -207,6 +218,7 @@ public UpdateResponse commit(boolean waitFlush, boolean waitSearcher) throws Sol
* @param softCommit makes index changes visible while neither fsync-ing index files nor writing a new index descriptor
* @throws IOException If there is a low-level I/O error.
*/
@Override
public UpdateResponse commit( boolean waitFlush, boolean waitSearcher, boolean softCommit ) throws SolrServerException, IOException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.commit(waitFlush, waitSearcher, softCommit);
Expand All @@ -222,6 +234,7 @@ public UpdateResponse commit( boolean waitFlush, boolean waitSearcher, boolean s
* @param waitSearcher block until a new searcher is opened and registered as the main query searcher, making the changes visible
* @throws IOException If there is a low-level I/O error.
*/
@Override
public UpdateResponse optimize(boolean waitFlush, boolean waitSearcher) throws SolrServerException, IOException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.optimize(waitFlush, waitSearcher);
Expand All @@ -238,6 +251,7 @@ public UpdateResponse optimize(boolean waitFlush, boolean waitSearcher) throws S
* @param maxSegments optimizes down to at most this number of segments
* @throws IOException If there is a low-level I/O error.
*/
@Override
public UpdateResponse optimize(boolean waitFlush, boolean waitSearcher, int maxSegments ) throws SolrServerException, IOException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.optimize(waitFlush, waitSearcher, maxSegments);
Expand All @@ -253,6 +267,7 @@ public UpdateResponse optimize(boolean waitFlush, boolean waitSearcher, int maxS
* a commit etc.
* @throws IOException If there is a low-level I/O error.
*/
@Override
public UpdateResponse rollback() throws SolrServerException, IOException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.rollback();
Expand All @@ -265,6 +280,7 @@ public UpdateResponse rollback() throws SolrServerException, IOException {
* @param id the ID of the document to delete
* @throws IOException If there is a low-level I/O error.
*/
@Override
public UpdateResponse deleteById(String id) throws SolrServerException, IOException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.deleteById(id);
Expand All @@ -279,6 +295,7 @@ public UpdateResponse deleteById(String id) throws SolrServerException, IOExcept
* @throws IOException If there is a low-level I/O error.
* @since 3.6
*/
@Override
public UpdateResponse deleteById(String id, int commitWithinMs) throws SolrServerException, IOException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.deleteById(id, commitWithinMs);
Expand All @@ -291,6 +308,7 @@ public UpdateResponse deleteById(String id, int commitWithinMs) throws SolrServe
* @param ids the list of document IDs to delete
* @throws IOException If there is a low-level I/O error.
*/
@Override
public UpdateResponse deleteById(List<String> ids) throws SolrServerException, IOException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.deleteById(ids);
Expand All @@ -305,6 +323,7 @@ public UpdateResponse deleteById(List<String> ids) throws SolrServerException, I
* @throws IOException If there is a low-level I/O error.
* @since 3.6
*/
@Override
public UpdateResponse deleteById(List<String> ids, int commitWithinMs) throws SolrServerException, IOException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.deleteById(ids, commitWithinMs);
Expand All @@ -317,6 +336,7 @@ public UpdateResponse deleteById(List<String> ids, int commitWithinMs) throws So
* @param query the query expressing what documents to delete
* @throws IOException If there is a low-level I/O error.
*/
@Override
public UpdateResponse deleteByQuery(String query) throws SolrServerException, IOException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.deleteByQuery(query);
Expand All @@ -331,6 +351,7 @@ public UpdateResponse deleteByQuery(String query) throws SolrServerException, IO
* @throws IOException If there is a low-level I/O error.
* @since 3.6
*/
@Override
public UpdateResponse deleteByQuery(String query, int commitWithinMs) throws SolrServerException, IOException {
UpdateResponse ur = null;
if (this.solr0 != null) ur = this.solr0.deleteByQuery(query, commitWithinMs);
Expand All @@ -342,6 +363,7 @@ public UpdateResponse deleteByQuery(String query, int commitWithinMs) throws Sol
* Issues a ping request to check if the server is alive
* @throws IOException If there is a low-level I/O error.
*/
@Override
public SolrPingResponse ping() throws SolrServerException, IOException {
if (this.solr0 != null) return this.solr0.ping();
if (this.solr1 != null) return this.solr1.ping();
Expand All @@ -352,6 +374,7 @@ public SolrPingResponse ping() throws SolrServerException, IOException {
* Performs a query to the Solr server
* @param params an object holding all key/value parameters to send along the request
*/
@Override
public QueryResponse query(SolrParams params) throws SolrServerException {
if (this.solr0 != null) return this.solr0.query(params);
if (this.solr1 != null) return this.solr1.query(params);
Expand All @@ -363,6 +386,7 @@ public QueryResponse query(SolrParams params) throws SolrServerException {
* @param params an object holding all key/value parameters to send along the request
* @param method specifies the HTTP method to use for the request, such as GET or POST
*/
@Override
public QueryResponse query(SolrParams params, METHOD method) throws SolrServerException {
if (this.solr0 != null) return this.solr0.query(params, method);
if (this.solr1 != null) return this.solr1.query(params, method);
Expand All @@ -380,6 +404,7 @@ public QueryResponse query(SolrParams params, METHOD method) throws SolrServerEx
*
* @since solr 4.0
*/
@Override
public QueryResponse queryAndStreamResponse( SolrParams params, StreamingResponseCallback callback ) throws SolrServerException, IOException {
if (this.solr0 != null) return this.solr0.queryAndStreamResponse(params, callback);
if (this.solr1 != null) return this.solr1.queryAndStreamResponse(params, callback);
Expand All @@ -389,12 +414,14 @@ public QueryResponse queryAndStreamResponse( SolrParams params, StreamingRespons
/**
* SolrServer implementations need to implement how a request is actually processed
*/
@Override
public NamedList<Object> request( final SolrRequest request ) throws SolrServerException, IOException {
if (this.solr0 != null) return this.solr0.request(request);
if (this.solr1 != null) return this.solr1.request(request);
return null;
}

@Override
public DocumentObjectBinder getBinder() {
if (this.solr0 != null) return this.solr0.getBinder();
if (this.solr1 != null) return this.solr1.getBinder();
Expand Down

0 comments on commit 8b44fcf

Please sign in to comment.