diff options
author | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-10-03 17:36:36 +0200 |
---|---|---|
committer | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-10-03 17:36:36 +0200 |
commit | e2ab585fc4cfc165dc02ea9142f33dd308979e49 (patch) | |
tree | 5ef74454e3b17dfe966d20dfe594f2259fd2a488 /pdf-over-commons/src/main/java | |
parent | 58db0733866b26411c07b7b17e741663d2f1c438 (diff) | |
download | pdf-over-e2ab585fc4cfc165dc02ea9142f33dd308979e49.tar.gz pdf-over-e2ab585fc4cfc165dc02ea9142f33dd308979e49.tar.bz2 pdf-over-e2ab585fc4cfc165dc02ea9142f33dd308979e49.zip |
start untangling BKU handler from GUI logic
Diffstat (limited to 'pdf-over-commons/src/main/java')
-rw-r--r-- | pdf-over-commons/src/main/java/at/asit/pdfover/commons/Constants.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Constants.java b/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Constants.java index 3c9aced8..9c6d2111 100644 --- a/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Constants.java +++ b/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Constants.java @@ -17,9 +17,12 @@ package at.asit.pdfover.commons; import java.io.File; import java.io.FileInputStream; +import java.net.URI; import java.util.Locale; import java.util.Properties; +import javax.annotation.Nonnull; + import org.eclipse.swt.graphics.Color; import org.eclipse.swt.widgets.Display; import org.slf4j.Logger; @@ -107,7 +110,7 @@ public class Constants { public static final String LOCAL_BKU_URL = "http://127.0.0.1:3495/http-security-layer-request"; /** Default Mobile BKU URL */ - public static final String MOBILE_BKU_URL = "https://www.a-trust.at/mobile/https-security-layer-request/default.aspx"; + public static final URI MOBILE_BKU_URL = URI.create("https://www.a-trust.at/mobile/https-security-layer-request/default.aspx"); /** How far to displace the signature with the arrow keys */ public static final int SIGNATURE_KEYBOARD_POSITIONING_OFFSET = 15; @@ -370,4 +373,10 @@ public class Constants { public static final String LABEL_BTN_IDF = "Button_Identification"; + /** + * for static analysis; mark a given value as definitely, contractually not null + * (try to avoid its use in performance-critical code, grr java) + */ + public static <T> @Nonnull T ISNOTNULL(T value) { assert(value != null); return value; } + } |