Commit ea55944d13955952a79f50a60392b3e4d3242f73
1 parent
779fef80
Exists in
master
and in
1 other branch
Integrated SEI-BROKER_HM #48 (from Jenkins)
http://ansprsvn01.ans.gov.br/03_ARQUITETURA/projetos/sei-broker/Fontes/branches/branch_homologacao@1793
Showing
3 changed files
with
9 additions
and
4 deletions
Show diff stats
pom.xml
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | <modelVersion>4.0.0</modelVersion> |
5 | 5 | <groupId>br.gov.ans</groupId> |
6 | 6 | <artifactId>sei-broker</artifactId> |
7 | - <version>2.3.1</version> | |
7 | + <version>2.3.2</version> | |
8 | 8 | <packaging>war</packaging> |
9 | 9 | <name>sei-broker</name> |
10 | 10 | <description>Projeto demonstrativo de webservice Rest</description> | ... | ... |
src/main/java/br/gov/ans/integracao/sei/dao/DocumentoDAO.java
... | ... | @@ -192,10 +192,15 @@ public class DocumentoDAO { |
192 | 192 | |
193 | 193 | setQueryParameters(query, parametros); |
194 | 194 | |
195 | - List<Object[]> results = query.getResultList(); | |
196 | - | |
195 | + List<Object[]> results = null; | |
197 | 196 | List<DocumentoResumido> documentos = new ArrayList<DocumentoResumido>(); |
198 | 197 | |
198 | + try{ | |
199 | + results = query.getResultList(); | |
200 | + }catch(NoResultException ex){ | |
201 | + return documentos; | |
202 | + } | |
203 | + | |
199 | 204 | results.stream().forEach((record) -> { |
200 | 205 | DocumentoResumido documento = (DocumentoResumido) record[0]; |
201 | 206 | documentos.add(documento); | ... | ... |
src/main/resources/config.properties