90830: Checkstyle fixes

This commit is contained in:
Kristof De Langhe
2022-04-20 13:50:38 +02:00
parent 80158aadfe
commit 238aead2bd
2 changed files with 6 additions and 4 deletions

View File

@@ -168,10 +168,11 @@ public class SolrServiceImpl implements SearchService, IndexingService {
indexableObjectService.writeDocument(context, indexableObject, solrInputDocument); indexableObjectService.writeDocument(context, indexableObject, solrInputDocument);
} }
protected void update(Context context, IndexFactory indexableObjectService, protected void update(Context context, IndexFactory indexableObjectService, IndexableObject indexableObject,
IndexableObject indexableObject, boolean preDB) throws IOException, SQLException, SolrServerException { boolean preDB) throws IOException, SQLException, SolrServerException {
if (preDB) { if (preDB) {
final SolrInputDocument solrInputDocument = indexableObjectService.buildNewDocument(context, indexableObject); final SolrInputDocument solrInputDocument =
indexableObjectService.buildNewDocument(context, indexableObject);
indexableObjectService.writeDocument(context, indexableObject, solrInputDocument); indexableObjectService.writeDocument(context, indexableObject, solrInputDocument);
} else { } else {
update(context, indexableObjectService, indexableObject); update(context, indexableObjectService, indexableObject);

View File

@@ -172,7 +172,8 @@ public class ItemIndexFactoryImpl extends DSpaceObjectIndexFactoryImpl<Indexable
} }
@Override @Override
public SolrInputDocument buildNewDocument(Context context, IndexableItem indexableItem) throws SQLException, IOException { public SolrInputDocument buildNewDocument(Context context, IndexableItem indexableItem)
throws SQLException, IOException {
SolrInputDocument doc = buildDocument(context, indexableItem); SolrInputDocument doc = buildDocument(context, indexableItem);
doc.addField(STATUS_FIELD, STATUS_FIELD_PREDB); doc.addField(STATUS_FIELD, STATUS_FIELD_PREDB);
return doc; return doc;