Should we use nst > 0 rather than targetStorageTypes.length > 0 (amended) here for clarity?
Should the targetStorageTypes.length > 0 check really be nsi > 0? We could elide it then since it's already captured in the outside if.
This does look redundant since targetStorageIds.length will be either 0 or == targetStorageTypes.length
Finally, I don't understand why we need to add the targeted ID/type for checkAccess. Each DN only needs to validate itself, yea? BTSM#checkAccess indicates this in its javadoc, but it looks like we run through ourselves and the targets each time:
That seems like a good simplification. I think I had assumed the BTI and requested types being checked should be the same (String - String, uint64 - uint64); but I don't see a reason why they have to be. Chris Douglas, what do you think?