ModeShape/modeshape — pull request #967 by rhauch (2013-10-08 17:00:47+00:00)
Title: MODE-2060 and MODE-2061 Corrected and improved the FileSystemConnector

MODE-2060 Corrected use of extra properties for "jcr:content" nodes in the FileSystemConnector, and added a test to verify the behavior.

MODE-2061 FileSystemConnector now uses 'openssl' if available. The file system connector now automatically tries to use 'openssl' to compute the SHA-1 hash of files. If it is available and it returns the same SHA-1 as streaming for a small test, then it is used for all files larger than the 'largeFileSize' property. Note that forking off a new 'openssl' process for small files is actually more expensive; thus the new 'largeFileSize' property that defaults to 50kB.

The connector will upon initialization attempt to use 'openssl', and if it is not available it will log warning messages that streaming will be used for all SHA-1 computations. Note that 'openssl' must be on the path for the environment in which the ModeShape process is run.