SOLR-6594 Mark old schema APIs as deprecated

This commit is contained in:
Noble Paul 2016-02-09 15:08:41 -08:00
parent b47eeb2bb3
commit 2184a7baf6
3 changed files with 15 additions and 2 deletions

View File

@ -319,6 +319,8 @@ Upgrading from Solr 5.4
* Clearing up stored async collection api responses via REQUESTSTATUS call is now deprecated and would be
removed in 6.0. See SOLR-8648 for more details.
* SOLR-6594: Deprecated the old schema API which will be removed in a later major release
Detailed Change List
----------------------

View File

@ -175,12 +175,18 @@ public abstract class BaseSolrResource extends ServerResource {
// TODO: should status=0 (success?) be left as-is in the response header?
SolrCore.postDecorateResponse(null, solrRequest, solrResponse);
addDeprecatedWarning();
if (log.isInfoEnabled() && solrResponse.getToLog().size() > 0) {
log.info(solrResponse.getToLogAsString(solrCore.getLogId()));
}
}
protected void addDeprecatedWarning(){
solrResponse.add("warn","This API is deprecated");
}
/**
* If there is an exception on the SolrResponse:
* <ul>

View File

@ -432,6 +432,11 @@ public class RestManager {
}
return parsedJson;
}
@Override
protected void addDeprecatedWarning() {
//this is not deprecated
}
} // end ManagedEndpoint class
/**