Calling FileSystems.newFileSystem(URI, ...) throws a
FileSystemAlreadyExistsException if a ZipFileSystem for this
URI is already created. We still can use a single instance
of ZipFileSystem by calling FileSystems.getFileSystem. In
this case we use reference counting to determine when this
instance can be safely closed.
But we cannot count references if the same ZipFileSystem is used
from different class loaders. This patch fixes this issue by
creating a file system from Path instead of an URI. Contract of
FileSystemProvider.newFileSystem(Path, ...) doesn't imply throwing
FileSystemAlreadyExistsException.
Issue #KT-37443 fixed
Build systems like bazel rely on the output of a compilation being
deterministic. File checksums determine when an artifact is safe to
cache across builds. One can produce a klib deterministically by using a
fixed timestamp during klib compression.
Before this change:
```
$ kotlinc-native -produce library -output /tmp/first/color.klib Color.kt
$ kotlinc-native -produce library -output /tmp/second/color.klib Color.kt
$ shasum /tmp/first/color.klib /tmp/second/color.klib
bc3f73678ff025cfbec9009f9a851a8ca74e1037 /tmp/first/color.klib
65aa37886fbd53285f2e449a4dab6a2ad02732e6 /tmp/second/color.klib
```
After this change:
```
$ kotlinc-native -produce library -output /tmp/first/color.klib Color.kt
$ kotlinc-native -produce library -output /tmp/second/color.klib Color.kt
$ shasum /tmp/first/color.klib /tmp/second/color.klib
fcba304493916ae34d372188991f87b60a113cf3 /tmp/first/color.klib
fcba304493916ae34d372188991f87b60a113cf3 /tmp/second/color.klib
```
1. If property is absent, or contains empty string or a string consisting only of whitespace characters, Properties.propertyList() should always return empty List<String>.
2. If property starts or ends with whitespace characters, Properties.propertyList() should not include empty-string values for whitespace prefix or suffix.