Skip to content

Commit 70fb01c

Browse files
added jetbrains annotations
1 parent de302ae commit 70fb01c

File tree

5 files changed

+25
-0
lines changed

5 files changed

+25
-0
lines changed

pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@
3737
</license>
3838
</licenses>
3939

40+
<dependencies>
41+
<dependency>
42+
<groupId>org.jetbrains</groupId>
43+
<artifactId>annotations</artifactId>
44+
<version>23.0.0</version>
45+
<scope>provided</scope>
46+
</dependency>
47+
</dependencies>
48+
4049
<build>
4150
<plugins>
4251
<plugin>

src/main/java/module-info.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77

88
module org.cryptomator.integrations.api {
9+
requires static org.jetbrains.annotations;
10+
911
exports org.cryptomator.integrations.autostart;
1012
exports org.cryptomator.integrations.keychain;
1113
exports org.cryptomator.integrations.tray;

src/main/java/org/cryptomator/integrations/autostart/AutoStartProvider.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.cryptomator.integrations.autostart;
22

33
import org.cryptomator.integrations.common.IntegrationsLoader;
4+
import org.jetbrains.annotations.Blocking;
45

56
import java.util.Optional;
67

@@ -16,8 +17,10 @@ static Optional<AutoStartProvider> get() {
1617
return IntegrationsLoader.load(AutoStartProvider.class);
1718
}
1819

20+
@Blocking
1921
void enable() throws ToggleAutoStartFailedException;
2022

23+
@Blocking
2124
void disable() throws ToggleAutoStartFailedException;
2225

2326
boolean isEnabled();

src/main/java/org/cryptomator/integrations/keychain/KeychainAccessProvider.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package org.cryptomator.integrations.keychain;
22

33
import org.cryptomator.integrations.common.IntegrationsLoader;
4+
import org.jetbrains.annotations.ApiStatus;
5+
import org.jetbrains.annotations.Blocking;
6+
import org.jetbrains.annotations.Nls;
47

58
import java.util.stream.Stream;
69

@@ -24,6 +27,7 @@ static Stream<KeychainAccessProvider> get() {
2427
*
2528
* @return user-friendly name (must not be null or empty)
2629
*/
30+
@Nls(capitalization = Nls.Capitalization.Title)
2731
String displayName();
2832

2933
/**
@@ -35,6 +39,7 @@ static Stream<KeychainAccessProvider> get() {
3539
* @deprecated Please use {@link #storePassphrase(String, String, CharSequence)} instead
3640
*/
3741
@Deprecated
42+
@ApiStatus.ScheduledForRemoval(inVersion = "1.2.0")
3843
void storePassphrase(String key, CharSequence passphrase) throws KeychainAccessException;
3944

4045
/**
@@ -47,6 +52,7 @@ static Stream<KeychainAccessProvider> get() {
4752
* @param passphrase The secret to store in this keychain.
4853
* @throws KeychainAccessException If storing the password failed
4954
*/
55+
@Blocking
5056
default void storePassphrase(String key, String displayName, CharSequence passphrase) throws KeychainAccessException {
5157
storePassphrase(key, passphrase);
5258
}
@@ -56,6 +62,7 @@ default void storePassphrase(String key, String displayName, CharSequence passph
5662
* @return The stored passphrase for the given key or <code>null</code> if no value for the given key could be found.
5763
* @throws KeychainAccessException If loading the password failed
5864
*/
65+
@Blocking
5966
char[] loadPassphrase(String key) throws KeychainAccessException;
6067

6168
/**
@@ -75,6 +82,7 @@ default void storePassphrase(String key, String displayName, CharSequence passph
7582
* @deprecated Please use {@link #changePassphrase(String, String, CharSequence)} instead
7683
*/
7784
@Deprecated
85+
@ApiStatus.ScheduledForRemoval(inVersion = "1.2.0")
7886
void changePassphrase(String key, CharSequence passphrase) throws KeychainAccessException;
7987

8088
/**
@@ -87,6 +95,7 @@ default void storePassphrase(String key, String displayName, CharSequence passph
8795
* @param passphrase The secret to be updated in this keychain.
8896
* @throws KeychainAccessException If changing the password failed
8997
*/
98+
@Blocking
9099
default void changePassphrase(String key, String displayName, CharSequence passphrase) throws KeychainAccessException {
91100
changePassphrase(key, passphrase);
92101
}

src/main/java/org/cryptomator/integrations/tray/TrayMenuController.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.cryptomator.integrations.tray;
22

33
import org.cryptomator.integrations.common.IntegrationsLoader;
4+
import org.jetbrains.annotations.ApiStatus;
45

56
import java.io.IOException;
67
import java.io.InputStream;
@@ -12,6 +13,7 @@
1213
*
1314
* @since 1.1.0
1415
*/
16+
@ApiStatus.Experimental
1517
public interface TrayMenuController {
1618

1719
static Optional<TrayMenuController> get() {

0 commit comments

Comments
 (0)