summaryrefslogtreecommitdiff
path: root/pdf-over-commons
diff options
context:
space:
mode:
authorJakob Heher <jakob.heher@iaik.tugraz.at>2022-10-03 17:36:36 +0200
committerJakob Heher <jakob.heher@iaik.tugraz.at>2022-10-03 17:36:36 +0200
commite2ab585fc4cfc165dc02ea9142f33dd308979e49 (patch)
tree5ef74454e3b17dfe966d20dfe594f2259fd2a488 /pdf-over-commons
parent58db0733866b26411c07b7b17e741663d2f1c438 (diff)
downloadpdf-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')
-rw-r--r--pdf-over-commons/pom.xml4
-rw-r--r--pdf-over-commons/src/main/java/at/asit/pdfover/commons/Constants.java11
2 files changed, 14 insertions, 1 deletions
diff --git a/pdf-over-commons/pom.xml b/pdf-over-commons/pom.xml
index 58ea1e9f..712a6670 100644
--- a/pdf-over-commons/pom.xml
+++ b/pdf-over-commons/pom.xml
@@ -26,6 +26,10 @@
<groupId>com.drewnoakes</groupId>
<artifactId>metadata-extractor</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ </dependency>
</dependencies>
<build>
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; }
+
}