branch develop updated (4cd2f7d -> 24f863d)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository coselmar. See https://gitlab.nuiton.org/codelutin/coselmar.git from 4cd2f7d change version to 3.0-SNAPSHOT new 24f863d Dude, remember there is document with no file during index refresh The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 24f863d9876fa2a6fb0bb8257eea125260256d56 Author: Yannick Martel <martel@©odelutin.com> Date: Wed May 31 13:39:34 2017 +0200 Dude, remember there is document with no file during index refresh Summary of changes: .../fr/ifremer/coselmar/services/v1/AdminWebService.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository coselmar. See https://gitlab.nuiton.org/codelutin/coselmar.git commit 24f863d9876fa2a6fb0bb8257eea125260256d56 Author: Yannick Martel <martel@©odelutin.com> Date: Wed May 31 13:39:34 2017 +0200 Dude, remember there is document with no file during index refresh --- .../fr/ifremer/coselmar/services/v1/AdminWebService.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/v1/AdminWebService.java b/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/v1/AdminWebService.java index f39ab29..c4ad5f1 100644 --- a/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/v1/AdminWebService.java +++ b/coselmar-rest/src/main/java/fr/ifremer/coselmar/services/v1/AdminWebService.java @@ -80,12 +80,14 @@ public class AdminWebService extends CoselmarWebServiceSupport { List<Document> documents = getDocumentDao().findAll(); for (Document document : documents) { DocumentBean documentBean = BeanEntityConverter.toBean(getPersistenceContext().getTopiaIdFactory(), document); - // Refresh file information - String fileContent = TikaUtils.getFileContent(document.getFilePath()); - documentsIndexationService.indexDocument(documentBean, fileContent); - // Refresh database content - document.setFileContent(fileContent); - getDocumentDao().update(document); + if (document.isWithFile()) { + // Refresh file information + String fileContent = TikaUtils.getFileContent(document.getFilePath()); + documentsIndexationService.indexDocument(documentBean, fileContent); + // Refresh database content + document.setFileContent(fileContent); + getDocumentDao().update(document); + } } commit(); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm