- Timestamp:
- 08/14/19 14:22:44 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/encryption/io/EncryptedExpWriter.java
r1420 r1430 194 194 Function<Item, Boolean> isTagInherited = surrogate -> surrogate.isTagInherited(tag + ""); 195 195 BinaryOperator<Boolean> trueExists = (a, b) -> a || b; 196 boolean surrogatesInherit = surrogateItems.stream().map(isTagInherited).collect(Collectors.reducing(trueExists)). get();196 boolean surrogatesInherit = surrogateItems.stream().map(isTagInherited).collect(Collectors.reducing(trueExists)).orElseGet(() -> false); 197 197 boolean userHasKey = Label.getLabel(toWrite.getEncryptionLabel()) == LabelResult.SuccessResolveLabelToKey; 198 198 199 // If we have no surrogates that inherit this property from us, and we have the label required to encrypt it, then we should en tryit.199 // If we have no surrogates that inherit this property from us, and we have the label required to encrypt it, then we should encrypt it. 200 200 if (!surrogatesInherit && userHasKey) { 201 201 EncryptionDetail reencryptOnSave = new EncryptionDetail(EncryptionDetail.Type.ReencryptOnSave);
Note:
See TracChangeset
for help on using the changeset viewer.