-
Type: Bug
-
Status: Done
-
Priority: Medium
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 1.17.1
-
Component/s: None
-
Labels:None
If you use an empty Resourcefile (e.g. mymessages.properties) in a non-filebased application, the checksum check fails.
org.appng.api.support.ApplicationResourceHolder public void dumpToCache(ResourceType... types) { ... String proposedChecksum = DigestUtils.sha256Hex(resource.getBytes()); if (!proposedChecksum.equals(resource.getCheckSum())) { throw new IOException( String.format("the checksum for applicationresource#%s (%s) did not match!", resource.getId(), resource.getName())); } ... }
the proposedChecksum is always calculated but it is not calculated in the database for empty files:
org.appng.core.domain.ResourceImpl public void calculateChecksum() { if (getSize() > 0) { setCheckSum(DigestUtils.sha256Hex(getBytes())); } }