Open brunoborges opened 3 weeks ago
Some examples:
<application id="service" location="C:\srdev\projects\production\app\target\service.war" name="sync" type="war" context-root="/service" />
public void test() throws Exception { Path resPath = java.nio.file.Paths.get("C:\\Temp\\tempJson.json"); String jsonData = new String(java.nio.file.Files.readAllBytes(resPath), "UTF8"); if (jsonData == null || jsonData.equals("{}")) { jsonData = "{ NoData = true }"; } }
Additionally, the following code did trigger the rule in the previous version, but it shouldn't.
@Component public class ConfirmHandler implements ConfirmCallback { private static final Logger logger = LoggerFactory.getLogger(ConfirmHandler.class); @Autowired private Repository repository; @Autowired private TransactionManager transactionManager; @Override public void confirm(Data data, boolean ack, String cause) { String id= data.getId(); if (ack && id != null) { logger.info("RMQ: DomainEvent [{}] successfully sent.", notificationId); TransactionTemplate transaction = new TransactionTemplate(transactionManager); transaction.execute(action -> { repository.findById(notificationId) .filter(de -> de.getType() == EventType.PUBLISHED) .ifPresent(repository::delete); return null; }); } else { logger.error("Outgoing event [{}], caused by:\n[{}]", id, cause); } } }
Some examples:
Additionally, the following code did trigger the rule in the previous version, but it shouldn't.