opencadc / storage-inventory

Storage Inventory components
GNU Affero General Public License v3.0
2 stars 9 forks source link

storage-adapter API: fix all implementations to reject zero length files #87

Open pdowler opened 4 years ago

pdowler commented 4 years ago

StorageMetadata constructor now checks that contentLength > 0.

StorageAdapter.put() specifies that zero-length files are not allowed ( IllegalArgumentException). Implementations must throw and should auto-cleanup if possible.

pdowler commented 2 years ago

cadc-storage-adapter-test-0.4.1 includes a test for this; currently active adapters pass.