Skip to content

Commit 9c0df88

Browse files
committed
do not expose CryptoPaths in API surface to prevent errors in consumer libs
1 parent 60c6df5 commit 9c0df88

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/main/java/org/cryptomator/cryptofs/event/BrokenFileNodeEvent.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
* Emitted, if a path within the cryptographic filesystem is accessed, but the directory representing it is missing identification files.
88
*
99
* @param timestamp timestamp of event appearance
10-
* @param cleartextPath path within the cryptographic filesystem
10+
* @param cleartextPath path (string) within the cryptographic filesystem
1111
* @param ciphertextPath path of the incomplete, encrypted directory
1212
* @see org.cryptomator.cryptofs.health.type.UnknownType
1313
*/
14-
public record BrokenFileNodeEvent(Instant timestamp, Path cleartextPath, Path ciphertextPath) implements FilesystemEvent {
14+
public record BrokenFileNodeEvent(Instant timestamp, String cleartextPath, Path ciphertextPath) implements FilesystemEvent {
1515

1616
public BrokenFileNodeEvent(Path cleartextPath, Path ciphertextPath) {
17-
this(Instant.now(), cleartextPath, ciphertextPath);
17+
this(Instant.now(), cleartextPath.toString(), ciphertextPath);
1818
}
1919

2020
@Override

src/main/java/org/cryptomator/cryptofs/event/ConflictResolutionFailedEvent.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
* Emitted, if the conflict resolution inside an encrypted directory failed
88
*
99
* @param timestamp timestamp of event appearance
10-
* @param canonicalCleartextPath path of the canonical file within the cryptographic filesystem
10+
* @param canonicalCleartextPath path (string) of the canonical file within the cryptographic filesystem
1111
* @param conflictingCiphertextPath path of the encrypted, conflicting file
1212
* @param reason exception, why the resolution failed
1313
*/
14-
public record ConflictResolutionFailedEvent(Instant timestamp, Path canonicalCleartextPath, Path conflictingCiphertextPath, Exception reason) implements FilesystemEvent {
14+
public record ConflictResolutionFailedEvent(Instant timestamp, String canonicalCleartextPath, Path conflictingCiphertextPath, Exception reason) implements FilesystemEvent {
1515

1616
public ConflictResolutionFailedEvent(Path canonicalCleartextPath, Path conflictingCiphertextPath, Exception reason) {
17-
this(Instant.now(), canonicalCleartextPath, conflictingCiphertextPath, reason);
17+
this(Instant.now(), canonicalCleartextPath.toString(), conflictingCiphertextPath, reason);
1818
}
1919

2020
@Override

src/main/java/org/cryptomator/cryptofs/event/ConflictResolvedEvent.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
* On successful conflict resolution the conflicting file is renamed to the <b>resolved</b> file
1313
*
1414
* @param timestamp timestamp of event appearance
15-
* @param canonicalCleartextPath path of the canonical file within the cryptographic filesystem
15+
* @param canonicalCleartextPath path (string) of the canonical file within the cryptographic filesystem
1616
* @param conflictingCiphertextPath path of the encrypted, conflicting file
17-
* @param resolvedCleartextPath path of the resolved file within the cryptographic filesystem
17+
* @param resolvedCleartextPath path (string) of the resolved file within the cryptographic filesystem
1818
* @param resolvedCiphertextPath path of the resolved, encrypted file
1919
*/
20-
public record ConflictResolvedEvent(Instant timestamp, Path canonicalCleartextPath, Path conflictingCiphertextPath, Path resolvedCleartextPath, Path resolvedCiphertextPath) implements FilesystemEvent {
20+
public record ConflictResolvedEvent(Instant timestamp, String canonicalCleartextPath, Path conflictingCiphertextPath, String resolvedCleartextPath, Path resolvedCiphertextPath) implements FilesystemEvent {
2121

2222
public ConflictResolvedEvent(Path canonicalCleartextPath, Path conflictingCiphertextPath, Path resolvedCleartextPath, Path resolvedCiphertextPath) {
23-
this(Instant.now(), canonicalCleartextPath, conflictingCiphertextPath, resolvedCleartextPath, resolvedCiphertextPath);
23+
this(Instant.now(), canonicalCleartextPath.toString(), conflictingCiphertextPath, resolvedCleartextPath.toString(), resolvedCiphertextPath);
2424
}
2525

2626
@Override

0 commit comments

Comments
 (0)