summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src
diff options
context:
space:
mode:
authorJakob Heher <jakob.heher@iaik.tugraz.at>2022-07-06 12:52:15 +0200
committerJakob Heher <jakob.heher@iaik.tugraz.at>2022-07-06 12:52:15 +0200
commit82c045d786ef4a0728c1e89fb365afda81aef303 (patch)
treeb6396536f273986777862c88ff15124f9d8a84ee /pdf-over-gui/src
parentf4c665e207973856578c2ad75de4df39b7bca641 (diff)
downloadpdf-over-82c045d786ef4a0728c1e89fb365afda81aef303.tar.gz
pdf-over-82c045d786ef4a0728c1e89fb365afda81aef303.tar.bz2
pdf-over-82c045d786ef4a0728c1e89fb365afda81aef303.zip
remove leftover empty comments after e4767bccc7324d4b61a334bf6c0558d0080045e2
Diffstat (limited to 'pdf-over-gui/src')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java58
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/BKUHelper.java14
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/LocalBKUConnector.java24
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java32
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java186
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKHandler.java140
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKStatus.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHandler.java50
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHelper.java54
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/SimpleXMLTrustManager.java24
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/TrustedSocketFactory.java28
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/AutomaticPositioningArgument.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java12
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreAliasArgument.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreFileArgument.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreKeyPassArgument.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreStorePassArgument.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreTypeArgument.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java10
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPassArgument.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyUserArgument.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/SkipFinishArgument.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java12
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java36
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java22
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java26
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java48
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUFingerprintComposite.java28
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUQRComposite.java30
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java64
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java18
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java14
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java144
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java88
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java40
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/InputDialog.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ATrustConnectionException.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/CantLoadKeystoreException.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasDoesntExistException.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasNoKeyException.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreDoesntExistException.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreKeyPasswordException.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderDoesntExistException.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooLongException.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooShortException.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/osx/CocoaUIEnhancer.java84
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/FileUploadSource.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SignaturePlaceholderCache.java44
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/VersionComparator.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Zipper.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java16
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StatusImpl.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java40
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/KSState.java16
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java26
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java24
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java16
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java12
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java92
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java34
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java4
83 files changed, 921 insertions, 921 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
index 0ed31443..e603cd5b 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
@@ -63,18 +63,18 @@ public class Main {
StateMachineImpl stateMachine = new StateMachineImpl(args);
- log.debug("Starting stateMachine ..."); //
+ log.debug("Starting stateMachine ...");
stateMachine.start();
- log.debug("Ended stateMachine ..."); //
+ log.debug("Ended stateMachine ...");
}
catch (Throwable e) {
- log.error("Unhandled error", e); //
+ log.error("Unhandled error", e);
JOptionPane.showMessageDialog(null,
- "Error occured " + e.getMessage(), //
+ "Error occured " + e.getMessage(),
null, JOptionPane.ERROR_MESSAGE);
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
index 5c3df2df..3576d8b9 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
@@ -132,7 +132,7 @@ public class MainWindow {
*/
public void setTopControl(Control ctrl) {
if(ctrl != null)
- log.debug("Top control: " + ctrl.toString()); //
+ log.debug("Top control: " + ctrl.toString());
this.stack.topControl = ctrl;
this.doLayout();
}
@@ -178,19 +178,19 @@ public class MainWindow {
* Reload the localization
*/
public void reloadLocalization() {
- this.btn_config.setText(Messages.getString("main.configuration")); //
- this.btn_config.setToolTipText(Messages.getString("main.configuration")); //
- this.btn_open.setText(Messages.getString("common.open")); //
- this.btn_open.setToolTipText(Messages.getString("common.open")); //
+ this.btn_config.setText(Messages.getString("main.configuration"));
+ this.btn_config.setToolTipText(Messages.getString("main.configuration"));
+ this.btn_open.setText(Messages.getString("common.open"));
+ this.btn_open.setToolTipText(Messages.getString("common.open"));
- this.btn_position.setText(Messages.getString("main.position")); //
- this.btn_position.setToolTipText(Messages.getString("main.position")); //
+ this.btn_position.setText(Messages.getString("main.position"));
+ this.btn_position.setToolTipText(Messages.getString("main.position"));
- this.btn_sign.setText(Messages.getString("main.signature")); //
- this.btn_sign.setToolTipText(Messages.getString("main.signature")); //
+ this.btn_sign.setText(Messages.getString("main.signature"));
+ this.btn_sign.setToolTipText(Messages.getString("main.signature"));
- this.btn_end.setText(Messages.getString("main.done")); //
- this.btn_end.setToolTipText(Messages.getString("main.done")); //
+ this.btn_end.setText(Messages.getString("main.done"));
+ this.btn_end.setToolTipText(Messages.getString("main.done"));
Control ctrl = this.stack.topControl;
if (ctrl instanceof StateComposite) {
@@ -207,8 +207,8 @@ public class MainWindow {
protected void createContents() {
this.shell = new Shell();
getShell().setSize(this.stateMachine.getConfigProvider().getMainWindowSize());
- if (System.getProperty("os.name").toLowerCase().contains("mac")) { // //
- if (System.getProperty("os.name").contains("OS X")) { // //
+ if (System.getProperty("os.name").toLowerCase().contains("mac")) {
+ if (System.getProperty("os.name").contains("OS X")) {
hookupOSXMenu();
}
}
@@ -222,7 +222,7 @@ public class MainWindow {
bounds.y + (bounds.height - main.height) / 2);
}
catch (SWTError e) {
- log.debug("Cannot get display", e); //
+ log.debug("Cannot get display", e);
}
Display.setAppVersion(Constants.APP_VERSION);
getShell().setText(Constants.APP_NAME);
@@ -230,12 +230,12 @@ public class MainWindow {
getShell().addShellListener(new ShellAdapter() {
@Override
public void shellClosed(ShellEvent e) {
- log.debug("Closing main window"); //
+ log.debug("Closing main window");
MainWindow.this.stateMachine.getConfigManipulator().setMainWindowSize(getShell().getSize());
try {
MainWindow.this.stateMachine.getConfigManipulator().saveCurrentConfiguration();
} catch (IOException e1) {
- log.error("Error saving configuration", e); //
+ log.error("Error saving configuration", e);
}
}
});
@@ -263,9 +263,9 @@ public class MainWindow {
fd_btn_config.top = new FormAttachment(0);
fd_btn_config.left = new FormAttachment(0);
this.btn_config.setLayoutData(fd_btn_config);
- this.btn_config.setText(Messages.getString("main.configuration")); //
+ this.btn_config.setText(Messages.getString("main.configuration"));
this.btn_config
- .setToolTipText(Messages.getString("main.configuration")); //
+ .setToolTipText(Messages.getString("main.configuration"));
this.btn_config.addMouseListener(new MouseAdapter() {
@Override
public void mouseUp(MouseEvent e) {
@@ -299,8 +299,8 @@ public class MainWindow {
fd_btn_open.top = new FormAttachment(0);
fd_btn_open.bottom = new FormAttachment(100);
this.btn_open.setLayoutData(fd_btn_open);
- this.btn_open.setText(Messages.getString("common.open")); //
- this.btn_open.setToolTipText(Messages.getString("common.open")); //
+ this.btn_open.setText(Messages.getString("common.open"));
+ this.btn_open.setToolTipText(Messages.getString("common.open"));
this.btn_open.addMouseListener(new MouseAdapter() {
@Override
@@ -323,8 +323,8 @@ public class MainWindow {
fd_btn_position.top = new FormAttachment(0);
fd_btn_position.bottom = new FormAttachment(100);
this.btn_position.setLayoutData(fd_btn_position);
- this.btn_position.setText(Messages.getString("main.position")); //
- this.btn_position.setToolTipText(Messages.getString("main.position")); //
+ this.btn_position.setText(Messages.getString("main.position"));
+ this.btn_position.setToolTipText(Messages.getString("main.position"));
this.btn_position.addMouseListener(new MouseAdapter() {
@Override
@@ -342,8 +342,8 @@ public class MainWindow {
fd_btn_sign.top = new FormAttachment(0);
fd_btn_sign.bottom = new FormAttachment(100);
this.btn_sign.setLayoutData(fd_btn_sign);
- this.btn_sign.setText(Messages.getString("main.signature")); //
- this.btn_sign.setToolTipText(Messages.getString("main.signature")); //
+ this.btn_sign.setText(Messages.getString("main.signature"));
+ this.btn_sign.setToolTipText(Messages.getString("main.signature"));
this.btn_sign.addMouseListener(new MouseAdapter() {
@Override
@@ -361,8 +361,8 @@ public class MainWindow {
fd_btn_end.top = new FormAttachment(0);
fd_btn_end.bottom = new FormAttachment(100);
this.btn_end.setLayoutData(fd_btn_end);
- this.btn_end.setText(Messages.getString("main.done")); //
- this.btn_end.setToolTipText(Messages.getString("main.done")); //
+ this.btn_end.setText(Messages.getString("main.done"));
+ this.btn_end.setToolTipText(Messages.getString("main.done"));
this.buttonMap.put(Buttons.FINAL, this.btn_end);
this.container = new Composite(getShell(), SWT.RESIZE);
@@ -380,7 +380,7 @@ public class MainWindow {
* Hook up SWT menu under OS X
*/
private void hookupOSXMenu() {
- log.debug("Hooking up OS X menu"); //
+ log.debug("Hooking up OS X menu");
CocoaUIEnhancer.hookApplicationMenu(getShell().getDisplay(), new Listener() {
@Override
public void handleEvent(Event arg0) {
@@ -390,7 +390,7 @@ public class MainWindow {
@Override
public void handleEvent(Event arg0) {
Dialog dialog = new Dialog(getShell(),
- String.format(Messages.getString("main.about"), Constants.APP_NAME), //
+ String.format(Messages.getString("main.about"), Constants.APP_NAME),
Constants.APP_NAME_VERSION, BUTTONS.OK, ICON.INFORMATION);
dialog.open();
}
@@ -410,7 +410,7 @@ public class MainWindow {
MainWindowBehavior behavior = this.stateMachine.getStatus()
.getBehavior();
- log.debug("Updating MainWindow state for : " //
+ log.debug("Updating MainWindow state for : "
+ this.stateMachine.getStatus().getCurrentState().toString());
for (Buttons button : Buttons.values()) {
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java
index 87dca1c3..c00fa151 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java
@@ -99,7 +99,7 @@ public class PlaceholderSelectionGui extends Dialog {
private void createContents() {
this.shlInfo = new Shell(getParent(), getStyle());
this.shlInfo.setSize(290, 195);
- this.shlInfo.setText("Info"); //
+ this.shlInfo.setText("Info");
this.shlInfo.setLayout(null);
this.placeholderNameDropDown = new Combo(this.shlInfo, SWT.NONE);
@@ -119,7 +119,7 @@ public class PlaceholderSelectionGui extends Dialog {
}
});
this.btnCancel.setBounds(175, 118, 75, 25);
- this.btnCancel.setText("Cancel"); //
+ this.btnCancel.setText("Cancel");
this.btnOk = new Button(this.shlInfo, SWT.NONE);
this.btnOk.setBounds(94, 118, 75, 25);
@@ -131,11 +131,11 @@ public class PlaceholderSelectionGui extends Dialog {
PlaceholderSelectionGui.this.shlInfo.dispose();
}
});
- this.btnOk.setText("Ok"); //
+ this.btnOk.setText("Ok");
Label lbLabel = new Label(this.shlInfo, SWT.WRAP);
lbLabel.setBounds(27, 10, 223, 41);
- lbLabel.setText(Messages.getString("positioning.placeholder")); //
+ lbLabel.setText(Messages.getString("positioning.placeholder"));
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/BKUHelper.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/BKUHelper.java
index 7686959a..6eb071c5 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/BKUHelper.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/BKUHelper.java
@@ -37,18 +37,18 @@ public class BKUHelper {
/* public static HttpClient getHttpClient(boolean useProxy) {
HttpClient client = new HttpClient();
- client.getParams().setParameter("http.useragent", //
+ client.getParams().setParameter("http.useragent",
Constants.USER_AGENT_STRING);
if (useProxy) {
- String host = System.getProperty("http.proxyHost"); //
- String port = System.getProperty("http.proxyPort"); //
+ String host = System.getProperty("http.proxyHost");
+ String port = System.getProperty("http.proxyPort");
if (host != null && !host.isEmpty() &&
port != null && !port.isEmpty()) {
int p = Integer.parseInt(port);
client.getHostConfiguration().setProxy(host, p);
- String user = System.getProperty("http.proxyUser"); //
- String pass = System.getProperty("http.proxyPassword"); //
+ String user = System.getProperty("http.proxyUser");
+ String pass = System.getProperty("http.proxyPassword");
if (user != null && !user.isEmpty() && pass != null) {
client.getState().setProxyCredentials(new AuthScope(host, p),
new UsernamePasswordCredentials(user, pass));
@@ -69,11 +69,11 @@ public class BKUHelper {
@SuppressWarnings("deprecation")
public static HttpClient getHttpClient(boolean useProxy) {
HttpClient client = new HttpClient();
- client.getParams().setParameter("http.useragent", //
+ client.getParams().setParameter("http.useragent",
Constants.USER_AGENT_STRING);
- client.getParams().setParameter("http.protocol.cookie-policy", CookieSpecs.BROWSER_COMPATIBILITY); //
+ client.getParams().setParameter("http.protocol.cookie-policy", CookieSpecs.BROWSER_COMPATIBILITY);
if (useProxy) {
String host = System.getProperty("http.proxyHost");//
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/LocalBKUConnector.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/LocalBKUConnector.java
index 561bb5ba..2fcd9938 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/LocalBKUConnector.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/LocalBKUConnector.java
@@ -51,17 +51,17 @@ public class LocalBKUConnector implements BkuSlConnector {
/**
* HTTP Response server HEADER
*/
- public final static String BKU_RESPONSE_HEADER_SERVER = "server"; //
+ public final static String BKU_RESPONSE_HEADER_SERVER = "server";
/**
* HTTP Response user-agent HEADER
*/
- public final static String BKU_RESPONSE_HEADER_USERAGENT = "user-agent"; //
+ public final static String BKU_RESPONSE_HEADER_USERAGENT = "user-agent";
/**
* HTTP Response SignatureLayout HEADER
*/
- public final static String BKU_RESPONSE_HEADER_SIGNATURE_LAYOUT = "SignatureLayout"; //
+ public final static String BKU_RESPONSE_HEADER_SIGNATURE_LAYOUT = "SignatureLayout";
/* (non-Javadoc)
* @see at.asit.pdfover.signator.BkuSlConnector#handleSLRequest(java.lang.String)
@@ -74,12 +74,12 @@ public class LocalBKUConnector implements BkuSlConnector {
String sl_request = request.getRequest();
if (request.getSignatureData() == null) {
- method.addParameter("XMLRequest", sl_request); //
+ method.addParameter("XMLRequest", sl_request);
} else {
StringPart xmlpart = new StringPart(
- "XMLRequest", sl_request, "UTF-8"); // //
+ "XMLRequest", sl_request, "UTF-8");
- FilePart filepart = new FilePart("fileupload", //
+ FilePart filepart = new FilePart("fileupload",
new FileUploadSource(request.getSignatureData()));
Part[] parts = { xmlpart, filepart };
@@ -87,7 +87,7 @@ public class LocalBKUConnector implements BkuSlConnector {
method.setRequestEntity(new MultipartRequestEntity(parts, method
.getParams()));
}
- log.trace("SL REQUEST: " + sl_request); //
+ log.trace("SL REQUEST: " + sl_request);
int returnCode = client.executeMethod(method);
@@ -98,22 +98,22 @@ public class LocalBKUConnector implements BkuSlConnector {
String server = getResponseHeader(method, BKU_RESPONSE_HEADER_SERVER);
if (server == null)
- server = ""; //
+ server = "";
String userAgent = getResponseHeader(method, BKU_RESPONSE_HEADER_USERAGENT);
if (userAgent == null)
- userAgent = ""; //
+ userAgent = "";
String signatureLayout = getResponseHeader(method, BKU_RESPONSE_HEADER_SIGNATURE_LAYOUT);
String response = method.getResponseBodyAsString();
- log.debug("SL Response: " + response); //
+ log.debug("SL Response: " + response);
SLResponse slResponse = new SLResponse(response, server,
userAgent, signatureLayout);
return slResponse;
} catch (HttpException e) {
- log.error("LocalBKUConnector: ", e); //
+ log.error("LocalBKUConnector: ", e);
throw new SignatureException(e);
} catch (IOException e) {
- log.error("LocalBKUConnector: ", e); //
+ log.error("LocalBKUConnector: ", e);
throw new SignatureException(e);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java
index 3d3f6012..6fb36488 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java
@@ -66,11 +66,11 @@ public class MobileBKUConnector implements BkuSlConnector {
String responseData = handler.postSLRequest(this.state.getURL(), request);
// Now we have received some data lets check it:
- log.trace("Response from mobile BKU: " + responseData); //
+ log.trace("Response from mobile BKU: " + responseData);
handler.handleSLRequestResponse(responseData);
} catch (Exception ex) {
- log.error("Error in PostSLRequestThread", ex); //
+ log.error("Error in PostSLRequestThread", ex);
this.state.threadException = ex;
this.state.displayError(ex);
throw new SignatureException(ex);
@@ -81,14 +81,14 @@ public class MobileBKUConnector implements BkuSlConnector {
this.state.checkCredentials();
if (this.state.status.errorMessage != null &&
- this.state.status.errorMessage.equals("cancel")) //
+ this.state.status.errorMessage.equals("cancel"))
throw new SignatureException(new IllegalStateException());
// Post credentials
try {
String responseData = handler.postCredentials();
- if (responseData.contains("undecided.aspx?sid=")) { //
+ if (responseData.contains("undecided.aspx?sid=")) {
// handle polling
this.state.showOpenAppMessageWithSMSandCancel();
@@ -102,12 +102,12 @@ public class MobileBKUConnector implements BkuSlConnector {
} else {
// Now we have received some data lets check it:
- log.trace("Response from mobile BKU: " + responseData); //
+ log.trace("Response from mobile BKU: " + responseData);
handler.handleCredentialsResponse(responseData);
}
} catch (Exception ex) {
- log.error("Error in PostCredentialsThread", ex); //
+ log.error("Error in PostCredentialsThread", ex);
this.state.threadException = new IllegalStateException();
throw new SignatureException(new IllegalStateException());
}
@@ -130,15 +130,15 @@ public class MobileBKUConnector implements BkuSlConnector {
if (aStatus.qrCodeURL != null) {
this.state.showQR();
if (this.state.status.errorMessage != null &&
- this.state.status.errorMessage.equals("cancel")) //
+ this.state.status.errorMessage.equals("cancel"))
throw new SignatureException(new IllegalStateException());
if (aStatus.qrCodeURL == null) {
try {
String response = aHandler.postSMSRequest();
- log.trace("Response from mobile BKU: " + response); //
+ log.trace("Response from mobile BKU: " + response);
handler.handleCredentialsResponse(response);
} catch (Exception ex) {
- log.error("Error in PostCredentialsThread", ex); //
+ log.error("Error in PostCredentialsThread", ex);
this.state.threadException = new IllegalStateException();
throw new SignatureException(new IllegalStateException());
}
@@ -151,10 +151,10 @@ public class MobileBKUConnector implements BkuSlConnector {
this.state.showFingerPrintInformation();
if (this.state.status.errorMessage != null &&
- this.state.status.errorMessage.equals("cancel")) //
+ this.state.status.errorMessage.equals("cancel"))
throw new SignatureException(new IllegalStateException());
} catch (Exception ex) {
- log.error("Error in PostCredentialsThread", ex); //
+ log.error("Error in PostCredentialsThread", ex);
this.state.threadException = new IllegalStateException();
//this.state.displayError(ex);
throw new SignatureException(new IllegalStateException());
@@ -166,7 +166,7 @@ public class MobileBKUConnector implements BkuSlConnector {
response = aHandler.postSMSRequest();
handler.handleCredentialsResponse(response);
} catch (Exception e) {
- log.error("Error in PostCredentialsThread", e); //
+ log.error("Error in PostCredentialsThread", e);
this.state.threadException = e;
this.state.displayError(e);
throw new SignatureException(e);
@@ -184,18 +184,18 @@ public class MobileBKUConnector implements BkuSlConnector {
if (this.state.status.errorMessage != null &&
- this.state.status.errorMessage.equals("cancel")) //
+ this.state.status.errorMessage.equals("cancel"))
throw new SignatureException(new IllegalStateException());
// Post TAN
try {
responseData = handler.postTAN();
- log.trace("Response from mobile BKU: " + responseData); //
+ log.trace("Response from mobile BKU: " + responseData);
// Now we have received some data lets check it:
handler.handleTANResponse(responseData);
} catch (Exception ex) {
- log.error("Error in PostTanThread", ex); //
+ log.error("Error in PostTanThread", ex);
this.state.threadException = ex;
this.state.displayError(ex);
throw new SignatureException(ex);
@@ -213,7 +213,7 @@ public class MobileBKUConnector implements BkuSlConnector {
if (this.state.status instanceof ATrustStatus) {
if (this.state.status.errorMessage != null &&
- this.state.status.errorMessage.equals("cancel")) { //
+ this.state.status.errorMessage.equals("cancel")) {
this.state.status.errorMessage = null;
return true;
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java
index 5c0e108c..75f02dd6 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java
@@ -75,7 +75,7 @@ public class ATrustHandler extends MobileBKUHandler {
private static boolean expiryNoticeDisplayed = false;
- private static final String ACTIVATION_URL = "https://www.handy-signatur.at/"; //
+ private static final String ACTIVATION_URL = "https://www.handy-signatur.at/";
private boolean useBase64 = false;
@@ -86,26 +86,26 @@ public class ATrustHandler extends MobileBKUHandler {
public void handleSLRequestResponse(String responseData) throws Exception {
ATrustStatus status = getStatus();
- if (responseData.contains("<sl:ErrorResponse")) { //
+ if (responseData.contains("<sl:ErrorResponse")) {
String errorCode = MobileBKUHelper.extractSubstring(responseData,
- "<sl:ErrorCode>", "</sl:ErrorCode>"); // //
+ "<sl:ErrorCode>", "</sl:ErrorCode>");
String errorMsg = MobileBKUHelper.extractSubstring(responseData,
- "<sl:Info>", "</sl:Info>"); // //
- throw new Exception("Error from mobile BKU: " + //
- errorCode + " - " + errorMsg); //
+ "<sl:Info>", "</sl:Info>");
+ throw new Exception("Error from mobile BKU: " +
+ errorCode + " - " + errorMsg);
}
// Extract infos:
String sessionID = MobileBKUHelper.extractSubstring(responseData,
- "identification.aspx?sid=", "\""); // //
+ "identification.aspx?sid=", "\"");
String viewState = MobileBKUHelper.extractValueFromTagWithParam(
- responseData, "", "id", "__VIEWSTATE", "value"); // // // //
+ responseData, "", "id", "__VIEWSTATE", "value");
String eventValidation = MobileBKUHelper.extractValueFromTagWithParam(
- responseData, "", "id", "__EVENTVALIDATION", "value"); // // // //
+ responseData, "", "id", "__EVENTVALIDATION", "value");
- String viewstateGenerator = MobileBKUHelper.extractValueFromTagWithParamOptional(responseData, "", "id", "__VIEWSTATEGENERATOR", "value"); // // // //
+ String viewstateGenerator = MobileBKUHelper.extractValueFromTagWithParamOptional(responseData, "", "id", "__VIEWSTATEGENERATOR", "value");
String dynamicAttrPhonenumber = MobileBKUHelper.getDynamicNameAttribute(responseData, Constants.LABEL_PHONE_NUMBER);
String dynamicAttrPassword = MobileBKUHelper.getDynamicNameAttribute(responseData, Constants.LABEL_SIGN_PASS);
@@ -113,9 +113,9 @@ public class ATrustHandler extends MobileBKUHandler {
String dynamicAttrTan = MobileBKUHelper.getDynamicNameAttribute(responseData, Constants.LABEL_TAN);
- log.info("sessionID: " + sessionID); //
- log.info("viewState: " + viewState); //
- log.info("eventValidation: " + eventValidation); //
+ log.info("sessionID: " + sessionID);
+ log.info("viewState: " + viewState);
+ log.info("eventValidation: " + eventValidation);
status.sessionID = sessionID;
status.viewState = viewState;
@@ -137,11 +137,11 @@ public class ATrustHandler extends MobileBKUHandler {
MobileBKUHelper.registerTrustedSocketFactory();
HttpClient client = MobileBKUHelper.getHttpClient(getStatus());
- PostMethod post = new PostMethod(status.baseURL + "/identification.aspx?sid=" + status.sessionID); //
- post.getParams().setContentCharset("utf-8"); //
- post.addParameter("__VIEWSTATE", status.viewState); //
- post.addParameter("__VIEWSTATEGENERATOR", status.viewStateGenerator); //
- post.addParameter("__EVENTVALIDATION", status.eventValidation); //
+ PostMethod post = new PostMethod(status.baseURL + "/identification.aspx?sid=" + status.sessionID);
+ post.getParams().setContentCharset("utf-8");
+ post.addParameter("__VIEWSTATE", status.viewState);
+ post.addParameter("__VIEWSTATEGENERATOR", status.viewStateGenerator);
+ post.addParameter("__EVENTVALIDATION", status.eventValidation);
post.addParameter(status.dynAttrPhoneNumber, status.phoneNumber);
post.addParameter(status.dynAttrPassword, status.mobilePassword);
post.addParameter(status.dynAttrBtnId, "Identifizieren");
@@ -164,124 +164,124 @@ public class ATrustHandler extends MobileBKUHandler {
status.errorMessage = null;
- if (responseData.contains("ExpiresInfo.aspx?sid=")) { //
+ if (responseData.contains("ExpiresInfo.aspx?sid=")) {
// Certificate expiration interstitial - skip
- String notice = Messages.getString("mobileBKU.notice") + " " + // //
- StringEscapeUtils.unescapeHtml4(MobileBKUHelper.extractContentFromTagWithParam(responseData, "span", "id", "Label2")) // // //
- .replaceAll("\\<.*?\\>", ""); // //
+ String notice = Messages.getString("mobileBKU.notice") + " " +
+ StringEscapeUtils.unescapeHtml4(MobileBKUHelper.extractContentFromTagWithParam(responseData, "span", "id", "Label2"))
+ .replaceAll("\\<.*?\\>", "");
log.info(notice);
if (!expiryNoticeDisplayed) {
Display.getDefault().syncExec(()-> {
- Dialog d = new Dialog(ATrustHandler.this.shell, Messages.getString("common.info"), Messages.getString("mobileBKU.certExpiresSoon"), BUTTONS.YES_NO, ICON.WARNING); // //
+ Dialog d = new Dialog(ATrustHandler.this.shell, Messages.getString("common.info"), Messages.getString("mobileBKU.certExpiresSoon"), BUTTONS.YES_NO, ICON.WARNING);
if (d.open() == SWT.YES) {
- log.debug("Trying to open " + ACTIVATION_URL); //
+ log.debug("Trying to open " + ACTIVATION_URL);
if (Desktop.isDesktopSupported()) {
try {
Desktop.getDesktop().browse(new URI(ACTIVATION_URL));
return;
} catch (Exception e) {
- log.debug("Error opening URL", e); //
+ log.debug("Error opening URL", e);
}
}
- log.info("SWT Desktop is not supported on this platform"); //
+ log.info("SWT Desktop is not supported on this platform");
Program.launch(ACTIVATION_URL);
}
});
expiryNoticeDisplayed = true;
}
- String t_sessionID = MobileBKUHelper.extractSubstring(responseData, "ExpiresInfo.aspx?sid=", "\""); // //
- String t_viewState = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__VIEWSTATE", "value"); // // // //
- String t_eventValidation = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__EVENTVALIDATION", "value"); // // // //
+ String t_sessionID = MobileBKUHelper.extractSubstring(responseData, "ExpiresInfo.aspx?sid=", "\"");
+ String t_viewState = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__VIEWSTATE", "value");
+ String t_eventValidation = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__EVENTVALIDATION", "value");
// Post again to skip
MobileBKUHelper.registerTrustedSocketFactory();
HttpClient client = MobileBKUHelper.getHttpClient(getStatus());
- PostMethod post = new PostMethod(status.baseURL + "/ExpiresInfo.aspx?sid=" + t_sessionID); //
- post.getParams().setContentCharset("utf-8"); //
- post.addParameter("__VIEWSTATE", t_viewState); //
- post.addParameter("__EVENTVALIDATION", t_eventValidation); //
- post.addParameter("Button_Next", "Weiter"); // //
+ PostMethod post = new PostMethod(status.baseURL + "/ExpiresInfo.aspx?sid=" + t_sessionID);
+ post.getParams().setContentCharset("utf-8");
+ post.addParameter("__VIEWSTATE", t_viewState);
+ post.addParameter("__EVENTVALIDATION", t_eventValidation);
+ post.addParameter("Button_Next", "Weiter");
responseData = executePost(client, post);
- log.trace("Response from mobile BKU: " + responseData); //
- } else if (responseData.contains("tanAppInfo.aspx?sid=")) { //
+ log.trace("Response from mobile BKU: " + responseData);
+ } else if (responseData.contains("tanAppInfo.aspx?sid=")) {
// App info interstitial - skip
- log.info("Skipping tan app interstitial"); //
+ log.info("Skipping tan app interstitial");
- String t_sessionID = MobileBKUHelper.extractSubstring(responseData, "tanAppInfo.aspx?sid=", "\""); // //
- String t_viewState = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__VIEWSTATE", "value"); // // // //
- String t_eventValidation = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__EVENTVALIDATION", "value"); // // // //
+ String t_sessionID = MobileBKUHelper.extractSubstring(responseData, "tanAppInfo.aspx?sid=", "\"");
+ String t_viewState = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__VIEWSTATE", "value");
+ String t_eventValidation = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__EVENTVALIDATION", "value");
// Post again to skip
MobileBKUHelper.registerTrustedSocketFactory();
HttpClient client = MobileBKUHelper.getHttpClient(getStatus());
- PostMethod post = new PostMethod(status.baseURL + "/tanAppInfo.aspx?sid=" + t_sessionID); //
- post.getParams().setContentCharset("utf-8"); //
- post.addParameter("__VIEWSTATE", t_viewState); //
- post.addParameter("__EVENTVALIDATION", t_eventValidation); //
- post.addParameter("NextBtn", "Weiter"); // //
+ PostMethod post = new PostMethod(status.baseURL + "/tanAppInfo.aspx?sid=" + t_sessionID);
+ post.getParams().setContentCharset("utf-8");
+ post.addParameter("__VIEWSTATE", t_viewState);
+ post.addParameter("__EVENTVALIDATION", t_eventValidation);
+ post.addParameter("NextBtn", "Weiter");
responseData = executePost(client, post);
- log.trace("Response from mobile BKU: " + responseData); //
+ log.trace("Response from mobile BKU: " + responseData);
}
- if (responseData.contains("signature.aspx?sid=")) { //
+ if (responseData.contains("signature.aspx?sid=")) {
// credentials ok! TAN entry
- log.debug("Credentials accepted - TAN required"); //
- sessionID = MobileBKUHelper.extractSubstring(responseData, "signature.aspx?sid=", "\""); // //
- viewState = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__VIEWSTATE", "value"); // // // //
- eventValidation = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__EVENTVALIDATION", "value"); // // // //
- refVal = MobileBKUHelper.extractSubstring(responseData, "id='vergleichswert'><b>Vergleichswert:</b>", "</div>"); // //
- signatureDataURL = status.baseURL + "/ShowSigobj.aspx" + //
- MobileBKUHelper.extractSubstring(responseData, "ShowSigobj.aspx", "'"); // //
+ log.debug("Credentials accepted - TAN required");
+ sessionID = MobileBKUHelper.extractSubstring(responseData, "signature.aspx?sid=", "\"");
+ viewState = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__VIEWSTATE", "value");
+ eventValidation = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__EVENTVALIDATION", "value");
+ refVal = MobileBKUHelper.extractSubstring(responseData, "id='vergleichswert'><b>Vergleichswert:</b>", "</div>");
+ signatureDataURL = status.baseURL + "/ShowSigobj.aspx" +
+ MobileBKUHelper.extractSubstring(responseData, "ShowSigobj.aspx", "'");
try {
- String qrCode = MobileBKUHelper.extractValueFromTagWithParam(responseData, "img", "class", "qrcode", "src"); // // // //
- log.debug("QR Code found: " + qrCode); //
+ String qrCode = MobileBKUHelper.extractValueFromTagWithParam(responseData, "img", "class", "qrcode", "src");
+ log.debug("QR Code found: " + qrCode);
status.qrCodeURL = qrCode;
} catch (Exception e) {
- log.debug("No QR Code found"); //
+ log.debug("No QR Code found");
}
try {
- String tanTextTan = MobileBKUHelper.extractValueFromTagWithParam(responseData, "label", "id", "label_for_input_tan", "for"); // // // //
+ String tanTextTan = MobileBKUHelper.extractValueFromTagWithParam(responseData, "label", "id", "label_for_input_tan", "for");
status.tanField = tanTextTan.equals("input_tan");
status.dynAttrTan = MobileBKUHelper.getDynamicNameAttribute(responseData, Constants.LABEL_TAN);
status.dynAttrSignButton = MobileBKUHelper.getDynamicNameAttribute(responseData, Constants.LABEL_SIGN_BTN);
} catch (Exception e) {
- log.debug("No tan field found"); //
+ log.debug("No tan field found");
}
try {
- String tanTextTan = MobileBKUHelper.extractContentFromTagWithParam(responseData, "span", "id", "text_tan"); // // //
+ String tanTextTan = MobileBKUHelper.extractContentFromTagWithParam(responseData, "span", "id", "text_tan");
status.isAPPTan = !tanTextTan.toLowerCase().contains("sms");
status.dynAttrTan = MobileBKUHelper.getDynamicNameAttribute(responseData, Constants.LABEL_TAN);
status.dynAttrSignButton = MobileBKUHelper.getDynamicNameAttribute(responseData, Constants.LABEL_SIGN_BTN);
}catch (Exception e) {
- log.debug("No text_tan tag"); //
+ log.debug("No text_tan tag");
}
- } else if (responseData.contains("sl:InfoboxReadResponse")) { //
+ } else if (responseData.contains("sl:InfoboxReadResponse")) {
// credentials ok! InfoboxReadResponse
- log.debug("Credentials accepted - Response given"); //
+ log.debug("Credentials accepted - Response given");
getSigningState().setSignatureResponse(new SLResponse(responseData, getStatus().server, null, null));
return;
- } else if (responseData.contains("undecided.aspx?sid=")) { //
+ } else if (responseData.contains("undecided.aspx?sid=")) {
// skip intermediate page
- log.debug("Page Undecided"); //
+ log.debug("Page Undecided");
getSigningState().setSignatureResponse(new SLResponse(responseData, getStatus().server, null, null));
- status.errorMessage = "waiting..."; //
+ status.errorMessage = "waiting...";
return;
}else {
// error page
// extract error text!
try {
- String errorMessage = MobileBKUHelper.extractContentFromTagWithParam(responseData, "span", "class", "ErrorClass"); // // //
+ String errorMessage = MobileBKUHelper.extractContentFromTagWithParam(responseData, "span", "class", "ErrorClass");
status.errorMessage = errorMessage;
} catch (Exception e) {
- throw new SignatureException(MobileBKUHelper.extractSubstring(responseData, "<sl:ErrorCode>", "</sl:ErrorCode>") + ": " + // // //
- MobileBKUHelper.extractSubstring(responseData, "<sl:Info>", "</sl:Info>")); // //
+ throw new SignatureException(MobileBKUHelper.extractSubstring(responseData, "<sl:ErrorCode>", "</sl:ErrorCode>") + ": " +
+ MobileBKUHelper.extractSubstring(responseData, "<sl:Info>", "</sl:Info>"));
}
// force UI again!
@@ -313,14 +313,14 @@ public class ATrustHandler extends MobileBKUHandler {
HttpClient client = MobileBKUHelper.getHttpClient(getStatus());
PostMethod post = new PostMethod(status.baseURL
- + "/signature.aspx?sid=" + status.sessionID); //
- post.getParams().setContentCharset("utf-8"); //
- post.addParameter("__VIEWSTATE", status.viewState); //
+ + "/signature.aspx?sid=" + status.sessionID);
+ post.getParams().setContentCharset("utf-8");
+ post.addParameter("__VIEWSTATE", status.viewState);
post.addParameter(
- "__EVENTVALIDATION", status.eventValidation); //
+ "__EVENTVALIDATION", status.eventValidation);
post.addParameter(status.dynAttrTan, status.tan);
post.addParameter(status.dynAttrSignButton, "Signieren");
- post.addParameter("Button1", "Identifizieren"); // //
+ post.addParameter("Button1", "Identifizieren");
return executePost(client, post);
}
@@ -331,8 +331,8 @@ public class ATrustHandler extends MobileBKUHandler {
@Override
public void handleTANResponse(String responseData) {
getStatus().errorMessage = null;
- if (responseData.contains("sl:CreateXMLSignatureResponse xmlns:sl") || //
- responseData.contains("sl:CreateCMSSignatureResponse xmlns:sl")) { //
+ if (responseData.contains("sl:CreateXMLSignatureResponse xmlns:sl") ||
+ responseData.contains("sl:CreateCMSSignatureResponse xmlns:sl")) {
// success !!
getSigningState().setSignatureResponse(
@@ -340,19 +340,19 @@ public class ATrustHandler extends MobileBKUHandler {
} else {
try {
String tries = MobileBKUHelper.extractSubstring(
- responseData, "Sie haben noch", "Versuch"); // //
+ responseData, "Sie haben noch", "Versuch");
getStatus().tanTries = Integer.parseInt(tries.trim());
getStatus().errorMessage = "mobileBKU.wrong_tan";
} catch (Exception e) {
getStatus().tanTries = (getStatus().tanTries - 1);
- log.debug("Error parsing TAN response", e); //
+ log.debug("Error parsing TAN response", e);
}
if (getStatus().tanTries <= 0) {
getStatus().errorMessage = null;
Display.getDefault().syncExec(() -> {
- Dialog dialog = new Dialog(ATrustHandler.this.shell, Messages.getString("common.warning"), //
- Messages.getString("mobileBKU.tan_tries_exceeded"), //
+ Dialog dialog = new Dialog(ATrustHandler.this.shell, Messages.getString("common.warning"),
+ Messages.getString("mobileBKU.tan_tries_exceeded"),
BUTTONS.OK_CANCEL, ICON.QUESTION);
// TODO: THIS IS A COLOSSAL HACK
@@ -381,7 +381,7 @@ public class ATrustHandler extends MobileBKUHandler {
GetMethod get = new GetMethod(status.baseURL
+ "/sendsms.aspx?sid=" + status.sessionID);
- get.getParams().setContentCharset("utf-8"); //
+ get.getParams().setContentCharset("utf-8");
return executeGet(client, get);
}
@@ -401,17 +401,17 @@ public class ATrustHandler extends MobileBKUHandler {
GetMethod get = new GetMethod(status.baseURL + "/" + status.qrCodeURL);
try {
- log.debug("Getting " + get.getURI()); //
+ log.debug("Getting " + get.getURI());
int returnCode = client.executeMethod(get);
if (returnCode != HttpStatus.SC_OK) {
- log.error("Error getting QR code"); //
+ log.error("Error getting QR code");
return null;
}
return get.getResponseBodyAsStream();
} catch (Exception e) {
- log.error("Error getting QR code", e); //
+ log.error("Error getting QR code", e);
return null;
}
}
@@ -430,7 +430,7 @@ public class ATrustHandler extends MobileBKUHandler {
//TODO check
//String baseURL = "https://www.a-trust.at/mobile/https-security-layer-request";
GetMethod get = new GetMethod(status.baseURL
- + "/signature.aspx?sid=" + status.sessionID); //
+ + "/signature.aspx?sid=" + status.sessionID);
return executeGet(client, get);
}
@@ -442,8 +442,8 @@ public class ATrustHandler extends MobileBKUHandler {
public Boolean handleWaitforAppResponse(String responseData) {
getStatus().errorMessage = null;
- if (!responseData.toLowerCase().contains("Bitte starten Sie Ihre Handy-Signatur App!".toLowerCase())/* || //
- responseData.toLowerCase().contains("TAN (Handy-Signatur App)".toLowerCase())*/) { //
+ if (!responseData.toLowerCase().contains("Bitte starten Sie Ihre Handy-Signatur App!".toLowerCase())/* ||
+ responseData.toLowerCase().contains("TAN (Handy-Signatur App)".toLowerCase())*/) {
return true;
}
@@ -457,8 +457,8 @@ public class ATrustHandler extends MobileBKUHandler {
*/
public boolean handleQRResponse(String responseData) {
getStatus().errorMessage = null;
- if (responseData.contains("sl:CreateXMLSignatureResponse xmlns:sl") || //
- responseData.contains("sl:CreateCMSSignatureResponse xmlns:sl")) { //
+ if (responseData.contains("sl:CreateXMLSignatureResponse xmlns:sl") ||
+ responseData.contains("sl:CreateCMSSignatureResponse xmlns:sl")) {
// success !!
getSigningState().setSignatureResponse(
@@ -493,7 +493,7 @@ public class ATrustHandler extends MobileBKUHandler {
String isReady = null;
Status serverStatus = null;
int waits = 0;
- final String ERROR = "Error: Server is not responding"; //
+ final String ERROR = "Error: Server is not responding";
HttpClient client;
try {
do {
@@ -511,7 +511,7 @@ public class ATrustHandler extends MobileBKUHandler {
int returnValue = client.executeMethod(get);
InputStream in = new BufferedInputStream(get.getResponseBodyAsStream());
- isReady = IOUtils.toString(in, "utf-8"); //
+ isReady = IOUtils.toString(in, "utf-8");
serverStatus = new Status(isReady);
if (serverStatus.isFin()) {
@@ -528,11 +528,11 @@ public class ATrustHandler extends MobileBKUHandler {
}
//else error
status.errorMessage = "Server reponded ERROR during polling";
- log.error("Server reponded ERROR during polling"); //
+ log.error("Server reponded ERROR during polling");
throw new ATrustConnectionException();
} catch (Exception e) {
- log.error("handle polling failed" + e.getMessage()); //
+ log.error("handle polling failed" + e.getMessage());
throw new ATrustConnectionException();
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKHandler.java
index e1e838fc..ac47a3b7 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKHandler.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKHandler.java
@@ -68,23 +68,23 @@ public class IAIKHandler extends MobileBKUHandler {
// Extract infos:
String credentialURL = MobileBKUHelper.extractValueFromTagWithParam(responseData,
- "form", "name", "userCredLogon", "action"); // // // //
+ "form", "name", "userCredLogon", "action");
URL baseURL = new URL(status.baseURL);
credentialURL = MobileBKUHelper.getQualifiedURL(credentialURL, baseURL);
String viewState = MobileBKUHelper.extractValueFromTagWithParam(
- responseData, "input", "name", "javax.faces.ViewState", "value"); // // // //
+ responseData, "input", "name", "javax.faces.ViewState", "value");
String sessionID = null;
- int si = credentialURL.indexOf("jsessionid="); //
+ int si = credentialURL.indexOf("jsessionid=");
if (si != -1)
sessionID = credentialURL.substring(si + 11);
else
sessionID = status.sessionID;
- log.info("credentialURL: " + credentialURL); //
- log.info("sessionID: " + sessionID); //
- log.info("viewState: " + viewState); //
+ log.info("credentialURL: " + credentialURL);
+ log.info("sessionID: " + sessionID);
+ log.info("viewState: " + viewState);
status.baseURL = credentialURL;
if (sessionID != null)
@@ -103,17 +103,17 @@ public class IAIKHandler extends MobileBKUHandler {
HttpClient client = MobileBKUHelper.getHttpClient(status);
PostMethod post = new PostMethod(status.ensureSessionID(status.baseURL));
- post.getParams().setContentCharset("utf-8"); //
+ post.getParams().setContentCharset("utf-8");
post.addParameter("javax.faces.ViewState", status.viewState);
post.addParameter("userCredLogon:phoneNr", status.phoneNumber);
post.addParameter("userCredLogon:pwd", status.mobilePassword);
- post.addParameter("userCredLogon:logonButton", "userCredLogon:logonButton"); // //
- post.addParameter("javax.faces.partial.ajax", "true"); // //
- post.addParameter("javax.faces.source", "userCredLogon:logonButton"); // //
- post.addParameter("javax.faces.partial.execute", "@all"); // //
- post.addParameter("javax.faces.partial.render", "userCredLogon:userCredentialLogonPanel"); // //
- post.addParameter("userCredLogon", "userCredLogon"); // //
- post.addParameter("userCredLogon:j_idt33_input", "de"); // //
+ post.addParameter("userCredLogon:logonButton", "userCredLogon:logonButton");
+ post.addParameter("javax.faces.partial.ajax", "true");
+ post.addParameter("javax.faces.source", "userCredLogon:logonButton");
+ post.addParameter("javax.faces.partial.execute", "@all");
+ post.addParameter("javax.faces.partial.render", "userCredLogon:userCredentialLogonPanel");
+ post.addParameter("userCredLogon", "userCredLogon");
+ post.addParameter("userCredLogon:j_idt33_input", "de");
return executePost(client, post);
}
@@ -130,14 +130,14 @@ public class IAIKHandler extends MobileBKUHandler {
status.errorMessage = null;
- if (!responseData.contains("redirection_url")) { //
+ if (!responseData.contains("redirection_url")) {
// Assume that an error occurred
String errorMessage;
try {
- errorMessage = MobileBKUHelper.extractSubstring(responseData, ":errorMessage\">", "</span>"); // //
+ errorMessage = MobileBKUHelper.extractSubstring(responseData, ":errorMessage\">", "</span>");
} catch (Exception e) {
- errorMessage = Messages.getString("error.Unexpected"); //
+ errorMessage = Messages.getString("error.Unexpected");
}
status.errorMessage = errorMessage;
@@ -149,7 +149,7 @@ public class IAIKHandler extends MobileBKUHandler {
HttpClient client = MobileBKUHelper.getHttpClient(status);
String redirectURL = MobileBKUHelper.extractSubstring(responseData,
- "\"redirection_url\":\"", "\""); // //
+ "\"redirection_url\":\"", "\"");
URL baseURL = new URL(status.baseURL);
redirectURL = MobileBKUHelper.getQualifiedURL(redirectURL, baseURL);
@@ -157,7 +157,7 @@ public class IAIKHandler extends MobileBKUHandler {
responseData = getRedirect(client, redirectURL);
- if (responseData.contains("sl:InfoboxReadResponse")) { //
+ if (responseData.contains("sl:InfoboxReadResponse")) {
// credentials ok! InfoboxReadResponse
getSigningState().setSignatureResponse(
new SLResponse(responseData, status.server, null, null));
@@ -167,23 +167,23 @@ public class IAIKHandler extends MobileBKUHandler {
if (responseData.contains("tanCodeLogon"))
{
refVal = MobileBKUHelper.extractContentFromTagWithParam(responseData,
- "span", "id", "tanCodeLogon:refValue"); // // //
+ "span", "id", "tanCodeLogon:refValue");
}
else
{
refVal = MobileBKUHelper.extractContentFromTagWithParam(responseData,
- "span", "id", "j_idt5:refValue"); // // //
+ "span", "id", "j_idt5:refValue");
}
- if (responseData.contains("/error")) { //
+ if (responseData.contains("/error")) {
// Error response - try again
String errorMessage = MobileBKUHelper.extractContentFromTagWithParam(
- responseData, "div", "id", "errorPanel:panel_content"); // // //
- if (errorMessage.contains("<br />")) //
- errorMessage = errorMessage.substring(0, errorMessage.indexOf("<br />")); //
- errorMessage.replace("\n", " "); // //
+ responseData, "div", "id", "errorPanel:panel_content");
+ if (errorMessage.contains("<br />"))
+ errorMessage = errorMessage.substring(0, errorMessage.indexOf("<br />"));
+ errorMessage.replace("\n", " ");
status.errorMessage = errorMessage;
status.mobilePassword = null;
@@ -194,29 +194,29 @@ public class IAIKHandler extends MobileBKUHandler {
String viewState = MobileBKUHelper.extractValueFromTagWithParam(
- responseData, "input", "name", "javax.faces.ViewState", "value"); // // // //
+ responseData, "input", "name", "javax.faces.ViewState", "value");
status.viewState = viewState;
- if (!responseData.contains("tanCodeLogon.jsf")) { //
+ if (!responseData.contains("tanCodeLogon.jsf")) {
// Assume that we need to confirm reference value dialog
- log.debug("viewState: " + viewState); //
+ log.debug("viewState: " + viewState);
PostMethod post = new PostMethod(redirectURL);
- post.getParams().setContentCharset("utf-8"); //
- post.addParameter("javax.faces.partial.ajax", "true"); // //
- post.addParameter("javax.faces.source", "j_idt5:yesButton"); // //
- post.addParameter("javax.faces.partial.execute", "@all"); // //
- post.addParameter("j_idt5:yesButton", "j_idt5:yesButton"); // //
- post.addParameter("j_idt5", "j_idt5"); // //
- post.addParameter("javax.faces.ViewState", status.viewState); //
+ post.getParams().setContentCharset("utf-8");
+ post.addParameter("javax.faces.partial.ajax", "true");
+ post.addParameter("javax.faces.source", "j_idt5:yesButton");
+ post.addParameter("javax.faces.partial.execute", "@all");
+ post.addParameter("j_idt5:yesButton", "j_idt5:yesButton");
+ post.addParameter("j_idt5", "j_idt5");
+ post.addParameter("javax.faces.ViewState", status.viewState);
responseData = executePost(client, post);
- log.debug("Response: " + responseData); //
- if (responseData.contains("/error")) { //
+ log.debug("Response: " + responseData);
+ if (responseData.contains("/error")) {
// Error response - try again
- String errorMessage = Messages.getString("error.Unexpected"); //
+ String errorMessage = Messages.getString("error.Unexpected");
status.errorMessage = errorMessage;
status.mobilePassword = null;
@@ -224,7 +224,7 @@ public class IAIKHandler extends MobileBKUHandler {
}
redirectURL = MobileBKUHelper.extractSubstring(responseData,
- "redirect url=\"", "\""); // //
+ "redirect url=\"", "\"");
baseURL = new URL(status.baseURL);
redirectURL = MobileBKUHelper.getQualifiedURL(redirectURL, baseURL);
redirectURL = status.ensureSessionID(redirectURL);
@@ -232,27 +232,27 @@ public class IAIKHandler extends MobileBKUHandler {
responseData = getRedirect(client, redirectURL);
viewState = MobileBKUHelper.extractValueFromTagWithParam(
- responseData, "input", "name", "javax.faces.ViewState", "value"); // // // //
+ responseData, "input", "name", "javax.faces.ViewState", "value");
status.viewState = viewState;
}
signatureDataURL = status.baseURL;
signatureDataURL = signatureDataURL.substring(0, signatureDataURL.lastIndexOf('/') + 1);
- signatureDataURL += "viewer.jsf" + //
- MobileBKUHelper.extractSubstring(responseData, "viewer.jsf", "\""); // //
- signatureDataURL += (signatureDataURL.contains("?") ? "&" : "?") + // // //
- "pdfoversessionid=" + status.sessionID; //
+ signatureDataURL += "viewer.jsf" +
+ MobileBKUHelper.extractSubstring(responseData, "viewer.jsf", "\"");
+ signatureDataURL += (signatureDataURL.contains("?") ? "&" : "?") +
+ "pdfoversessionid=" + status.sessionID;
String tanURL = MobileBKUHelper.extractValueFromTagWithParam(responseData,
- "form", "name", "tanCodeLogon", "action"); // // // //
+ "form", "name", "tanCodeLogon", "action");
baseURL = new URL(status.baseURL);
tanURL = MobileBKUHelper.getQualifiedURL(tanURL, baseURL);
tanURL = status.ensureSessionID(tanURL);
- log.debug("reference value: " + refVal); //
- log.debug("signatureDataURL: " + signatureDataURL); //
- log.debug("tanURL: " + tanURL); //
- log.debug("viewState: " + viewState); //
+ log.debug("reference value: " + refVal);
+ log.debug("signatureDataURL: " + signatureDataURL);
+ log.debug("tanURL: " + tanURL);
+ log.debug("viewState: " + viewState);
status.refVal = refVal;
status.signatureDataURL = signatureDataURL;
@@ -270,12 +270,12 @@ public class IAIKHandler extends MobileBKUHandler {
HttpClient client = MobileBKUHelper.getHttpClient(status);
PostMethod post = new PostMethod(status.baseURL);
- post.getParams().setContentCharset("utf-8"); //
- post.addParameter("javax.faces.ViewState", status.viewState); //
- post.addParameter("tanCodeLogon", "tanCodeLogon"); // //
- post.addParameter("tanCodeLogon:signButton", ""); // //
- post.addParameter("tanCodeLogon:authCode", status.tan); //
- post.addParameter("referenceValue", status.refVal); //
+ post.getParams().setContentCharset("utf-8");
+ post.addParameter("javax.faces.ViewState", status.viewState);
+ post.addParameter("tanCodeLogon", "tanCodeLogon");
+ post.addParameter("tanCodeLogon:signButton", "");
+ post.addParameter("tanCodeLogon:authCode", status.tan);
+ post.addParameter("referenceValue", status.refVal);
return executePost(client, post);
}
@@ -287,14 +287,14 @@ public class IAIKHandler extends MobileBKUHandler {
public void handleTANResponse(String responseData) throws Exception {
final IAIKStatus status = getStatus();
status.errorMessage = null;
- if (responseData.contains("sl:CreateCMSSignatureResponse xmlns:sl")) { //
+ if (responseData.contains("sl:CreateCMSSignatureResponse xmlns:sl")) {
// success
getSigningState().setSignatureResponse(
new SLResponse(responseData, status.server, null, null));
} else {
try {
String errorMessage = MobileBKUHelper.extractContentFromTagWithParam(
- responseData, "p", "class", "ui-messages-error ui-messages-error-signing"); // // //
+ responseData, "p", "class", "ui-messages-error ui-messages-error-signing");
status.errorMessage = errorMessage;
log.error(errorMessage);
@@ -303,21 +303,21 @@ public class IAIKHandler extends MobileBKUHandler {
HttpClient client = MobileBKUHelper.getHttpClient(status);
PostMethod post = new PostMethod(status.baseURL);
- post.getParams().setContentCharset("utf-8"); //
- post.addParameter("javax.faces.partial.ajax", "true"); // //
- post.addParameter("javax.faces.source", "tanCodeLogon:backbutton"); // //
- post.addParameter("javax.faces.partial.execute", "@all"); // //
- post.addParameter("javax.faces.partial.render", "tanCodeLogon:tanCodeLogonPanel"); // //
- post.addParameter("tanCodeLogon:backbutton", "tanCodeLogon:backbutton"); // //
- post.addParameter("tanCodeLogon", "tanCodeLogon"); // //
- post.addParameter("javax.faces.ViewState", status.viewState); //
+ post.getParams().setContentCharset("utf-8");
+ post.addParameter("javax.faces.partial.ajax", "true");
+ post.addParameter("javax.faces.source", "tanCodeLogon:backbutton");
+ post.addParameter("javax.faces.partial.execute", "@all");
+ post.addParameter("javax.faces.partial.render", "tanCodeLogon:tanCodeLogonPanel");
+ post.addParameter("tanCodeLogon:backbutton", "tanCodeLogon:backbutton");
+ post.addParameter("tanCodeLogon", "tanCodeLogon");
+ post.addParameter("javax.faces.ViewState", status.viewState);
executePost(client, post);
} catch (Exception e) {
// Assume that wrong TAN was entered too many times
Display.getDefault().syncExec(() -> {
- Dialog dialog = new Dialog(IAIKHandler.this.shell, Messages.getString("common.warning"), //
- Messages.getString("mobileBKU.tan_tries_exceeded"), //
+ Dialog dialog = new Dialog(IAIKHandler.this.shell, Messages.getString("common.warning"),
+ Messages.getString("mobileBKU.tan_tries_exceeded"),
BUTTONS.OK_CANCEL, ICON.QUESTION);
// TODO: ALSO A COLOSSAL HACK HERE
if (dialog.open() == SWT.CANCEL) {
@@ -339,7 +339,7 @@ public class IAIKHandler extends MobileBKUHandler {
private String getRedirect(HttpClient client, String redirectURL) throws HttpException, IOException {
redirectURL = getStatus().ensureSessionID(redirectURL);
- log.debug("Sending get request to URL " + redirectURL); //
+ log.debug("Sending get request to URL " + redirectURL);
GetMethod get = new GetMethod(redirectURL);
int returnCode = client.executeMethod(get);
@@ -347,7 +347,7 @@ public class IAIKHandler extends MobileBKUHandler {
throw new HttpException(HttpStatus.getStatusText(returnCode));
}
String responseData = get.getResponseBodyAsString();
- log.debug("Response: " + responseData); //
+ log.debug("Response: " + responseData);
return responseData;
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKStatus.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKStatus.java
index 3f093ce2..cb131012 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKStatus.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKStatus.java
@@ -56,11 +56,11 @@ public class IAIKStatus extends MobileBKUStatus {
@Override
public String ensureSessionID(String url)
{
- if (url.contains("jsessionid=")) //
+ if (url.contains("jsessionid="))
return url;
if (this.sessionID != null)
- url += ";jsessionid=" + this.sessionID; //
+ url += ";jsessionid=" + this.sessionID;
return url;
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHandler.java
index 8268f6f5..696f75fe 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHandler.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHandler.java
@@ -79,14 +79,14 @@ public abstract class MobileBKUHandler {
sl_request = request.getRequest();
if (useBase64Request())
{
- post.addParameter("XMLRequest", sl_request); //
+ post.addParameter("XMLRequest", sl_request);
} else {
StringPart xmlpart = new StringPart(
- "XMLRequest", sl_request, "UTF-8"); // //
+ "XMLRequest", sl_request, "UTF-8");
- FilePart filepart = new FilePart("fileupload", //
+ FilePart filepart = new FilePart("fileupload",
new FileUploadSource(request.getSignatureData()),
- "application/pdf", "UTF-8"); // //
+ "application/pdf", "UTF-8");
Part[] parts = { xmlpart, filepart };
@@ -95,9 +95,9 @@ public abstract class MobileBKUHandler {
}
} else {
sl_request = request.getRequest();
- post.addParameter("XMLRequest", sl_request); //
+ post.addParameter("XMLRequest", sl_request);
}
- log.trace("SL Request: " + sl_request); //
+ log.trace("SL Request: " + sl_request);
state.status.baseURL = MobileBKUHelper.stripQueryString(mobileBKUUrl);
@@ -176,15 +176,15 @@ public abstract class MobileBKUHandler {
ByteArrayOutputStream os = new ByteArrayOutputStream();
post.getRequestEntity().writeRequest(os);
req = os.toString();
- if (req.contains("passwort=")) //
- req = req.replaceAll("passwort=[^&]*", "passwort=******"); // //
- if (req.contains(":pwd=")) //
- req = req.replaceAll(":pwd=[^&]*", ":pwd=******"); // //
+ if (req.contains("passwort="))
+ req = req.replaceAll("passwort=[^&]*", "passwort=******");
+ if (req.contains(":pwd="))
+ req = req.replaceAll(":pwd=[^&]*", ":pwd=******");
os.close();
} else {
- req = post.getRequestEntity().getContentLength() + " bytes"; //
+ req = post.getRequestEntity().getContentLength() + " bytes";
}
- log.debug("Posting to " + post.getURI() + ": " + req); // //
+ log.debug("Posting to " + post.getURI() + ": " + req);
}
int returnCode = client.executeMethod(post);
@@ -202,12 +202,12 @@ public abstract class MobileBKUHandler {
if (returnCode == HttpStatus.SC_MOVED_TEMPORARILY ||
returnCode == HttpStatus.SC_MOVED_PERMANENTLY) {
- Header locationHeader = post.getResponseHeader("location"); //
+ Header locationHeader = post.getResponseHeader("location");
if (locationHeader != null) {
redirectLocation = locationHeader.getValue();
} else {
throw new IOException(
- "Got HTTP 302 but no location to follow!"); //
+ "Got HTTP 302 but no location to follow!");
}
} else if (returnCode == HttpStatus.SC_OK) {
if (get != null) {
@@ -225,12 +225,12 @@ public abstract class MobileBKUHandler {
server = serverHeader.getValue();
}
redirectLocation = null;
- String p = "<meta [^>]*http-equiv=\"refresh\" [^>]*content=\"([^\"]*)\""; //
+ String p = "<meta [^>]*http-equiv=\"refresh\" [^>]*content=\"([^\"]*)\"";
Pattern pat = Pattern.compile(p);
Matcher m = pat.matcher(responseData);
if (m.find()) {
String content = m.group(1);
- int start = content.indexOf("URL="); //
+ int start = content.indexOf("URL=");
if (start != -1) {
start += 9;
redirectLocation = content.substring(start, content.length() - 5);
@@ -244,7 +244,7 @@ public abstract class MobileBKUHandler {
if (redirectLocation != null) {
redirectLocation = MobileBKUHelper.getQualifiedURL(redirectLocation, new URL(post.getURI().toString()));
redirectLocation = getStatus().ensureSessionID(redirectLocation);
- log.debug("Redirected to " + redirectLocation); //
+ log.debug("Redirected to " + redirectLocation);
get = new GetMethod(redirectLocation);
get.setFollowRedirects(true);
returnCode = client.executeMethod(get);
@@ -253,7 +253,7 @@ public abstract class MobileBKUHandler {
getStatus().server = server;
if (server != null)
- log.info("Server: " + server); //
+ log.info("Server: " + server);
return responseData;
}
@@ -266,7 +266,7 @@ public abstract class MobileBKUHandler {
* @throws IOException IO error
*/
protected String executeGet(HttpClient client, GetMethod get) throws IOException {
- log.debug("Getting " + get.getURI()); //
+ log.debug("Getting " + get.getURI());
int returnCode = client.executeMethod(get);
@@ -284,12 +284,12 @@ public abstract class MobileBKUHandler {
if (returnCode == HttpStatus.SC_MOVED_TEMPORARILY ||
returnCode == HttpStatus.SC_MOVED_PERMANENTLY) {
- Header locationHeader = get.getResponseHeader("location"); //
+ Header locationHeader = get.getResponseHeader("location");
if (locationHeader != null) {
redirectLocation = locationHeader.getValue();
} else {
throw new IOException(
- "Got HTTP 302 but no location to follow!"); //
+ "Got HTTP 302 but no location to follow!");
}
} else if (returnCode == HttpStatus.SC_OK) {
if (get2 != null) {
@@ -307,12 +307,12 @@ public abstract class MobileBKUHandler {
server = serverHeader.getValue();
}
redirectLocation = null;
- String p = "<meta [^>]*http-equiv=\"refresh\" [^>]*content=\"([^\"]*)\""; //
+ String p = "<meta [^>]*http-equiv=\"refresh\" [^>]*content=\"([^\"]*)\"";
Pattern pat = Pattern.compile(p);
Matcher m = pat.matcher(responseData);
if (m.find()) {
String content = m.group(1);
- int start = content.indexOf("URL="); //
+ int start = content.indexOf("URL=");
if (start != -1) {
start += 9;
redirectLocation = content.substring(start, content.length() - 5);
@@ -326,7 +326,7 @@ public abstract class MobileBKUHandler {
if (redirectLocation != null) {
redirectLocation = MobileBKUHelper.getQualifiedURL(redirectLocation, new URL(get.getURI().toString()));
redirectLocation = getStatus().ensureSessionID(redirectLocation);
- log.debug("Redirected to " + redirectLocation); //
+ log.debug("Redirected to " + redirectLocation);
get2 = new GetMethod(redirectLocation);
get2.setFollowRedirects(true);
returnCode = client.executeMethod(get2);
@@ -335,7 +335,7 @@ public abstract class MobileBKUHandler {
getStatus().server = server;
if (server != null)
- log.info("Server: " + server); //
+ log.info("Server: " + server);
return responseData;
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHelper.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHelper.java
index 6b9f0584..f2484afa 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHelper.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/MobileBKUHelper.java
@@ -52,7 +52,7 @@ public class MobileBKUHelper {
* +(countryCode)99999999999 00(countryCode)99999999999 099999999999
* 1030199999999999 (A-Trust Test bku)
*/
- private static final String NUMBER_REGEX = "^((\\+[\\d]{2})|(00[\\d]{2})|(0)|(10301))([1-9][\\d]+)$"; //
+ private static final String NUMBER_REGEX = "^((\\+[\\d]{2})|(00[\\d]{2})|(0)|(10301))([1-9][\\d]+)$";
/**
* Extracts a substring from data starting after start and ending with end
@@ -77,10 +77,10 @@ public class MobileBKUHelper {
return data.substring(startidx, endidx);
}
log.error("extracting substring: end not valid!: " + start + " ... " + end); ////
- throw new Exception("End string not available! Mobile BKU site changed?"); //
+ throw new Exception("End string not available! Mobile BKU site changed?");
}
log.error("extracting substring: start not valid!: " + start + " ... " + end); ////
- throw new Exception("Start string not available! Mobile BKU site changed?"); //
+ throw new Exception("Start string not available! Mobile BKU site changed?");
}
/**
@@ -105,16 +105,16 @@ public class MobileBKUHelper {
while ((startidx = data.indexOf(start, endidx)) != -1) {
endidx = data.indexOf('>', startidx);
if (endidx == -1) {
- log.error("extracting tag: unterminated tag! " + tag + " (" + param + "=" + value + ")"); //// // //
- throw new Exception("Tag not found! Mobile BKU site changed?"); //
+ log.error("extracting tag: unterminated tag! " + tag + " (" + param + "=" + value + ")"); ////
+ throw new Exception("Tag not found! Mobile BKU site changed?");
}
String found = data.substring(startidx, endidx + 1);
- if (found.contains(param + "='" + value + "'") || // //
- found.contains(param + "=\"" + value + "\"")) // //
+ if (found.contains(param + "='" + value + "'") ||
+ found.contains(param + "=\"" + value + "\""))
return found;
}
- log.info("extracting tag: not found!: " + tag + " (" + param + "='" + value + "')"); //// // //
- throw new Exception("Tag not found! Mobile BKU site changed?"); //
+ log.info("extracting tag: not found!: " + tag + " (" + param + "='" + value + "')"); ////
+ throw new Exception("Tag not found! Mobile BKU site changed?");
}
/**
@@ -139,14 +139,14 @@ public class MobileBKUHelper {
String found = extractTagWithParam(data, tag, param, value);
int startidx = found.indexOf(returnparam + '=');
if (startidx == -1) {
- log.error("extracting tag: param not found! " + tag + " (" + param + "=" + value + ") - " + returnparam); //// // //
- throw new Exception("Tag not found! Mobile BKU site changed?"); //
+ log.error("extracting tag: param not found! " + tag + " (" + param + "=" + value + ") - " + returnparam); ////
+ throw new Exception("Tag not found! Mobile BKU site changed?");
}
startidx += returnparam.length() + 1;
int endidx = found.indexOf(found.charAt(startidx), startidx + 1);
if (endidx == -1) {
- log.error("extracting tag: unterminated param value! " + tag + " (" + param + "=" + value + ") - " + returnparam); //// // //
- throw new Exception("Tag not found! Mobile BKU site changed?"); //
+ log.error("extracting tag: unterminated param value! " + tag + " (" + param + "=" + value + ") - " + returnparam); ////
+ throw new Exception("Tag not found! Mobile BKU site changed?");
}
return found.substring(startidx + 1, endidx);
}
@@ -187,10 +187,10 @@ public class MobileBKUHelper {
String param, String value) throws Exception {
String found = extractTagWithParam(data, tag, param, value);
int startidx = data.indexOf(found) + found.length();
- int endidx = data.indexOf("</" + tag + ">", startidx); // //
+ int endidx = data.indexOf("</" + tag + ">", startidx);
if (endidx == -1) {
- log.error("extracting tag: closing tag not found! " + tag + " (" + param + "=" + value + ")"); //// // //
- throw new Exception("Tag not found! Mobile BKU site changed?"); //
+ log.error("extracting tag: closing tag not found! " + tag + " (" + param + "=" + value + ")"); ////
+ throw new Exception("Tag not found! Mobile BKU site changed?");
}
return data.substring(startidx, endidx);
}
@@ -220,15 +220,15 @@ public class MobileBKUHelper {
String normalNumber = matcher.group(6);
- if (countryCode.equals("10301")) { //
+ if (countryCode.equals("10301")) {
// A-Trust Testnumber! Don't change
return number;
}
- countryCode = countryCode.replace("00", "+"); // //
+ countryCode = countryCode.replace("00", "+");
- if (countryCode.equals("0")) { //
- countryCode = "+43"; //
+ if (countryCode.equals("0")) {
+ countryCode = "+43";
}
return countryCode + normalNumber;
@@ -272,14 +272,14 @@ public class MobileBKUHelper {
* @return the fully qualified URL
*/
public static String getQualifiedURL(String fragment, URL base) {
- if (fragment.startsWith("http:") || fragment.startsWith("https:")) // //
+ if (fragment.startsWith("http:") || fragment.startsWith("https:"))
return fragment;
int p = base.getPort();
- String port = ((p != -1) && (p != base.getDefaultPort())) ? ":" + p : ""; // //
- if (fragment.startsWith("/")) { //
- return base.getProtocol() + "://" + base.getHost() + port + fragment; //
+ String port = ((p != -1) && (p != base.getDefaultPort())) ? ":" + p : "";
+ if (fragment.startsWith("/")) {
+ return base.getProtocol() + "://" + base.getHost() + port + fragment;
}
- return stripQueryString(base.toString()) + "/" + fragment; //
+ return stripQueryString(base.toString()) + "/" + fragment;
}
/**
@@ -287,8 +287,8 @@ public class MobileBKUHelper {
*/
@SuppressWarnings("deprecation")
public static void registerTrustedSocketFactory() {
- Protocol.registerProtocol("https", //
- new Protocol("https", new TrustedSocketFactory(), 443)); //
+ Protocol.registerProtocol("https",
+ new Protocol("https", new TrustedSocketFactory(), 443));
}
/**
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/SimpleXMLTrustManager.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/SimpleXMLTrustManager.java
index 08385456..f529d658 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/SimpleXMLTrustManager.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/SimpleXMLTrustManager.java
@@ -64,7 +64,7 @@ public class SimpleXMLTrustManager implements X509TrustManager {
public SimpleXMLTrustManager() throws Exception {
// create a "default" JSSE X509TrustManager.
- TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); //
+ TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
tmf.init((KeyStore) null);
TrustManager tms[] = tmf.getTrustManagers();
@@ -94,8 +94,8 @@ public class SimpleXMLTrustManager implements X509TrustManager {
NodeList certificateList = certificates.getChildNodes();
try {
- if (!certificates.getNodeName().equals("certificates")) { //
- throw new Exception("Used certificates xml is invalid! no certificates node"); //
+ if (!certificates.getNodeName().equals("certificates")) {
+ throw new Exception("Used certificates xml is invalid! no certificates node");
}
//add trusted certificates to certStore//
@@ -104,26 +104,26 @@ public class SimpleXMLTrustManager implements X509TrustManager {
Node certificateNode = certificateList.item(i);
- if (certificateNode.getNodeName().equals("#text")) { //
+ if (certificateNode.getNodeName().equals("#text")) {
continue; // Ignore dummy text node ..
}
- if (!certificateNode.getNodeName().equals("certificate")) { //
- log.warn("Ignoring XML node: " + certificateNode.getNodeName()); //
+ if (!certificateNode.getNodeName().equals("certificate")) {
+ log.warn("Ignoring XML node: " + certificateNode.getNodeName());
continue;
}
String certResource = Constants.RES_CERT_PATH + certificateNode.getTextContent();
- X509Certificate cert = (X509Certificate) CertificateFactory.getInstance("X509"). //
+ X509Certificate cert = (X509Certificate) CertificateFactory.getInstance("X509").
generateCertificate(this.getClass().getResourceAsStream(certResource));
myKeyStore.setCertificateEntry(certificateNode.getTextContent(), cert);
- log.debug("Loaded certificate : " + certResource); //
+ log.debug("Loaded certificate : " + certResource);
} catch (Exception ex) {
- log.error("Failed to load certificate [" + "]", ex); // //
+ log.error("Failed to load certificate [" + "]", ex);
}
}
@@ -156,7 +156,7 @@ public class SimpleXMLTrustManager implements X509TrustManager {
* Find some other way to initialize, or else we have to fail the
* constructor.
*/
- throw new Exception("Couldn't initialize ASITTrustManager"); //
+ throw new Exception("Couldn't initialize ASITTrustManager");
}
/*
@@ -174,7 +174,7 @@ public class SimpleXMLTrustManager implements X509TrustManager {
try {
this.sunJSSEX509TrustManager.checkClientTrusted(arg0, arg1);
} catch (CertificateException ex2) {
- log.info("checkClientTrusted: ", ex2); //
+ log.info("checkClientTrusted: ", ex2);
throw ex2;
}
}
@@ -195,7 +195,7 @@ public class SimpleXMLTrustManager implements X509TrustManager {
try {
this.sunJSSEX509TrustManager.checkServerTrusted(arg0, arg1);
} catch (CertificateException ex2) {
- log.info("checkServerTrusted: ", ex2); //
+ log.info("checkServerTrusted: ", ex2);
throw ex2;
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/TrustedSocketFactory.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/TrustedSocketFactory.java
index ff9b48a0..6f306cdd 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/TrustedSocketFactory.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/TrustedSocketFactory.java
@@ -49,15 +49,15 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory {
.getLogger(TrustedSocketFactory.class);
private static final String ENABLED_CS[] = {
- "TLS_RSA_WITH_AES_128_CBC_SHA", //
- "SSL_RSA_WITH_RC4_128_SHA", //
- "SSL_RSA_WITH_3DES_EDE_CBC_SHA", //
- "SSL_RSA_WITH_RC4_128_MD5" //
+ "TLS_RSA_WITH_AES_128_CBC_SHA",
+ "SSL_RSA_WITH_RC4_128_SHA",
+ "SSL_RSA_WITH_3DES_EDE_CBC_SHA",
+ "SSL_RSA_WITH_RC4_128_MD5"
};
private static SSLSocketFactory getFactory() throws NoSuchAlgorithmException,
KeyManagementException, Exception {
- SSLContext sslContext = SSLContext.getInstance("TLS"); //
+ SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(null, new TrustManager[] { new SimpleXMLTrustManager() },
new java.security.SecureRandom());
@@ -80,14 +80,14 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory {
sslSocket.setEnabledCipherSuites(ENABLED_CS);
return sslSocket;
} catch (Exception ex) {
- log.error("TrustedSocketFactory: ", ex); //
+ log.error("TrustedSocketFactory: ", ex);
if (ex instanceof IOException) {
throw (IOException) ex;
} else if (ex instanceof UnknownHostException) {
throw (UnknownHostException) ex;
} else {
throw new IOException(
- Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); //
+ Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex);
}
}
}
@@ -108,14 +108,14 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory {
sslSocket.setEnabledCipherSuites(ENABLED_CS);
return sslSocket;
} catch (Exception ex) {
- log.error("TrustedSocketFactory: ", ex); //
+ log.error("TrustedSocketFactory: ", ex);
if (ex instanceof IOException) {
throw (IOException) ex;
} else if (ex instanceof UnknownHostException) {
throw (UnknownHostException) ex;
} else {
throw new IOException(
- Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); //
+ Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex);
}
}
}
@@ -134,7 +134,7 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory {
UnknownHostException, ConnectTimeoutException {
try {
if (params == null) {
- throw new IllegalArgumentException("Parameters may not be null"); //
+ throw new IllegalArgumentException("Parameters may not be null");
}
int timeout = params.getConnectionTimeout();
SSLSocket sslSocket = null;
@@ -154,14 +154,14 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory {
sslSocket.setEnabledCipherSuites(ENABLED_CS);
return sslSocket;
} catch (Exception ex) {
- log.error("TrustedSocketFactory: ", ex); //
+ log.error("TrustedSocketFactory: ", ex);
if (ex instanceof IOException) {
throw (IOException) ex;
} else if (ex instanceof UnknownHostException) {
throw (UnknownHostException) ex;
} else {
throw new IOException(
- Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); //
+ Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex);
}
}
}
@@ -177,14 +177,14 @@ public class TrustedSocketFactory implements SecureProtocolSocketFactory {
sslSocket.setEnabledCipherSuites(ENABLED_CS);
return sslSocket;
} catch (Exception ex) {
- log.error("TrustedSocketFactory: ", ex); //
+ log.error("TrustedSocketFactory: ", ex);
if (ex instanceof IOException) {
throw (IOException) ex;
} else if (ex instanceof UnknownHostException) {
throw (UnknownHostException) ex;
} else {
throw new IOException(
- Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex); //
+ Messages.getString("TrustedSocketFactory.FailedToCreateSecureConnection"), ex);
}
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java
index 54ccbb48..42ddfec7 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java
@@ -84,7 +84,7 @@ public class ArgumentHandler {
this.cliArguments.put(commandOptions[i], arg);
}
} catch (Exception e) {
- log.error("Error instantiating CLI argument" , e); //
+ log.error("Error instantiating CLI argument" , e);
}
}
@@ -101,8 +101,8 @@ public class ArgumentHandler {
i = this.cliArguments.get(args[i]).handleArgument(args, i, this);
} else {
// Assume we got the document we want to sign
- if (this.cliArguments.containsKey("-i")) { //
- i = this.cliArguments.get("-i").handleArgument(args, i-1, this); //
+ if (this.cliArguments.containsKey("-i")) {
+ i = this.cliArguments.get("-i").handleArgument(args, i-1, this);
}
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/AutomaticPositioningArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/AutomaticPositioningArgument.java
index 29ce09cb..b2a54ee5 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/AutomaticPositioningArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/AutomaticPositioningArgument.java
@@ -26,7 +26,7 @@ public class AutomaticPositioningArgument extends Argument {
* Constructor
*/
public AutomaticPositioningArgument() {
- super(new String[] { "-a" }, "argument.help.autopos"); // //
+ super(new String[] { "-a" }, "argument.help.autopos");
}
/*
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java
index 8760438a..689462b2 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java
@@ -28,7 +28,7 @@ public class BKUArgument extends Argument {
*/
public BKUArgument() {
super(
- new String[] { "-b" }, "argument.help.bku"); // //
+ new String[] { "-b" }, "argument.help.bku");
}
/*
@@ -54,11 +54,11 @@ public class BKUArgument extends Argument {
}
} catch (Exception ex) {
throw new InitializationException(
- Messages.getString("argument.invalid.bku") + this.getHelpText(), ex); //
+ Messages.getString("argument.invalid.bku") + this.getHelpText(), ex);
}
throw new InitializationException(
- Messages.getString("argument.invalid.bku") + this.getHelpText(), null); //
+ Messages.getString("argument.invalid.bku") + this.getHelpText(), null);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java
index d7fa5de4..29728caa 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java
@@ -36,7 +36,7 @@ public class ConfigFileArgument extends Argument {
* Constructor
*/
public ConfigFileArgument() {
- super(new String[] {"-c"}, "argument.help.config"); // //
+ super(new String[] {"-c"}, "argument.help.config");
}
/* (non-Javadoc)
@@ -56,13 +56,13 @@ public class ConfigFileArgument extends Argument {
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Configuration File Argument invalid!", ex); //
+ log.error("Configuration File Argument invalid!", ex);
throw new InitializationException(
- Messages.getString("argument.invalid.config") + this.getHelpText(), ex); //
+ Messages.getString("argument.invalid.config") + this.getHelpText(), ex);
}
throw new InitializationException(
- Messages.getString("argument.invalid.config") + this.getHelpText(), null); //
+ Messages.getString("argument.invalid.config") + this.getHelpText(), null);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java
index cc0b15ca..4acfe73e 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java
@@ -33,7 +33,7 @@ public class EmblemArgument extends Argument {
* Constructor
*/
public EmblemArgument() {
- super(new String[] {"-e"}, "argument.help.emblem"); // //
+ super(new String[] {"-e"}, "argument.help.emblem");
}
/**
@@ -65,13 +65,13 @@ public class EmblemArgument extends Argument {
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Emblem argument invalid!", ex); //
+ log.error("Emblem argument invalid!", ex);
throw new InitializationException(
- Messages.getString("argument.invalid.emblem") + this.getHelpText(), ex); //
+ Messages.getString("argument.invalid.emblem") + this.getHelpText(), ex);
}
throw new InitializationException(
- Messages.getString("argument.invalid.emblem") + this.getHelpText(), null); //
+ Messages.getString("argument.invalid.emblem") + this.getHelpText(), null);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java
index cdcc7a32..241223af 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java
@@ -31,8 +31,8 @@ public class HelpArgument extends Argument {
* Constructor
*/
public HelpArgument() {
- super(new String[] {"-h", "-?", "--help" }, // // //
- "argument.help.help"); //
+ super(new String[] {"-h", "-?", "--help" },
+ "argument.help.help");
}
/* (non-Javadoc)
@@ -46,7 +46,7 @@ public class HelpArgument extends Argument {
Iterator<Argument> argumentIterator = arguments.iterator();
- System.out.println(Messages.getString("argument.info.help")); //
+ System.out.println(Messages.getString("argument.info.help"));
while(argumentIterator.hasNext()) {
Argument argument = argumentIterator.next();
@@ -56,12 +56,12 @@ public class HelpArgument extends Argument {
sb.append(argument.getCommandOptions()[i]);
if(i < argument.getCommandOptions().length -1) {
- sb.append(", "); //
+ sb.append(", ");
}
}
- System.out.println(sb.toString() + ":"); //
- System.out.println("\t" + argument.getHelpText()); //
+ System.out.println(sb.toString() + ":");
+ System.out.println("\t" + argument.getHelpText());
}
handler.setRequireExit(true);
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java
index 6b62fb83..b2238dc9 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java
@@ -33,7 +33,7 @@ public class InputDocumentArgument extends Argument {
* Constructor
*/
public InputDocumentArgument() {
- super(new String[] {"-i"}, "argument.help.input"); // //
+ super(new String[] {"-i"}, "argument.help.input");
}
/**
@@ -65,13 +65,13 @@ public class InputDocumentArgument extends Argument {
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Document to sign argument invalid!", ex); //
+ log.error("Document to sign argument invalid!", ex);
throw new InitializationException(
- Messages.getString("argument.invalid.input") + this.getHelpText(), ex); //
+ Messages.getString("argument.invalid.input") + this.getHelpText(), ex);
}
throw new InitializationException(
- Messages.getString("argument.invalid.input") + this.getHelpText(), null); //
+ Messages.getString("argument.invalid.input") + this.getHelpText(), null);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java
index cf87865c..380f8e0e 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java
@@ -32,7 +32,7 @@ public class InvisibleProfile extends Argument {
* Constructor
*/
public InvisibleProfile() {
- super(new String[] {"-v"}, "argument.help.vis"); // //
+ super(new String[] {"-v"}, "argument.help.vis");
}
/**
@@ -58,13 +58,13 @@ public class InvisibleProfile extends Argument {
}
} catch (Exception ex) {
- log.error("Signature Profile Visibilty Error", ex); //
+ log.error("Signature Profile Visibilty Error", ex);
throw new InitializationException(
- Messages.getString("argument.invalid.vis") + this.getHelpText(), ex); //
+ Messages.getString("argument.invalid.vis") + this.getHelpText(), ex);
}
throw new InitializationException(
- Messages.getString("argument.invalid.vis") + this.getHelpText(), null); //
+ Messages.getString("argument.invalid.vis") + this.getHelpText(), null);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreAliasArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreAliasArgument.java
index 558c3555..eb07536b 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreAliasArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreAliasArgument.java
@@ -30,7 +30,7 @@ public class KeystoreAliasArgument extends Argument {
* Constructor
*/
public KeystoreAliasArgument() {
- super(new String[] {"-ksalias"}, "argument.help.keystorealias"); // //
+ super(new String[] {"-ksalias"}, "argument.help.keystorealias");
}
/**
@@ -56,13 +56,13 @@ public class KeystoreAliasArgument extends Argument {
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Keystore alias argument invalid!", ex); //
+ log.error("Keystore alias argument invalid!", ex);
throw new InitializationException(
- Messages.getString("argument.invalid.keystorealias") + this.getHelpText(), ex); //
+ Messages.getString("argument.invalid.keystorealias") + this.getHelpText(), ex);
}
throw new InitializationException(
- Messages.getString("argument.invalid.keystorealias") + this.getHelpText(), null); //
+ Messages.getString("argument.invalid.keystorealias") + this.getHelpText(), null);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreFileArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreFileArgument.java
index 596bdafc..2b7929fb 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreFileArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreFileArgument.java
@@ -33,7 +33,7 @@ public class KeystoreFileArgument extends Argument {
* Constructor
*/
public KeystoreFileArgument() {
- super(new String[] {"-ks"}, "argument.help.keystorefile"); // //
+ super(new String[] {"-ks"}, "argument.help.keystorefile");
}
/**
@@ -64,13 +64,13 @@ public class KeystoreFileArgument extends Argument {
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Keystore file argument invalid!", ex); //
+ log.error("Keystore file argument invalid!", ex);
throw new InitializationException(
- Messages.getString("argument.invalid.keystorefile") + this.getHelpText(), ex); //
+ Messages.getString("argument.invalid.keystorefile") + this.getHelpText(), ex);
}
throw new InitializationException(
- Messages.getString("argument.invalid.keystorefile") + this.getHelpText(), null); //
+ Messages.getString("argument.invalid.keystorefile") + this.getHelpText(), null);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreKeyPassArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreKeyPassArgument.java
index 55324a08..54a3529b 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreKeyPassArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreKeyPassArgument.java
@@ -30,7 +30,7 @@ public class KeystoreKeyPassArgument extends Argument {
* Constructor
*/
public KeystoreKeyPassArgument() {
- super(new String[] {"-kskeypass"}, "argument.help.keystorekeypass"); // //
+ super(new String[] {"-kskeypass"}, "argument.help.keystorekeypass");
}
/**
@@ -56,13 +56,13 @@ public class KeystoreKeyPassArgument extends Argument {
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Keystore key password argument invalid!", ex); //
+ log.error("Keystore key password argument invalid!", ex);
throw new InitializationException(
- Messages.getString("argument.invalid.keystorekeypass") + this.getHelpText(), ex); //
+ Messages.getString("argument.invalid.keystorekeypass") + this.getHelpText(), ex);
}
throw new InitializationException(
- Messages.getString("argument.invalid.keystorekeypass") + this.getHelpText(), null); //
+ Messages.getString("argument.invalid.keystorekeypass") + this.getHelpText(), null);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreStorePassArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreStorePassArgument.java
index a9f2b3d8..440b8a3f 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreStorePassArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreStorePassArgument.java
@@ -30,7 +30,7 @@ public class KeystoreStorePassArgument extends Argument {
* Constructor
*/
public KeystoreStorePassArgument() {
- super(new String[] {"-kspass"}, "argument.help.keystorestorepass"); // //
+ super(new String[] {"-kspass"}, "argument.help.keystorestorepass");
}
/**
@@ -56,13 +56,13 @@ public class KeystoreStorePassArgument extends Argument {
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Keystore password argument invalid!", ex); //
+ log.error("Keystore password argument invalid!", ex);
throw new InitializationException(
- Messages.getString("argument.invalid.keystorestorepass") + this.getHelpText(), ex); //
+ Messages.getString("argument.invalid.keystorestorepass") + this.getHelpText(), ex);
}
throw new InitializationException(
- Messages.getString("argument.invalid.keystorestorepass") + this.getHelpText(), null); //
+ Messages.getString("argument.invalid.keystorestorepass") + this.getHelpText(), null);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreTypeArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreTypeArgument.java
index b949cc40..1e2f4918 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreTypeArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/KeystoreTypeArgument.java
@@ -30,7 +30,7 @@ public class KeystoreTypeArgument extends Argument {
* Constructor
*/
public KeystoreTypeArgument() {
- super(new String[] {"-kstype"}, "argument.help.keystoretype"); // //
+ super(new String[] {"-kstype"}, "argument.help.keystoretype");
}
/**
@@ -56,13 +56,13 @@ public class KeystoreTypeArgument extends Argument {
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Keystore type argument invalid!", ex); //
+ log.error("Keystore type argument invalid!", ex);
throw new InitializationException(
- Messages.getString("argument.invalid.keystoretype") + this.getHelpText(), ex); //
+ Messages.getString("argument.invalid.keystoretype") + this.getHelpText(), ex);
}
throw new InitializationException(
- Messages.getString("argument.invalid.keystoretype") + this.getHelpText(), null); //
+ Messages.getString("argument.invalid.keystoretype") + this.getHelpText(), null);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java
index 2ac80cd1..e81502a0 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java
@@ -30,7 +30,7 @@ public class OutputFolderArgument extends Argument {
* Constructor
*/
public OutputFolderArgument() {
- super(new String[] {"-o"}, "argument.help.output"); // //
+ super(new String[] {"-o"}, "argument.help.output");
}
/**
@@ -55,7 +55,7 @@ public class OutputFolderArgument extends Argument {
// throw new FileNotFoundException(outputFolder);
// }
// if(!outputFolderDir.isDirectory()) {
-// throw new IOException(outputFolderDir + Messages.getString("argument.error.output")); //
+// throw new IOException(outputFolderDir + Messages.getString("argument.error.output"));
// }
getConfiguration().setDefaultOutputFolderOverlay(outputFolder);
@@ -63,13 +63,13 @@ public class OutputFolderArgument extends Argument {
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Output folder argument invalid!", ex); //
+ log.error("Output folder argument invalid!", ex);
throw new InitializationException(
- Messages.getString("argument.invalid.output") + this.getHelpText(), ex); //
+ Messages.getString("argument.invalid.output") + this.getHelpText(), ex);
}
throw new InitializationException(
- Messages.getString("argument.invalid.output") + this.getHelpText(), null); //
+ Messages.getString("argument.invalid.output") + this.getHelpText(), null);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java
index 6a464410..bf5619b0 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java
@@ -31,7 +31,7 @@ public class PasswordArgument extends Argument {
* Constructor
*/
public PasswordArgument() {
- super(new String[] {"-p"}, "argument.help.password"); // //
+ super(new String[] {"-p"}, "argument.help.password");
}
/**
@@ -59,13 +59,13 @@ public class PasswordArgument extends Argument {
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Mobile BKU password argument invalid!", ex); //
+ log.error("Mobile BKU password argument invalid!", ex);
throw new InitializationException(
- Messages.getString("argument.invalid.password") + this.getHelpText(), ex); //
+ Messages.getString("argument.invalid.password") + this.getHelpText(), ex);
}
throw new InitializationException(
- Messages.getString("argument.invalid.password") + this.getHelpText(), null); //
+ Messages.getString("argument.invalid.password") + this.getHelpText(), null);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java
index b0a10491..9a7a130e 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java
@@ -31,7 +31,7 @@ public class PhoneNumberArgument extends Argument {
* Constructor
*/
public PhoneNumberArgument() {
- super(new String[] {"-n" }, "argument.help.number"); // //
+ super(new String[] {"-n" }, "argument.help.number");
}
@@ -62,13 +62,13 @@ public class PhoneNumberArgument extends Argument {
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Phone Number Argument invalid!", ex); //
+ log.error("Phone Number Argument invalid!", ex);
throw new InitializationException(
- Messages.getString("argument.invalid.number") + this.getHelpText(), ex); //
+ Messages.getString("argument.invalid.number") + this.getHelpText(), ex);
}
throw new InitializationException(
- Messages.getString("argument.invalid.number") + this.getHelpText(), null); //
+ Messages.getString("argument.invalid.number") + this.getHelpText(), null);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java
index fae84543..c42d26a7 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java
@@ -30,7 +30,7 @@ public class ProxyHostArgument extends Argument {
* Constructor
*/
public ProxyHostArgument() {
- super(new String[] {"-proxy"}, "argument.help.proxyhost"); // //
+ super(new String[] {"-proxy"}, "argument.help.proxyhost");
}
/**
@@ -56,13 +56,13 @@ public class ProxyHostArgument extends Argument {
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Proxy host argument invalid!", ex); //
+ log.error("Proxy host argument invalid!", ex);
throw new InitializationException(
- Messages.getString("argument.invalid.proxyhost") + this.getHelpText(), ex); //
+ Messages.getString("argument.invalid.proxyhost") + this.getHelpText(), ex);
}
throw new InitializationException(
- Messages.getString("argument.invalid.proxyhost") + this.getHelpText(), null); //
+ Messages.getString("argument.invalid.proxyhost") + this.getHelpText(), null);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPassArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPassArgument.java
index 9456006f..514715ee 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPassArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPassArgument.java
@@ -30,7 +30,7 @@ public class ProxyPassArgument extends Argument {
* Constructor
*/
public ProxyPassArgument() {
- super(new String[] {"-proxypass"}, "argument.help.proxypass"); // //
+ super(new String[] {"-proxypass"}, "argument.help.proxypass");
}
/**
@@ -56,13 +56,13 @@ public class ProxyPassArgument extends Argument {
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Proxy password argument invalid!", ex); //
+ log.error("Proxy password argument invalid!", ex);
throw new InitializationException(
- Messages.getString("argument.invalid.proxypass") + this.getHelpText(), ex); //
+ Messages.getString("argument.invalid.proxypass") + this.getHelpText(), ex);
}
throw new InitializationException(
- Messages.getString("argument.invalid.proxypass") + this.getHelpText(), null); //
+ Messages.getString("argument.invalid.proxypass") + this.getHelpText(), null);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java
index 820b3ed5..1aefb76b 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java
@@ -31,7 +31,7 @@ public class ProxyPortArgument extends Argument {
* Constructor
*/
public ProxyPortArgument() {
- super(new String[] {"-proxyport"}, "argument.help.proxyport"); // //
+ super(new String[] {"-proxyport"}, "argument.help.proxyport");
}
/**
@@ -63,13 +63,13 @@ public class ProxyPortArgument extends Argument {
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Proxy port argument invalid!", ex); //
+ log.error("Proxy port argument invalid!", ex);
throw new InitializationException(
- Messages.getString("argument.invalid.proxyport") + this.getHelpText(), ex); //
+ Messages.getString("argument.invalid.proxyport") + this.getHelpText(), ex);
}
throw new InitializationException(
- Messages.getString("argument.invalid.proxyport") + this.getHelpText(), null); //
+ Messages.getString("argument.invalid.proxyport") + this.getHelpText(), null);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyUserArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyUserArgument.java
index 71592b35..5e704c63 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyUserArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyUserArgument.java
@@ -30,7 +30,7 @@ public class ProxyUserArgument extends Argument {
* Constructor
*/
public ProxyUserArgument() {
- super(new String[] {"-proxyuser"}, "argument.help.proxyuser"); // //
+ super(new String[] {"-proxyuser"}, "argument.help.proxyuser");
}
/**
@@ -56,13 +56,13 @@ public class ProxyUserArgument extends Argument {
return argOffset + 1;
}
} catch (Exception ex) {
- log.error("Proxy username argument invalid!", ex); //
+ log.error("Proxy username argument invalid!", ex);
throw new InitializationException(
- Messages.getString("argument.invalid.proxyuser") + this.getHelpText(), ex); //
+ Messages.getString("argument.invalid.proxyuser") + this.getHelpText(), ex);
}
throw new InitializationException(
- Messages.getString("argument.invalid.proxyuser") + this.getHelpText(), null); //
+ Messages.getString("argument.invalid.proxyuser") + this.getHelpText(), null);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/SkipFinishArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/SkipFinishArgument.java
index f49e784f..0c4247fd 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/SkipFinishArgument.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/SkipFinishArgument.java
@@ -25,7 +25,7 @@ public class SkipFinishArgument extends Argument {
* Constructor
*/
public SkipFinishArgument() {
- super(new String[] { "-s" }, "argument.help.skipfinish"); // //
+ super(new String[] { "-s" }, "argument.help.skipfinish");
}
/*
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java
index 7bba2860..0f9fa724 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java
@@ -58,7 +58,7 @@ public class BKUSelectionComposite extends StateComposite {
@Override
public void widgetSelected(SelectionEvent e) {
- log.debug("Setting BKU to LOCAL"); //
+ log.debug("Setting BKU to LOCAL");
setSelected(BKUs.LOCAL);
}
}
@@ -75,7 +75,7 @@ public class BKUSelectionComposite extends StateComposite {
@Override
public void widgetSelected(SelectionEvent e) {
- log.debug("Setting BKU to MOBILE"); //
+ log.debug("Setting BKU to MOBILE");
setSelected(BKUs.MOBILE);
}
}
@@ -92,7 +92,7 @@ public class BKUSelectionComposite extends StateComposite {
@Override
public void widgetSelected(SelectionEvent e) {
- log.debug("Setting BKU to KS"); //
+ log.debug("Setting BKU to KS");
setSelected(BKUs.KS);
}
}
@@ -229,9 +229,9 @@ public class BKUSelectionComposite extends StateComposite {
*/
@Override
public void reloadResources() {
- this.btnMobile.setText(Messages.getString("bku_selection.mobile")); //
- this.btnCard.setText(Messages.getString("bku_selection.card")); //
+ this.btnMobile.setText(Messages.getString("bku_selection.mobile"));
+ this.btnCard.setText(Messages.getString("bku_selection.card"));
if (this.btnKS != null)
- this.btnKS.setText(Messages.getString("bku_selection.ks")); //
+ this.btnKS.setText(Messages.getString("bku_selection.ks"));
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java
index 10a2a2f4..3691a519 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java
@@ -166,7 +166,7 @@ public class ConfigurationComposite extends StateComposite {
this.tabFolder.setFont(new Font(Display.getCurrent(), fD_tabFolder[0]));
this.simpleTabItem = new TabItem(this.tabFolder, SWT.NONE);
- this.simpleTabItem.setText(Messages.getString("config.Simple")); //
+ this.simpleTabItem.setText(Messages.getString("config.Simple"));
ScrolledComposite simpleCompositeScr = new ScrolledComposite(this.tabFolder, (SWT.H_SCROLL | SWT.V_SCROLL));
this.simpleTabItem.setControl(simpleCompositeScr);
@@ -177,7 +177,7 @@ public class ConfigurationComposite extends StateComposite {
simpleCompositeScr.setMinSize(simpleConfigComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
this.advancedTabItem = new TabItem(this.tabFolder, SWT.NONE);
- this.advancedTabItem.setText(Messages.getString("config.Advanced")); //
+ this.advancedTabItem.setText(Messages.getString("config.Advanced"));
ScrolledComposite advancedCompositeScr = new ScrolledComposite(this.tabFolder, (SWT.H_SCROLL | SWT.V_SCROLL));
this.advancedTabItem.setControl(advancedCompositeScr);
@@ -188,7 +188,7 @@ public class ConfigurationComposite extends StateComposite {
advancedCompositeScr.setMinSize(advancedConfigComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
this.aboutTabItem = new TabItem(this.tabFolder, SWT.NONE);
- this.aboutTabItem.setText(String.format(Messages.getString("config.About"), Constants.APP_NAME)); //
+ this.aboutTabItem.setText(String.format(Messages.getString("config.About"), Constants.APP_NAME));
ScrolledComposite aboutCompositeScr = new ScrolledComposite(this.tabFolder, (SWT.H_SCROLL | SWT.V_SCROLL));
this.aboutTabItem.setControl(aboutCompositeScr);
@@ -219,7 +219,7 @@ public class ConfigurationComposite extends StateComposite {
}
}
});
- this.btnSpeichern.setText(Messages.getString("common.Save")); //
+ this.btnSpeichern.setText(Messages.getString("common.Save"));
getShell().setDefaultButton(this.btnSpeichern);
FontData[] fD_btnSpeichern = this.btnSpeichern.getFont().getFontData();
@@ -231,7 +231,7 @@ public class ConfigurationComposite extends StateComposite {
fd_btnAbrechen.right = new FormAttachment(this.btnSpeichern, -10);
fd_btnAbrechen.bottom = new FormAttachment(this.btnSpeichern, 0, SWT.BOTTOM);
this.btnAbbrechen.setLayoutData(fd_btnAbrechen);
- this.btnAbbrechen.setText(Messages.getString("common.Cancel")); //
+ this.btnAbbrechen.setText(Messages.getString("common.Cancel"));
this.btnAbbrechen.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -287,7 +287,7 @@ public class ConfigurationComposite extends StateComposite {
public void keystoreEnabled(boolean enabled) {
if (enabled && this.keystoreConfigComposite == null) {
this.keystoreTabItem = new TabItem(this.tabFolder, SWT.NONE, 2);
- this.keystoreTabItem.setText(Messages.getString("config.Keystore")); //
+ this.keystoreTabItem.setText(Messages.getString("config.Keystore"));
ScrolledComposite keystoreCompositeScr = new ScrolledComposite(
this.tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);
@@ -351,7 +351,7 @@ public class ConfigurationComposite extends StateComposite {
redo = false;
status = true;
} catch (ResumableException e) {
- log.error("Settings validation failed!", e); //
+ log.error("Settings validation failed!", e);
ErrorDialog dialog = new ErrorDialog(getShell(),
e.getMessage(), BUTTONS.ABORT_RETRY_IGNORE);
int rc = dialog.open();
@@ -380,7 +380,7 @@ public class ConfigurationComposite extends StateComposite {
redo = false;
status = true;
} catch (ResumableException e) {
- log.error("Settings validation failed!", e); //
+ log.error("Settings validation failed!", e);
ErrorDialog dialog = new ErrorDialog(getShell(),
e.getMessage(), BUTTONS.ABORT_RETRY_IGNORE);
int rc = dialog.open();
@@ -410,7 +410,7 @@ public class ConfigurationComposite extends StateComposite {
redo = false;
status = true;
} catch (ResumableException e) {
- log.error("Settings validation failed!", e); //
+ log.error("Settings validation failed!", e);
ErrorDialog dialog = new ErrorDialog(getShell(),
e.getMessage(), BUTTONS.ABORT_RETRY_IGNORE);
int rc = dialog.open();
@@ -429,10 +429,10 @@ public class ConfigurationComposite extends StateComposite {
}
}
} catch (Exception e) {
- log.error("Settings validation failed!", e); //
+ log.error("Settings validation failed!", e);
String message = e.getMessage();
if (message == null)
- message = Messages.getString("error.Unexpected"); //
+ message = Messages.getString("error.Unexpected");
ErrorDialog dialog = new ErrorDialog(getShell(), message,
BUTTONS.OK);
dialog.open();
@@ -461,9 +461,9 @@ public class ConfigurationComposite extends StateComposite {
redo = false;
status = true;
} catch (IOException e) {
- log.error("Failed to save configuration to file!", e); //
+ log.error("Failed to save configuration to file!", e);
ErrorDialog dialog = new ErrorDialog(getShell(),
- Messages.getString("error.FailedToSaveSettings"), BUTTONS.RETRY_CANCEL); //
+ Messages.getString("error.FailedToSaveSettings"), BUTTONS.RETRY_CANCEL);
redo = (dialog.open() == SWT.RETRY);
// return false;
@@ -509,10 +509,10 @@ public class ConfigurationComposite extends StateComposite {
*/
@Override
public void reloadResources() {
- this.simpleTabItem.setText(Messages.getString("config.Simple")); //
- this.advancedTabItem.setText(Messages.getString("config.Advanced")); //
- this.aboutTabItem.setText(String.format(Messages.getString("config.About"), Constants.APP_NAME)); //
- this.btnSpeichern.setText(Messages.getString("common.Save")); //
- this.btnAbbrechen.setText(Messages.getString("common.Cancel")); //
+ this.simpleTabItem.setText(Messages.getString("config.Simple"));
+ this.advancedTabItem.setText(Messages.getString("config.Advanced"));
+ this.aboutTabItem.setText(String.format(Messages.getString("config.About"), Constants.APP_NAME));
+ this.btnSpeichern.setText(Messages.getString("common.Save"));
+ this.btnAbbrechen.setText(Messages.getString("common.Cancel"));
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
index dda55a47..3f89338a 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
@@ -59,10 +59,10 @@ public class DataSourceSelectComposite extends StateComposite {
public void openFileDialog() {
FileDialog dialog = new FileDialog(
DataSourceSelectComposite.this.getShell(), SWT.OPEN);
- dialog.setFilterExtensions(new String[] { "*.pdf", "*" }); // //
+ dialog.setFilterExtensions(new String[] { "*.pdf", "*" });
dialog.setFilterNames(new String[] {
- Messages.getString("common.PDFExtension_Description"), //
- Messages.getString("common.AllExtension_Description") }); //
+ Messages.getString("common.PDFExtension_Description"),
+ Messages.getString("common.AllExtension_Description") });
String fileName = dialog.open();
File file = null;
if (fileName != null) {
@@ -207,7 +207,7 @@ public class DataSourceSelectComposite extends StateComposite {
public void drop(DropTargetEvent event) {
if (fileTransfer.isSupportedType(event.currentDataType)) {
if (event.data == null) {
- log.error("Dropped file name was null"); //
+ log.error("Dropped file name was null");
return;
}
String[] files = (String[]) event.data;
@@ -215,7 +215,7 @@ public class DataSourceSelectComposite extends StateComposite {
// Only taking first file ...
File file = new File(files[0]);
if (!file.exists()) {
- log.error(String.format(Messages.getString("error.FileNotExist"), files[0])); //
+ log.error(String.format(Messages.getString("error.FileNotExist"), files[0]));
return;
}
DataSourceSelectComposite.this.setSelected(file);
@@ -264,7 +264,7 @@ public class DataSourceSelectComposite extends StateComposite {
FontData[] fD = this.lbl_drag.getFont().getFontData();
fD[0].setHeight(Constants.TEXT_SIZE_BIG);
this.lbl_drag.setFont(new Font(Display.getCurrent(), fD[0]));
- this.lbl_drag.setText(Messages.getString("dataSourceSelection.DropLabel")); //
+ this.lbl_drag.setText(Messages.getString("dataSourceSelection.DropLabel"));
this.lbl_drag.setAlignment(SWT.CENTER);
@@ -278,11 +278,11 @@ public class DataSourceSelectComposite extends StateComposite {
fD2[0].setHeight(Constants.TEXT_SIZE_NORMAL);
this.lbl_drag2.setFont(new Font(Display.getCurrent(), fD2[0]));
this.lbl_drag2.setText(Messages
- .getString("dataSourceSelection.DropLabel2")); //
+ .getString("dataSourceSelection.DropLabel2"));
this.lbl_drag2.setAlignment(SWT.CENTER);
this.btn_open = new Button(this.drop_area, SWT.NATIVE | SWT.RESIZE);
- this.btn_open.setText(Messages.getString("dataSourceSelection.browse")); //
+ this.btn_open.setText(Messages.getString("dataSourceSelection.browse"));
FontData[] fD_open = this.btn_open.getFont().getFontData();
fD_open[0].setHeight(Constants.TEXT_SIZE_BUTTON);
@@ -357,8 +357,8 @@ public class DataSourceSelectComposite extends StateComposite {
*/
@Override
public void reloadResources() {
- this.lbl_drag.setText(Messages.getString("dataSourceSelection.DropLabel")); //
- this.btn_open.setText(Messages.getString("dataSourceSelection.browse")); //
- this.lbl_drag2.setText(Messages.getString("dataSourceSelection.DropLabel2")); //
+ this.lbl_drag.setText(Messages.getString("dataSourceSelection.DropLabel"));
+ this.btn_open.setText(Messages.getString("dataSourceSelection.browse"));
+ this.lbl_drag2.setText(Messages.getString("dataSourceSelection.DropLabel2"));
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java
index 197d2bcc..19fbed98 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java
@@ -80,15 +80,15 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
MobileBKUEnterNumberComposite.this.btn_ok.setEnabled(false);
} catch(InvalidPasswordException ex) {
- log.error("Validating input for Mobile BKU failed!", ex); //
+ log.error("Validating input for Mobile BKU failed!", ex);
MobileBKUEnterNumberComposite.this
.setErrorMessage(ex.getMessage());
MobileBKUEnterNumberComposite.this.txt_password.setFocus();
}
catch (Exception ex) {
- log.error("Validating input for Mobile BKU failed!", ex); //
+ log.error("Validating input for Mobile BKU failed!", ex);
MobileBKUEnterNumberComposite.this
- .setErrorMessage(Messages.getString("error.InvalidPhoneNumber")); //
+ .setErrorMessage(Messages.getString("error.InvalidPhoneNumber"));
MobileBKUEnterNumberComposite.this.txt_number.setFocus();
return;
}
@@ -144,7 +144,7 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
if (this.errorMessage != null) {
this.lbl_error.setText(this.errorMessage);
} else {
- this.lbl_error.setText(""); //
+ this.lbl_error.setText("");
}
}
@@ -192,7 +192,7 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
this.lbl_number = new Label(containerComposite, SWT.NATIVE);
this.lbl_number.setAlignment(SWT.RIGHT);
- this.lbl_number.setText(Messages.getString("mobileBKU.number")); //
+ this.lbl_number.setText(Messages.getString("mobileBKU.number"));
FormData fd_lbl_number = new FormData();
fd_lbl_number.bottom = new FormAttachment(50, -10);
fd_lbl_number.right = new FormAttachment(50, -10);
@@ -223,14 +223,14 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
this.lbl_password = new Label(containerComposite, SWT.NATIVE);
this.lbl_password.setAlignment(SWT.RIGHT);
- this.lbl_password.setText(Messages.getString("mobileBKU.password")); //
+ this.lbl_password.setText(Messages.getString("mobileBKU.password"));
FormData fd_lbl_password = new FormData();
fd_lbl_password.top = new FormAttachment(50, 10);
fd_lbl_password.right = new FormAttachment(50, -10);
this.lbl_password.setLayoutData(fd_lbl_password);
this.btn_ok = new Button(containerComposite, SWT.NATIVE);
- this.btn_ok.setText(Messages.getString("common.Ok")); //
+ this.btn_ok.setText(Messages.getString("common.Ok"));
FormData fd_btn_ok = new FormData();
fd_btn_ok.bottom = new FormAttachment(100, -20);
fd_btn_ok.right = new FormAttachment(100, -20);
@@ -238,7 +238,7 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
this.btn_ok.addSelectionListener(this.okListener);
this.btn_cancel = new Button(containerComposite, SWT.NATIVE);
- this.btn_cancel.setText(Messages.getString("common.Cancel")); //
+ this.btn_cancel.setText(Messages.getString("common.Cancel"));
FormData fd_btn_cancel = new FormData();
fd_btn_cancel.bottom = new FormAttachment(100, -20);
fd_btn_cancel.right = new FormAttachment(this.btn_ok, -10);
@@ -295,7 +295,7 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
this.txt_number.setText(this.mobileNumber);
this.txt_password.setFocus();
} else {
- this.txt_number.setText(""); //
+ this.txt_number.setText("");
}
}
@@ -318,7 +318,7 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
if (this.mobilePassword != null) {
this.txt_password.setText(this.mobilePassword);
} else {
- this.txt_password.setText(""); //
+ this.txt_password.setText("");
}
}
@@ -327,9 +327,9 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
*/
@Override
public void reloadResources() {
- this.lbl_number.setText(Messages.getString("mobileBKU.number")); //
- this.lbl_password.setText(Messages.getString("mobileBKU.password")); //
- this.btn_ok.setText(Messages.getString("common.Ok")); //
+ this.lbl_number.setText(Messages.getString("mobileBKU.number"));
+ this.lbl_password.setText(Messages.getString("mobileBKU.password"));
+ this.btn_ok.setText(Messages.getString("common.Ok"));
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java
index 1e754e9a..55711bb1 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java
@@ -74,19 +74,19 @@ public class MobileBKUEnterTANComposite extends StateComposite {
if (tan.isEmpty()) {
MobileBKUEnterTANComposite.this.setMessage(Messages
- .getString("error.NoTan")); //
+ .getString("error.NoTan"));
return;
}
if (MobileBKUEnterTANComposite.this.refVal.startsWith(tan)) {
MobileBKUEnterTANComposite.this.setMessage(Messages
- .getString("error.EnteredReferenceValue")); //
+ .getString("error.EnteredReferenceValue"));
return;
}
if (tan.length() > 6) {
MobileBKUEnterTANComposite.this.setMessage(Messages
- .getString("error.TanTooLong")); //
+ .getString("error.TanTooLong"));
return;
}
@@ -175,8 +175,8 @@ public class MobileBKUEnterTANComposite extends StateComposite {
* @param tries
*/
public void setTries(int tries) {
- this.lblTries.setText(tries == 1 ? Messages.getString("tanEnter.try") : //
- String.format(Messages.getString("tanEnter.tries"), tries)); //
+ this.lblTries.setText(tries == 1 ? Messages.getString("tanEnter.try") :
+ String.format(Messages.getString("tanEnter.tries"), tries));
}
/**
@@ -185,10 +185,10 @@ public class MobileBKUEnterTANComposite extends StateComposite {
*/
public void setErrorMessage(String errorMessage) {
if (errorMessage == null)
- this.lblTries.setText(""); //
+ this.lblTries.setText("");
else
this.lblTries.setText(
- Messages.getString("error.Title") + ": " + errorMessage); // //
+ Messages.getString("error.Title") + ": " + errorMessage);
}
@@ -243,7 +243,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
if (this.refVal != null) {
this.lblRefVal.setText(this.refVal);
} else {
- this.lblRefVal.setText(""); //
+ this.lblRefVal.setText("");
}
}
@@ -263,7 +263,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
this.tan = tan;
if (this.tan == null) {
- this.txt_tan.setText(""); //
+ this.txt_tan.setText("");
} else {
this.txt_tan.setText(this.tan);
}
@@ -284,17 +284,17 @@ public class MobileBKUEnterTANComposite extends StateComposite {
try {
String signatureData = MobileBKUEnterTANComposite.this
.getSignatureData();
- if (signatureData != null && !signatureData.equals("")) { //
- log.debug("Trying to open " + signatureData); //
+ if (signatureData != null && !signatureData.equals("")) {
+ log.debug("Trying to open " + signatureData);
if (Desktop.isDesktopSupported()) {
Desktop.getDesktop().browse(new URI(signatureData));
} else {
- log.info("SWT Desktop is not supported on this platform"); //
+ log.info("SWT Desktop is not supported on this platform");
Program.launch(signatureData);
}
}
} catch (Exception ex) {
- log.error("OpenSelectionListener: ", ex); //
+ log.error("OpenSelectionListener: ", ex);
}
}
}
@@ -341,7 +341,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
fd_lblRefValLabel.bottom = new FormAttachment(50, -10);
this.lblRefValLabel.setLayoutData(fd_lblRefValLabel);
this.lblRefValLabel.setText(Messages
- .getString("tanEnter.ReferenceValue")); //
+ .getString("tanEnter.ReferenceValue"));
Label lbl_image = new Label(containerComposite, SWT.NATIVE);
@@ -364,7 +364,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
// fd_lblRefVal.top = new FormAttachment(30, -15);
fd_lblRefVal.bottom = new FormAttachment(50, -10);
this.lblRefVal.setLayoutData(fd_lblRefVal);
- this.lblRefVal.setText(""); //
+ this.lblRefVal.setText("");
this.lblTan = new Label(containerComposite, SWT.NATIVE);
this.lblTan.setAlignment(SWT.RIGHT);
@@ -374,7 +374,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
fd_lblTan.top = new FormAttachment(50, 10);
// fd_lblTan.bottom = new FormAttachment(50, 15);
this.lblTan.setLayoutData(fd_lblTan);
- this.lblTan.setText(Messages.getString("tanEnter.TAN")); //
+ this.lblTan.setText(Messages.getString("tanEnter.TAN"));
this.txt_tan = new Text(containerComposite, SWT.BORDER | SWT.NATIVE);
FormData fd_text = new FormData();
@@ -402,12 +402,12 @@ public class MobileBKUEnterTANComposite extends StateComposite {
public void modifyText(ModifyEvent e) {
String text = MobileBKUEnterTANComposite.this.txt_tan.getText();
- //log.debug("Current TAN: " + text); //
+ //log.debug("Current TAN: " + text);
if (text.length() > 3
&& MobileBKUEnterTANComposite.this.getRefVal()
.startsWith(text.trim())) {
MobileBKUEnterTANComposite.this.setMessage(Messages
- .getString("error.EnteredReferenceValue")); //
+ .getString("error.EnteredReferenceValue"));
}
}
});
@@ -420,8 +420,8 @@ public class MobileBKUEnterTANComposite extends StateComposite {
lnk_sig_data.setEnabled(true);
lnk_sig_data.setLayoutData(fd_lnk_data);
lnk_sig_data.addSelectionListener(new ShowSignatureDataListener());
- lnk_sig_data.setText(Messages.getString("mobileBKU.show")); //
- lnk_sig_data.setToolTipText(Messages.getString("mobileBKU.show_tooltip")); //
+ lnk_sig_data.setText(Messages.getString("mobileBKU.show"));
+ lnk_sig_data.setToolTipText(Messages.getString("mobileBKU.show_tooltip"));
this.btn_ok = new Button(containerComposite, SWT.NATIVE);
this.btn_cancel = new Button(containerComposite, SWT.NATIVE);
@@ -441,7 +441,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
fd_btn_ok.bottom = new FormAttachment(100, -20);
this.btn_ok.setLayoutData(fd_btn_ok);
- this.btn_ok.setText(Messages.getString("common.Ok")); //
+ this.btn_ok.setText(Messages.getString("common.Ok"));
this.btn_ok.addSelectionListener(new OkSelectionListener());
FormData fd_btn_cancel = new FormData();
@@ -451,7 +451,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
fd_btn_cancel.bottom = new FormAttachment(100, -20);
this.btn_cancel.setLayoutData(fd_btn_cancel);
- this.btn_cancel.setText(Messages.getString("common.Cancel")); //
+ this.btn_cancel.setText(Messages.getString("common.Cancel"));
this.btn_cancel.addSelectionListener(new CancelSelectionListener());
}
@@ -478,7 +478,7 @@ public class MobileBKUEnterTANComposite extends StateComposite {
@Override
public void reloadResources() {
this.lblRefValLabel.setText(Messages
- .getString("tanEnter.ReferenceValue")); //
- this.lblTan.setText(Messages.getString("tanEnter.TAN")); //
+ .getString("tanEnter.ReferenceValue"));
+ this.lblTan.setText(Messages.getString("tanEnter.TAN"));
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUFingerprintComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUFingerprintComposite.java
index 02c0b9b3..35963786 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUFingerprintComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUFingerprintComposite.java
@@ -151,10 +151,10 @@ public class MobileBKUFingerprintComposite extends StateComposite {
*/
public void setErrorMessage(String errorMessage) {
if (errorMessage == null)
- this.lblError.setText(""); //
+ this.lblError.setText("");
else
this.lblError.setText(
- Messages.getString("error.Title") + ": " + errorMessage); // //
+ Messages.getString("error.Title") + ": " + errorMessage);
}
/**
@@ -198,7 +198,7 @@ public class MobileBKUFingerprintComposite extends StateComposite {
if (this.refVal != null) {
this.lblRefVal.setText(this.refVal);
} else {
- this.lblRefVal.setText(""); //
+ this.lblRefVal.setText("");
}
}
@@ -219,17 +219,17 @@ public class MobileBKUFingerprintComposite extends StateComposite {
try {
String signatureData = MobileBKUFingerprintComposite.this
.getSignatureData();
- if (signatureData != null && !signatureData.equals("")) { //
- log.debug("Trying to open " + signatureData); //
+ if (signatureData != null && !signatureData.equals("")) {
+ log.debug("Trying to open " + signatureData);
if (Desktop.isDesktopSupported()) {
Desktop.getDesktop().browse(new URI(signatureData));
} else {
- log.info("SWT Desktop is not supported on this platform"); //
+ log.info("SWT Desktop is not supported on this platform");
Program.launch(signatureData);
}
}
} catch (Exception ex) {
- log.error("OpenSelectionListener: ", ex); //
+ log.error("OpenSelectionListener: ", ex);
}
}
}
@@ -297,7 +297,7 @@ public class MobileBKUFingerprintComposite extends StateComposite {
fd_lblRefVal.top = new FormAttachment(30, -10);
//fd_lblRefVal.bottom = new FormAttachment(50, -10);
this.lblRefVal.setLayoutData(fd_lblRefVal);
- this.lblRefVal.setText("test"); //
+ this.lblRefVal.setText("test");
this.lblFPLabel = new Label(containerComposite, SWT.NATIVE);
this.lblFPLabel.setAlignment(SWT.LEFT);
@@ -371,11 +371,11 @@ public class MobileBKUFingerprintComposite extends StateComposite {
@Override
public void reloadResources() {
this.lblRefValLabel.setText(Messages
- .getString("tanEnter.ReferenceValue")); //
- this.lblFPLabel.setText(Messages.getString("tanEnter.FP")); //
- this.lnk_sig_data.setText(Messages.getString("mobileBKU.show")); //
- this.lnk_sig_data.setToolTipText(Messages.getString("mobileBKU.show_tooltip")); //
- this.btn_cancel.setText(Messages.getString("common.Cancel")); //
- this.btn_sms.setText(Messages.getString("tanEnter.SMS")); //
+ .getString("tanEnter.ReferenceValue"));
+ this.lblFPLabel.setText(Messages.getString("tanEnter.FP"));
+ this.lnk_sig_data.setText(Messages.getString("mobileBKU.show"));
+ this.lnk_sig_data.setToolTipText(Messages.getString("mobileBKU.show_tooltip"));
+ this.btn_cancel.setText(Messages.getString("common.Cancel"));
+ this.btn_sms.setText(Messages.getString("tanEnter.SMS"));
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUQRComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUQRComposite.java
index 303415a1..58059153 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUQRComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUQRComposite.java
@@ -155,10 +155,10 @@ public class MobileBKUQRComposite extends StateComposite {
*/
public void setErrorMessage(String errorMessage) {
if (errorMessage == null)
- this.lblError.setText(""); //
+ this.lblError.setText("");
else
this.lblError.setText(
- Messages.getString("error.Title") + ": " + errorMessage); // //
+ Messages.getString("error.Title") + ": " + errorMessage);
}
/**
@@ -202,7 +202,7 @@ public class MobileBKUQRComposite extends StateComposite {
if (this.refVal != null) {
this.lblRefVal.setText(this.refVal);
} else {
- this.lblRefVal.setText(""); //
+ this.lblRefVal.setText("");
}
}
@@ -213,7 +213,7 @@ public class MobileBKUQRComposite extends StateComposite {
*/
public void setQR(InputStream qrcode) {
if (qrcode == null) {
- setErrorMessage(Messages.getString("error.FailedToLoadQRCode")); //
+ setErrorMessage(Messages.getString("error.FailedToLoadQRCode"));
return;
}
Image qr = new Image(Display.getCurrent(), qrcode);
@@ -235,17 +235,17 @@ public class MobileBKUQRComposite extends StateComposite {
try {
String signatureData = MobileBKUQRComposite.this
.getSignatureData();
- if (signatureData != null && !signatureData.equals("")) { //
- log.debug("Trying to open " + signatureData); //
+ if (signatureData != null && !signatureData.equals("")) {
+ log.debug("Trying to open " + signatureData);
if (Desktop.isDesktopSupported()) {
Desktop.getDesktop().browse(new URI(signatureData));
} else {
- log.info("SWT Desktop is not supported on this platform"); //
+ log.info("SWT Desktop is not supported on this platform");
Program.launch(signatureData);
}
}
} catch (Exception ex) {
- log.error("OpenSelectionListener: ", ex); //
+ log.error("OpenSelectionListener: ", ex);
}
}
}
@@ -313,7 +313,7 @@ public class MobileBKUQRComposite extends StateComposite {
fd_lblRefVal.top = new FormAttachment(30, -10);
//fd_lblRefVal.bottom = new FormAttachment(50, -10);
this.lblRefVal.setLayoutData(fd_lblRefVal);
- this.lblRefVal.setText(""); //
+ this.lblRefVal.setText("");
this.lblQRLabel = new Label(containerComposite, SWT.NATIVE);
this.lblQRLabel.setAlignment(SWT.RIGHT);
@@ -395,11 +395,11 @@ public class MobileBKUQRComposite extends StateComposite {
@Override
public void reloadResources() {
this.lblRefValLabel.setText(Messages
- .getString("tanEnter.ReferenceValue")); //
- this.lblQRLabel.setText(Messages.getString("tanEnter.QR")); //
- this.lnk_sig_data.setText(Messages.getString("mobileBKU.show")); //
- this.lnk_sig_data.setToolTipText(Messages.getString("mobileBKU.show_tooltip")); //
- this.btn_cancel.setText(Messages.getString("common.Cancel")); //
- this.btn_sms.setText(Messages.getString("tanEnter.SMS")); //
+ .getString("tanEnter.ReferenceValue"));
+ this.lblQRLabel.setText(Messages.getString("tanEnter.QR"));
+ this.lnk_sig_data.setText(Messages.getString("mobileBKU.show"));
+ this.lnk_sig_data.setToolTipText(Messages.getString("mobileBKU.show_tooltip"));
+ this.btn_cancel.setText(Messages.getString("common.Cancel"));
+ this.btn_sms.setText(Messages.getString("tanEnter.SMS"));
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java
index a9315b4c..429d427a 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java
@@ -254,17 +254,17 @@ public class OutputComposite extends StateComposite {
FileDialog save = new FileDialog(this.getShell(),
SWT.SAVE | SWT.NATIVE);
- save.setFilterExtensions(new String[] { "*.pdf", "*" }); // //
+ save.setFilterExtensions(new String[] { "*.pdf", "*" });
save.setFilterNames(new String[] {
- Messages.getString("common.PDFExtension_Description"), //
- Messages.getString("common.AllExtension_Description")}); //
+ Messages.getString("common.PDFExtension_Description"),
+ Messages.getString("common.AllExtension_Description")});
save.setFilterPath(inputFolder.getAbsolutePath());
save.setFileName(proposedName);
outputFileName = save.open();
inputFolder = null;
}
- log.debug("Trying to save to '" + outputFileName + "'"); // //
+ log.debug("Trying to save to '" + outputFileName + "'");
this.outputFile = saveResultAsFile(inputFolder, outputFileName);
this.saveFailed = (this.outputFile == null);
@@ -293,8 +293,8 @@ public class OutputComposite extends StateComposite {
targetFile = new File(inputFolder, target);
if (targetFile.exists()) {
- Dialog dialog = new Dialog(getShell(), Messages.getString("common.warning"), //
- String.format(Messages.getString("output.file_ask_overwrite"), targetFile.getName()), //
+ Dialog dialog = new Dialog(getShell(), Messages.getString("common.warning"),
+ String.format(Messages.getString("output.file_ask_overwrite"), targetFile.getName()),
BUTTONS.OK_CANCEL, ICON.QUESTION);
if (dialog.open() == SWT.CANCEL)
{
@@ -313,18 +313,18 @@ public class OutputComposite extends StateComposite {
source.getByteArray().length);
outstream.close();
} catch (FileNotFoundException e) {
- log.warn("Failed to open output file", e); //
+ log.warn("Failed to open output file", e);
ErrorDialog dialog = new ErrorDialog(getShell(),
- String.format(Messages.getString("output.save_failed"), //
+ String.format(Messages.getString("output.save_failed"),
targetFile.getName(), e.getLocalizedMessage()),
BUTTONS.RETRY_CANCEL);
if (dialog.open() == SWT.CANCEL)
return null;
retry = true;
} catch (IOException e) {
- log.error("I/O Error", e); //
+ log.error("I/O Error", e);
ErrorDialog dialog = new ErrorDialog(getShell(),
- String.format(Messages.getString("output.save_failed"), //
+ String.format(Messages.getString("output.save_failed"),
targetFile.getName(), e.getLocalizedMessage()),
BUTTONS.RETRY_CANCEL);
if (dialog.open() == SWT.CANCEL)
@@ -335,8 +335,8 @@ public class OutputComposite extends StateComposite {
if (!targetFile.exists())
{
- log.error("Tried to save file " + targetFile.getName() + //
- ", but it doesn't exist"); //
+ log.error("Tried to save file " + targetFile.getName() +
+ ", but it doesn't exist");
return null;
}
return targetFile;
@@ -369,7 +369,7 @@ public class OutputComposite extends StateComposite {
try {
OutputComposite.this.saveDocument();
} catch (Exception ex) {
- log.error("SaveSelectionListener: ", ex); //
+ log.error("SaveSelectionListener: ", ex);
}
}
}
@@ -396,7 +396,7 @@ public class OutputComposite extends StateComposite {
// Normalize filename
File f = new File(FilenameUtils.normalize(
OutputComposite.this.outputFile.getAbsolutePath()));
- log.debug("Trying to open " + f.toString()); //
+ log.debug("Trying to open " + f.toString());
// work around for the case of Linux and Java version 8
if (isSpecialCase()) {
reReloadResources(f.toString());
@@ -405,13 +405,13 @@ public class OutputComposite extends StateComposite {
else if (Desktop.isDesktopSupported()) {
Desktop.getDesktop().open(f);
} else {
- log.info("AWT Desktop is not supported on this platform"); //
+ log.info("AWT Desktop is not supported on this platform");
Program.launch(f.getAbsolutePath());
}
} catch (IOException ex) {
- log.error("OpenSelectionListener: ", ex); //
+ log.error("OpenSelectionListener: ", ex);
ErrorDialog error = new ErrorDialog(getShell(),
- String.format(Messages.getString("error.FailedToOpenDocument"), //
+ String.format(Messages.getString("error.FailedToOpenDocument"),
ex.getLocalizedMessage()), BUTTONS.RETRY_CANCEL);
if (error.open() == SWT.RETRY)
widgetSelected(e);
@@ -443,18 +443,18 @@ public class OutputComposite extends StateComposite {
boolean isSCase = false;
try {
- String os = System.getProperty("os.name").toLowerCase(); //
- if (os.contains("linux")) { //
- String version = System.getProperty("java.version"); //
- if (version.contains(".")) { //
- String[] parts = version.split("\\."); //
+ String os = System.getProperty("os.name").toLowerCase();
+ if (os.contains("linux")) {
+ String version = System.getProperty("java.version");
+ if (version.contains(".")) {
+ String[] parts = version.split("\\.");
isSCase = Integer.valueOf(parts[0]) <= 8 ? true : false;
} else {
isSCase = Integer.valueOf(version) <= 8 ? true : false;
}
}
} catch (Exception e) {
- log.debug("Error: " + e.getMessage()); //
+ log.debug("Error: " + e.getMessage());
isSCase = false;
}
return isSCase;
@@ -467,31 +467,31 @@ public class OutputComposite extends StateComposite {
@Override
public void reloadResources() {
this.lbl_success_message.setText(Messages
- .getString("output.success_message")); //
+ .getString("output.success_message"));
if (this.outputFile == null) {
this.lnk_saved_file.setText(Messages
- .getString("output.link_save_message")); //
+ .getString("output.link_save_message"));
} else {
this.lnk_saved_file.setText(Messages
- .getString("output.link_open_message")); //
+ .getString("output.link_open_message"));
}
- this.btn_save.setText(Messages.getString("common.Save")); //
+ this.btn_save.setText(Messages.getString("common.Save"));
}
/**
* @param str
*/
public void reReloadResources(String str) {
- this.lbl_success_message.setText(Messages.getString("output.success_message")); //
+ this.lbl_success_message.setText(Messages.getString("output.success_message"));
if (this.outputFile == null) {
this.lnk_saved_file.setText(Messages
- .getString("output.link_save_message")); //
+ .getString("output.link_save_message"));
} else {
- String str2 = "File location: " + str; //
+ String str2 = "File location: " + str;
this.lbl_success_message.setText(str2);
- this.lnk_saved_file.setText(""); //
+ this.lnk_saved_file.setText("");
}
- this.btn_save.setText(Messages.getString("common.Save")); //
+ this.btn_save.setText(Messages.getString("common.Save"));
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
index 4e6af9ba..88577f7f 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
@@ -91,7 +91,7 @@ public class PositioningComposite extends StateComposite {
this.bottomBar.setLayout(new FormLayout());
this.btnSign = new Button(this.bottomBar, SWT.PUSH);
- this.btnSign.setText(Messages.getString("positioning.sign")); //
+ this.btnSign.setText(Messages.getString("positioning.sign"));
FormData fd_btnSign = new FormData();
fd_btnSign.right = new FormAttachment(100);
fd_btnSign.top = new FormAttachment(0);
@@ -105,7 +105,7 @@ public class PositioningComposite extends StateComposite {
});
this.btnNewPage = new Button(this.bottomBar, SWT.TOGGLE);
- this.btnNewPage.setText(Messages.getString("positioning.newPage")); //
+ this.btnNewPage.setText(Messages.getString("positioning.newPage"));
FormData fd_btnNewPage = new FormData();
fd_btnNewPage.right = new FormAttachment(this.btnSign);
fd_btnNewPage.top = new FormAttachment(0);
@@ -326,19 +326,19 @@ public class PositioningComposite extends StateComposite {
int numPages = this.numPages;
if ((previousPage > numPages) && (currentPage <= numPages)) {
// Was on new page
- this.btnNewPage.setText(Messages.getString("positioning.newPage")); //
+ this.btnNewPage.setText(Messages.getString("positioning.newPage"));
this.btnNewPage.setSelection(false);
this.bottomBar.layout();
this.scrollbar.setMaximum(numPages + 1);
} else if ((previousPage <= numPages) && (currentPage > numPages)) {
// Go to new page
- this.btnNewPage.setText(Messages.getString("positioning.removeNewPage")); //
+ this.btnNewPage.setText(Messages.getString("positioning.removeNewPage"));
this.btnNewPage.setSelection(true);
this.bottomBar.layout();
this.scrollbar.setMaximum(numPages + 2);
}
this.scrollbar.setSelection(currentPage);
- this.lblPage.setText(String.format(Messages.getString("positioning.page"), currentPage, numPages)); //
+ this.lblPage.setText(String.format(Messages.getString("positioning.page"), currentPage, numPages));
});
EventQueue.invokeLater(() -> {
PositioningComposite.this.viewer.showPage(page);
@@ -422,11 +422,11 @@ public class PositioningComposite extends StateComposite {
@Override
public void reloadResources() {
if (this.currentPage <= this.numPages)
- this.btnNewPage.setText(Messages.getString("positioning.newPage")); //
+ this.btnNewPage.setText(Messages.getString("positioning.newPage"));
else
- this.btnNewPage.setText(Messages.getString("positioning.removeNewPage")); //
- this.btnSign.setText(Messages.getString("positioning.sign")); //
- this.lblPage.setText(String.format(Messages.getString("positioning.page"), //
+ this.btnNewPage.setText(Messages.getString("positioning.removeNewPage"));
+ this.btnSign.setText(Messages.getString("positioning.sign"));
+ this.lblPage.setText(String.format(Messages.getString("positioning.page"),
this.currentPage, this.numPages));
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java
index 408bfa5e..ec2b1a65 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java
@@ -290,7 +290,7 @@ public class SignaturePanel extends JPanel {
try {
this.currentXform = this.currentXform.createInverse();
} catch (NoninvertibleTransformException nte) {
- log.error("Error inverting page transform!", nte); //
+ log.error("Error inverting page transform!", nte);
}
if (this.sigPagePos == null)
@@ -319,7 +319,7 @@ public class SignaturePanel extends JPanel {
g.fillRect(0, 0, getWidth(), getHeight());
if (this.currentImage == null) {
g.setColor(Color.black);
- g.drawString(Messages.getString("error.SignaturePanel.NoPage"), getWidth() / 2 - 30, //
+ g.drawString(Messages.getString("error.SignaturePanel.NoPage"), getWidth() / 2 - 30,
getHeight() / 2);
if (this.currentPage != null) {
showPage(this.currentPage);
@@ -366,7 +366,7 @@ public class SignaturePanel extends JPanel {
g_phs.drawImage(placeholder, 0, 0, null);
// Draw grey "Signature" overlay
- String overlay = Messages.getString("positioning.signature"); //
+ String overlay = Messages.getString("positioning.signature");
// Voodoo to get overlay font scale
float scale = (((float) this.sigScreenWidth) / this.sigPlaceholder.getWidth(null)) * 150;
g_phs.setFont(getFont().deriveFont(scale));
@@ -399,7 +399,7 @@ public class SignaturePanel extends JPanel {
showPage(this.currentPage);
}
g.setColor(Color.black);
- g.drawString(Messages.getString("error.SignaturePanel.NoRender"), getWidth() / 2 - 30, //
+ g.drawString(Messages.getString("error.SignaturePanel.NoRender"), getWidth() / 2 - 30,
getHeight() / 2);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java
index 1bfb33c3..b17b5ec3 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java
@@ -50,7 +50,7 @@ public class WaitingComposite extends StateComposite {
fd_lbl_description.right = new FormAttachment(100, -10);
this.lbl_description.setLayoutData(fd_lbl_description);
this.lbl_description.setAlignment(SWT.CENTER);
- this.lbl_description.setText(Messages.getString("waiting.message")); //
+ this.lbl_description.setText(Messages.getString("waiting.message"));
ProgressBar progressBar = new ProgressBar(this, SWT.HORIZONTAL | SWT.INDETERMINATE);
FormData fd_progressBar = new FormData();
@@ -79,6 +79,6 @@ public class WaitingComposite extends StateComposite {
*/
@Override
public void reloadResources() {
- this.lbl_description.setText(Messages.getString("waiting.message")); //
+ this.lbl_description.setText(Messages.getString("waiting.message"));
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java
index ca865df9..23451f22 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingForAppComposite.java
@@ -72,7 +72,7 @@ public class WaitingForAppComposite extends StateComposite {
fd_lbl_description.right = new FormAttachment(100, -10);
this.lbl_description.setLayoutData(fd_lbl_description);
this.lbl_description.setAlignment(SWT.CENTER);
- this.lbl_description.setText(Messages.getString("waiting_for_app.message")); //
+ this.lbl_description.setText(Messages.getString("waiting_for_app.message"));
ProgressBar progressBar = new ProgressBar(this, SWT.HORIZONTAL | SWT.INDETERMINATE);
FormData fd_progressBar = new FormData();
@@ -89,7 +89,7 @@ public class WaitingForAppComposite extends StateComposite {
fd_btnSMS.top = new FormAttachment(progressBar, 24);
fd_btnSMS.right = new FormAttachment(progressBar, 0, SWT.RIGHT);
this.btn_sms.setLayoutData(fd_btnSMS);
- this.btn_sms.setText(Messages.getString("SMS tan")); //
+ this.btn_sms.setText(Messages.getString("SMS tan"));
this.btn_cancel = new Button(this, SWT.NONE);
this.btn_cancel.addSelectionListener(new CancelSelectionListener());
@@ -97,7 +97,7 @@ public class WaitingForAppComposite extends StateComposite {
fd_btnCancel.top = new FormAttachment(btn_sms, 0, SWT.TOP);
fd_btnCancel.right = new FormAttachment(btn_sms, -6);
this.btn_cancel.setLayoutData(fd_btnCancel);
- this.btn_cancel.setText(Messages.getString("WaitingForAppComposite.btnCancel.text")); //
+ this.btn_cancel.setText(Messages.getString("WaitingForAppComposite.btnCancel.text"));
reloadResources();
@@ -162,10 +162,10 @@ public class WaitingForAppComposite extends StateComposite {
*/
@Override
public void reloadResources() {
- this.lbl_description.setText(Messages.getString("waiting_for_app.message")); //
- this.btn_sms.setText(Messages.getString("tanEnter.SMS")); //
- this.btn_cancel.setText(Messages.getString("common.Cancel")); //
- this.btn_sms.setText(Messages.getString("tanEnter.SMS")); //
+ this.lbl_description.setText(Messages.getString("waiting_for_app.message"));
+ this.btn_sms.setText(Messages.getString("tanEnter.SMS"));
+ this.btn_cancel.setText(Messages.getString("common.Cancel"));
+ this.btn_sms.setText(Messages.getString("tanEnter.SMS"));
}
/**
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java
index 2779727f..713fa3a8 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java
@@ -127,7 +127,7 @@ public class AboutComposite extends ConfigurationCompositeBase {
*/
@Override
public void reloadResources() {
- this.lnkAbout.setText(Messages.getString("config.AboutText")); //
+ this.lnkAbout.setText(Messages.getString("config.AboutText"));
this.lblDataProtection.setText(Messages.getString("config.DataProtection"));
this.lnkDataProtection.setText(Messages.getString("config.DataProtectionStatement"));
this.btnOpenLogDirectory.setText(Messages.getString("config.ShowLogDirectory"));
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java
index 6f8561e3..6212c5ca 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java
@@ -301,10 +301,10 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
dlg.setFilterPath(AdvancedConfigurationComposite.this.txtOutputFolder.getText());
// Change the title bar text
- dlg.setText(Messages.getString("advanced_config.OutputFolder.Dialog_Title")); //
+ dlg.setText(Messages.getString("advanced_config.OutputFolder.Dialog_Title"));
// Customizable message displayed in the dialog
- dlg.setMessage(Messages.getString("advanced_config.OutputFolder.Dialog")); //
+ dlg.setMessage(Messages.getString("advanced_config.OutputFolder.Dialog"));
// Calling open() will open and run the dialog.
// It will return the selected directory, or
@@ -398,7 +398,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
StateComposite.anchor(txtProxyHost).right(100,-42).top(0).left(0,5).set();
StateComposite.setFontHeight(txtProxyHost, Constants.TEXT_SIZE_NORMAL);
- this.proxyHostErrorMarker = new ErrorMarker(compProxyHostContainer, SWT.NONE, ""); //
+ this.proxyHostErrorMarker = new ErrorMarker(compProxyHostContainer, SWT.NONE, "");
StateComposite.anchor(proxyHostErrorMarker).left(100,-32).right(100).top(0).bottom(0,32).set();
this.proxyHostErrorMarker.setVisible(false);
@@ -433,7 +433,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
}
});
- this.txtProxyPortErrorMarker = new ErrorMarker(compProxyPortContainer, SWT.NONE, ""); //
+ this.txtProxyPortErrorMarker = new ErrorMarker(compProxyPortContainer, SWT.NONE, "");
StateComposite.anchor(txtProxyPortErrorMarker).left(100,-32).right(100).top(0).bottom(0,32).set();
this.txtProxyPortErrorMarker.setVisible(false);
@@ -449,7 +449,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
private void performPostFixChanged(String postfix) {
- log.debug("Save file postfix changed to : {}", postfix); //
+ log.debug("Save file postfix changed to : {}", postfix);
this.configurationContainer.setSaveFilePostFix(postfix);
AdvancedConfigurationComposite.this.txtSaveFilePostFix.setText(postfix);
}
@@ -466,25 +466,25 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
}
void performOutputFolderChanged(String foldername) {
- log.debug("Selected Output folder: {}", foldername); //
+ log.debug("Selected Output folder: {}", foldername);
this.configurationContainer.setOutputFolder(foldername);
AdvancedConfigurationComposite.this.txtOutputFolder.setText(foldername);
}
int getBKUElementIndex(BKUs bku) {
- String lookup = "BKU." + bku.toString(); //
+ String lookup = "BKU." + bku.toString();
String bkuName = Messages.getString(lookup);
int i = this.bkuStrings.indexOf(bkuName);
if (i == -1) {
- log.warn("NO BKU match for {}", bkuName); //
+ log.warn("NO BKU match for {}", bkuName);
return 0;
}
return i;
}
void performBKUSelectionChanged(BKUs selected) {
- log.debug("Selected BKU: {}", selected); //
+ log.debug("Selected BKU: {}", selected);
this.configurationContainer.setDefaultBKU(selected);
this.cmbBKUAuswahl.select(this.getBKUElementIndex(selected));
}
@@ -494,8 +494,8 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
BKUs bkuvalue = resolveBKU(selected);
this.performBKUSelectionChanged(bkuvalue);
} catch (Exception ex) {
- log.error("Failed to parse BKU value: {} {}", selected, ex); //
- ErrorDialog dialog = new ErrorDialog(getShell(), Messages.getString("error.InvalidBKU"), BUTTONS.OK); //
+ log.error("Failed to parse BKU value: {} {}", selected, ex);
+ ErrorDialog dialog = new ErrorDialog(getShell(), Messages.getString("error.InvalidBKU"), BUTTONS.OK);
dialog.open();
}
}
@@ -504,7 +504,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
int blen = BKUs.values().length;
for (int i = 0; i < blen; i++) {
- String lookup = "BKU." + BKUs.values()[i].toString(); //
+ String lookup = "BKU." + BKUs.values()[i].toString();
if (Messages.getString(lookup).equals(localizedBKU)) {
return BKUs.values()[i];
}
@@ -516,23 +516,23 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
int getLocaleElementIndex(Locale locale) {
for (int i = 0; i < Constants.SUPPORTED_LOCALES.length; i++) {
if (Constants.SUPPORTED_LOCALES[i].equals(locale)) {
- log.debug("Locale: {} IDX: {}", locale, i); // //
+ log.debug("Locale: {} IDX: {}", locale, i);
return i;
}
}
- log.warn("NO Locale match for {}", locale); //
+ log.warn("NO Locale match for {}", locale);
return 0;
}
void performLocaleSelectionChanged(Locale selected) {
- log.debug("Selected Locale: {}", selected); //
+ log.debug("Selected Locale: {}", selected);
this.configurationContainer.setLocale(selected);
this.cmbLocaleAuswahl.select(this.getLocaleElementIndex(selected));
}
void performPositionSelection(boolean automatic) {
- log.debug("Selected Position: {}", automatic); //
+ log.debug("Selected Position: {}", automatic);
SignaturePosition pos = automatic ? new SignaturePosition() : null;
this.configurationContainer.setDefaultSignaturePosition(pos);
this.btnAutomatischePositionierung.setSelection(automatic);
@@ -596,7 +596,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
} catch (Exception ex) {
this.proxyHostErrorMarker.setVisible(true);
this.proxyHostErrorMarker.setToolTipText(ex.getMessage());
- log.error("processProxyHost: ", ex); //
+ log.error("processProxyHost: ", ex);
}
}
@@ -615,7 +615,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
} catch (Exception ex) {
this.txtProxyPortErrorMarker.setVisible(true);
this.txtProxyPortErrorMarker.setToolTipText(ex.getMessage());
- log.error("processProxyPort: ", ex); //
+ log.error("processProxyPort: ", ex);
}
}
@@ -677,7 +677,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
try {
this.configurationContainer.setProxyPort(provider.getProxyPortPersistent());
} catch (InvalidPortException e) {
- log.error("Failed to set proxy port!", e); //
+ log.error("Failed to set proxy port!", e);
}
this.configurationContainer.setProxyUser(provider.getProxyUserPersistent());
this.configurationContainer.setProxyPass(provider.getProxyPassPersistent());
@@ -779,8 +779,8 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
if (hostOld != null && !hostOld.isEmpty() && (hostNew == null || hostNew.isEmpty())) {
// Proxy has been removed, let's clear the system properties
// Otherwise, the proxy settings wouldn't get removed
- System.clearProperty("http.proxyHost"); //
- System.clearProperty("https.proxyHost"); //
+ System.clearProperty("http.proxyHost");
+ System.clearProperty("https.proxyHost");
}
store.setProxyHost(hostNew);
@@ -788,8 +788,8 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
int portNew = this.configurationContainer.getProxyPort();
if (portOld != -1 && portNew == -1) {
// cf. above
- System.clearProperty("http.proxyPort"); //
- System.clearProperty("https.proxyPort"); //
+ System.clearProperty("http.proxyPort");
+ System.clearProperty("https.proxyPort");
}
store.setProxyPort(portNew);
@@ -797,8 +797,8 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
String userNew = this.configurationContainer.getProxyUser();
if (userOld != null && !userOld.isEmpty() && (userNew == null || userNew.isEmpty())) {
// cf. above
- System.clearProperty("http.proxyUser"); //
- System.clearProperty("https.proxyUser"); //
+ System.clearProperty("http.proxyUser");
+ System.clearProperty("https.proxyUser");
}
store.setProxyUser(userNew);
@@ -806,8 +806,8 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
String passNew = this.configurationContainer.getProxyPass();
if (passOld != null && passNew == null) {
// cf. above
- System.clearProperty("http.proxyPassword"); //
- System.clearProperty("https.proxyPassword"); //
+ System.clearProperty("http.proxyPassword");
+ System.clearProperty("https.proxyPassword");
}
store.setProxyPass(passNew);
}
@@ -856,57 +856,57 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
*/
@Override
public void reloadResources() {
- this.grpSignatur.setText(Messages.getString("advanced_config.Signature_Title")); //
- this.btnAutomatischePositionierung.setText(Messages.getString("advanced_config.AutoPosition")); //
- this.btnAutomatischePositionierung.setToolTipText(Messages.getString("advanced_config.AutoPosition_ToolTip")); //
- this.grpPlaceholder.setText(Messages.getString("advanced_config.Placeholder_Title")); //
- this.btnPlatzhalterVerwenden.setText(Messages.getString("advanced_config.UseMarker")); //
- this.btnPlatzhalterVerwenden.setToolTipText(Messages.getString("advanced_config.UseMarker_ToolTip")); //
- this.btnSignatureFieldsUsage.setText(Messages.getString("advanced_config.UseSignatureFields")); //
- this.btnSignatureFieldsUsage.setToolTipText(Messages.getString("advanced_config.UseSignatureFields_ToolTip")); //
+ this.grpSignatur.setText(Messages.getString("advanced_config.Signature_Title"));
+ this.btnAutomatischePositionierung.setText(Messages.getString("advanced_config.AutoPosition"));
+ this.btnAutomatischePositionierung.setToolTipText(Messages.getString("advanced_config.AutoPosition_ToolTip"));
+ this.grpPlaceholder.setText(Messages.getString("advanced_config.Placeholder_Title"));
+ this.btnPlatzhalterVerwenden.setText(Messages.getString("advanced_config.UseMarker"));
+ this.btnPlatzhalterVerwenden.setToolTipText(Messages.getString("advanced_config.UseMarker_ToolTip"));
+ this.btnSignatureFieldsUsage.setText(Messages.getString("advanced_config.UseSignatureFields"));
+ this.btnSignatureFieldsUsage.setToolTipText(Messages.getString("advanced_config.UseSignatureFields_ToolTip"));
this.btnEnablePlaceholderUsage.setText(Messages.getString("advanced_config.Placeholder_Enabled"));
- this.btnPdfACompat.setText(Messages.getString("advanced_config.PdfACompat")); //
- this.btnPdfACompat.setToolTipText(Messages.getString("advanced_config.PdfACompat_ToolTip")); //
- this.lblTransparenz.setText(Messages.getString("advanced_config.SigPHTransparency")); //
- this.lblTransparenzLinks.setText(Messages.getString("advanced_config.SigPHTransparencyMin")); //
- this.lblTransparenzRechts.setText(Messages.getString("advanced_config.SigPHTransparencyMax")); //
- this.sclTransparenz.setToolTipText(Messages.getString("advanced_config.SigPHTransparencyTooltip")); //
-
- this.grpBkuAuswahl.setText(Messages.getString("advanced_config.BKUSelection_Title")); //
- this.cmbBKUAuswahl.setToolTipText(Messages.getString("advanced_config.BKUSelection_ToolTip")); //
- this.btnKeystoreEnabled.setText(Messages.getString("advanced_config.KeystoreEnabled")); //
- this.btnKeystoreEnabled.setToolTipText(Messages.getString("advanced_config.KeystoreEnabled_ToolTip")); //
-
- this.grpSpeicherort.setText(Messages.getString("advanced_config.OutputFolder_Title")); //
- this.lblDefaultOutputFolder.setText(Messages.getString("advanced_config.OutputFolder")); //
- this.txtOutputFolder.setToolTipText(Messages.getString("advanced_config.OutputFolder_ToolTip")); //
- this.btnBrowse.setText(Messages.getString("common.browse")); //
-
- this.grpLocaleAuswahl.setText(Messages.getString("advanced_config.LocaleSelection_Title")); //
- this.cmbLocaleAuswahl.setToolTipText(Messages.getString("advanced_config.LocaleSelection_ToolTip")); //
-
- this.grpUpdateCheck.setText(Messages.getString("advanced_config.UpdateCheck_Title")); //
- this.btnUpdateCheck.setText(Messages.getString("advanced_config.UpdateCheck")); //
- this.btnUpdateCheck.setToolTipText(Messages.getString("advanced_config.UpdateCheck_ToolTip")); //
-
- this.grpProxy.setText(Messages.getString("advanced_config.Proxy_Title")); //
- this.lblProxyHost.setText(Messages.getString("advanced_config.ProxyHost")); //
- this.txtProxyHost.setToolTipText(Messages.getString("advanced_config.ProxyHost_ToolTip")); //
- this.txtProxyHost.setMessage(Messages.getString("advanced_config.ProxyHost_Template")); //
- this.lblProxyPort.setText(Messages.getString("advanced_config.ProxyPort")); //
- this.txtProxyPort.setToolTipText(Messages.getString("advanced_config.ProxyPort_ToolTip")); //
- this.txtProxyPort.setMessage(Messages.getString("advanced_config.ProxyPort_Template")); //
+ this.btnPdfACompat.setText(Messages.getString("advanced_config.PdfACompat"));
+ this.btnPdfACompat.setToolTipText(Messages.getString("advanced_config.PdfACompat_ToolTip"));
+ this.lblTransparenz.setText(Messages.getString("advanced_config.SigPHTransparency"));
+ this.lblTransparenzLinks.setText(Messages.getString("advanced_config.SigPHTransparencyMin"));
+ this.lblTransparenzRechts.setText(Messages.getString("advanced_config.SigPHTransparencyMax"));
+ this.sclTransparenz.setToolTipText(Messages.getString("advanced_config.SigPHTransparencyTooltip"));
+
+ this.grpBkuAuswahl.setText(Messages.getString("advanced_config.BKUSelection_Title"));
+ this.cmbBKUAuswahl.setToolTipText(Messages.getString("advanced_config.BKUSelection_ToolTip"));
+ this.btnKeystoreEnabled.setText(Messages.getString("advanced_config.KeystoreEnabled"));
+ this.btnKeystoreEnabled.setToolTipText(Messages.getString("advanced_config.KeystoreEnabled_ToolTip"));
+
+ this.grpSpeicherort.setText(Messages.getString("advanced_config.OutputFolder_Title"));
+ this.lblDefaultOutputFolder.setText(Messages.getString("advanced_config.OutputFolder"));
+ this.txtOutputFolder.setToolTipText(Messages.getString("advanced_config.OutputFolder_ToolTip"));
+ this.btnBrowse.setText(Messages.getString("common.browse"));
+
+ this.grpLocaleAuswahl.setText(Messages.getString("advanced_config.LocaleSelection_Title"));
+ this.cmbLocaleAuswahl.setToolTipText(Messages.getString("advanced_config.LocaleSelection_ToolTip"));
+
+ this.grpUpdateCheck.setText(Messages.getString("advanced_config.UpdateCheck_Title"));
+ this.btnUpdateCheck.setText(Messages.getString("advanced_config.UpdateCheck"));
+ this.btnUpdateCheck.setToolTipText(Messages.getString("advanced_config.UpdateCheck_ToolTip"));
+
+ this.grpProxy.setText(Messages.getString("advanced_config.Proxy_Title"));
+ this.lblProxyHost.setText(Messages.getString("advanced_config.ProxyHost"));
+ this.txtProxyHost.setToolTipText(Messages.getString("advanced_config.ProxyHost_ToolTip"));
+ this.txtProxyHost.setMessage(Messages.getString("advanced_config.ProxyHost_Template"));
+ this.lblProxyPort.setText(Messages.getString("advanced_config.ProxyPort"));
+ this.txtProxyPort.setToolTipText(Messages.getString("advanced_config.ProxyPort_ToolTip"));
+ this.txtProxyPort.setMessage(Messages.getString("advanced_config.ProxyPort_Template"));
// this.lblProxyUser.setText(Messages.getString("advanced_config.ProxyUser"));
- // //
+
// this.txtProxyUser.setToolTipText(Messages
- // .getString("advanced_config.ProxyUser_ToolTip")); //
+ // .getString("advanced_config.ProxyUser_ToolTip"));
// this.txtProxyUser.setMessage(Messages
- // .getString("advanced_config.ProxyUser_Template")); //
+ // .getString("advanced_config.ProxyUser_Template"));
// this.lblProxyPass.setText(Messages.getString("advanced_config.ProxyPass"));
- // //
+
// this.txtProxyPass.setToolTipText(Messages
- // .getString("advanced_config.ProxyPass_ToolTip")); //
+ // .getString("advanced_config.ProxyPass_ToolTip"));
// this.txtProxyPass.setMessage(Messages
- // .getString("advanced_config.ProxyPass_Template")); //
+ // .getString("advanced_config.ProxyPass_Template"));
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java
index 2400ac7e..a2284ee3 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java
@@ -174,12 +174,12 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
FileDialog dialog = new FileDialog(
KeystoreConfigurationComposite.this.getShell(), SWT.OPEN);
dialog.setFilterExtensions(new String[] {
- "*.p12;*.pkcs12;*.pfx;*.ks;*.jks", "*.p12;*.pkcs12;*.pfx;", "*.ks;*.jks*.", "*" }); // // // //
+ "*.p12;*.pkcs12;*.pfx;*.ks;*.jks", "*.p12;*.pkcs12;*.pfx;", "*.ks;*.jks*.", "*" });
dialog.setFilterNames(new String[] {
- Messages.getString("common.KeystoreExtension_Description"), //
- Messages.getString("common.PKCS12Extension_Description"), //
- Messages.getString("common.KSExtension_Description"), //
- Messages.getString("common.AllExtension_Description") }); //
+ Messages.getString("common.KeystoreExtension_Description"),
+ Messages.getString("common.PKCS12Extension_Description"),
+ Messages.getString("common.KSExtension_Description"),
+ Messages.getString("common.AllExtension_Description") });
String fileName = dialog.open();
File file = null;
if (fileName != null) {
@@ -217,24 +217,24 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
try {
loadKeystore();
} catch (KeyStoreException ex) {
- log.error("Error loading keystore", ex); //
- showErrorDialog(Messages.getString("error.KeyStore")); //
+ log.error("Error loading keystore", ex);
+ showErrorDialog(Messages.getString("error.KeyStore"));
} catch (FileNotFoundException ex) {
- log.error("Error loading keystore", ex); //
+ log.error("Error loading keystore", ex);
showErrorDialog(String.format(Messages.getString(
- "error.KeyStoreFileNotExist"), f.getName())); //
+ "error.KeyStoreFileNotExist"), f.getName()));
} catch (NoSuchAlgorithmException ex) {
- log.error("Error loading keystore", ex); //
- showErrorDialog(Messages.getString("error.KeyStore")); //
+ log.error("Error loading keystore", ex);
+ showErrorDialog(Messages.getString("error.KeyStore"));
} catch (CertificateException ex) {
- log.error("Error loading keystore", ex); //
- showErrorDialog(Messages.getString("error.KeyStore")); //
+ log.error("Error loading keystore", ex);
+ showErrorDialog(Messages.getString("error.KeyStore"));
} catch (IOException ex) {
- log.error("Error loading keystore", ex); //
- showErrorDialog(Messages.getString("error.KeyStore")); //
+ log.error("Error loading keystore", ex);
+ showErrorDialog(Messages.getString("error.KeyStore"));
} catch (NullPointerException ex) {
- log.error("Error loading keystore - NPE?", ex); //
- showErrorDialog(Messages.getString("error.KeyStore")); //
+ log.error("Error loading keystore - NPE?", ex);
+ showErrorDialog(Messages.getString("error.KeyStore"));
}
}
});
@@ -292,29 +292,29 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
private void initKeystoreTypes() {
this.keystoreTypes = new HashMap<String, String>();
- this.keystoreTypes.put(Messages.getString("keystore_config.KeystoreType_PKCS12"), "PKCS12"); // //
- this.keystoreTypes.put(Messages.getString("keystore_config.KeystoreType_JKS"), "JCEKS"); // //
+ this.keystoreTypes.put(Messages.getString("keystore_config.KeystoreType_PKCS12"), "PKCS12");
+ this.keystoreTypes.put(Messages.getString("keystore_config.KeystoreType_JKS"), "JCEKS");
}
/**
* @param fileName
*/
protected void performKeystoreFileChanged(String fileName) {
- log.debug("Selected keystore file: " + fileName); //
+ log.debug("Selected keystore file: " + fileName);
this.configurationContainer.setKeyStoreFile(fileName);
KeystoreConfigurationComposite.this.txtKeystoreFile.setText(fileName);
int i = fileName.lastIndexOf('.');
if (i > 0) {
String ext = fileName.substring(i+1);
if (
- ext.equalsIgnoreCase("p12") || //
- ext.equalsIgnoreCase("pkcs12") || //
- ext.equalsIgnoreCase("pfx")) //
- performKeystoreTypeChanged("PKCS12"); //
+ ext.equalsIgnoreCase("p12") ||
+ ext.equalsIgnoreCase("pkcs12") ||
+ ext.equalsIgnoreCase("pfx"))
+ performKeystoreTypeChanged("PKCS12");
else if (
- ext.equalsIgnoreCase("ks") || //
- ext.equalsIgnoreCase("jks")) //
- performKeystoreTypeChanged("JCEKS"); //
+ ext.equalsIgnoreCase("ks") ||
+ ext.equalsIgnoreCase("jks"))
+ performKeystoreTypeChanged("JCEKS");
}
}
@@ -322,7 +322,7 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
* @param type
*/
protected void performKeystoreTypeChanged(String type) {
- log.debug("Selected keystore type: " + type); //
+ log.debug("Selected keystore type: " + type);
this.configurationContainer.setKeyStoreType(type);
for (int i = 0; i < this.cmbKeystoreType.getItemCount(); ++i) {
if (this.keystoreTypes.get(this.cmbKeystoreType.getItem(i)).equals(type)) {
@@ -336,7 +336,7 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
* @param storepass
*/
protected void performKeystoreStorePassChanged(String storepass) {
- log.debug("Changed keystore store password"); //
+ log.debug("Changed keystore store password");
this.configurationContainer.setKeyStoreStorePass(storepass);
this.txtKeystoreStorePass.setText(storepass);
}
@@ -345,7 +345,7 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
* @param alias
*/
protected void performKeystoreAliasChanged(String alias) {
- log.debug("Selected keystore alias: " + alias); //
+ log.debug("Selected keystore alias: " + alias);
this.configurationContainer.setKeyStoreAlias(alias);
this.cmbKeystoreAlias.setText(alias);
}
@@ -354,7 +354,7 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
* @param keypass
*/
protected void performKeystoreKeyPassChanged(String keypass) {
- log.debug("Changed keystore key password"); //
+ log.debug("Changed keystore key password");
this.configurationContainer.setKeyStoreKeyPass(keypass);
this.txtKeystoreKeyPass.setText(keypass);
}
@@ -412,7 +412,7 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
if (ksf.exists())
loadKeystore();
} catch (Exception e) {
- log.error("Error loading keystore", e); //
+ log.error("Error loading keystore", e);
}
performKeystoreAliasChanged(config.getKeyStoreAlias());
performKeystoreKeyPassChanged(config.getKeyStoreKeyPass());
@@ -483,19 +483,19 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase {
*/
@Override
public void reloadResources() {
- this.grpKeystore.setText(Messages.getString("keystore_config.Keystore_Title")); //
- this.lblKeystoreFile.setText(Messages.getString("keystore_config.KeystoreFile")); //
- this.btnBrowse.setText(Messages.getString("common.browse")); //
- this.txtKeystoreFile.setToolTipText(Messages.getString("keystore_config.KeystoreFile_ToolTip")); //
- this.lblKeystoreType.setText(Messages.getString("keystore_config.KeystoreType")); //
+ this.grpKeystore.setText(Messages.getString("keystore_config.Keystore_Title"));
+ this.lblKeystoreFile.setText(Messages.getString("keystore_config.KeystoreFile"));
+ this.btnBrowse.setText(Messages.getString("common.browse"));
+ this.txtKeystoreFile.setToolTipText(Messages.getString("keystore_config.KeystoreFile_ToolTip"));
+ this.lblKeystoreType.setText(Messages.getString("keystore_config.KeystoreType"));
initKeystoreTypes();
this.cmbKeystoreType.setItems(this.keystoreTypes.keySet().toArray(new String[0]));
- this.lblKeystoreStorePass.setText(Messages.getString("keystore_config.KeystoreStorePass")); //
- this.txtKeystoreStorePass.setToolTipText(Messages.getString("keystore_config.KeystoreStorePass_ToolTip")); //
- this.btnLoad.setText(Messages.getString("keystore_config.Load")); //
- this.btnLoad.setToolTipText(Messages.getString("keystore_config.Load_ToolTip")); //
- this.lblKeystoreAlias.setText(Messages.getString("keystore_config.KeystoreAlias")); //
- this.lblKeystoreKeyPass.setText(Messages.getString("keystore_config.KeystoreKeyPass")); //
- this.txtKeystoreKeyPass.setToolTipText(Messages.getString("keystore_config.KeystoreKeyPass_ToolTip")); //
+ this.lblKeystoreStorePass.setText(Messages.getString("keystore_config.KeystoreStorePass"));
+ this.txtKeystoreStorePass.setToolTipText(Messages.getString("keystore_config.KeystoreStorePass_ToolTip"));
+ this.btnLoad.setText(Messages.getString("keystore_config.Load"));
+ this.btnLoad.setToolTipText(Messages.getString("keystore_config.Load_ToolTip"));
+ this.lblKeystoreAlias.setText(Messages.getString("keystore_config.KeystoreAlias"));
+ this.lblKeystoreKeyPass.setText(Messages.getString("keystore_config.KeystoreKeyPass"));
+ this.txtKeystoreKeyPass.setToolTipText(Messages.getString("keystore_config.KeystoreKeyPass_ToolTip"));
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java
index edf7894f..bf74eaa8 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java
@@ -407,13 +407,13 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
FileDialog dialog = new FileDialog(
SimpleConfigurationComposite.this.getShell(), SWT.OPEN);
dialog.setFilterExtensions(new String[] {
- "*.jpg;*.png;*.gif", "*.jpg", "*.png", "*.gif", "*" }); // // // // //
+ "*.jpg;*.png;*.gif", "*.jpg", "*.png", "*.gif", "*" });
dialog.setFilterNames(new String[] {
- Messages.getString("common.ImageExtension_Description"), //
- Messages.getString("common.JPGExtension_Description"), //
- Messages.getString("common.PNGExtension_Description"), //
- Messages.getString("common.GIFExtension_Description"), //
- Messages.getString("common.AllExtension_Description") }); //
+ Messages.getString("common.ImageExtension_Description"),
+ Messages.getString("common.JPGExtension_Description"),
+ Messages.getString("common.PNGExtension_Description"),
+ Messages.getString("common.GIFExtension_Description"),
+ Messages.getString("common.AllExtension_Description") });
String fileName = dialog.open();
File file = null;
if (fileName != null) {
@@ -447,7 +447,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
if (this.signer != null) {
SignatureParameter param = this.signer.getPDFSigner().newParameter();
if(this.configurationContainer.getSignatureNote() != null && !this.configurationContainer.getSignatureNote().isEmpty()) {
- param.setProperty("SIG_NOTE", this.configurationContainer.getSignatureNote()); //
+ param.setProperty("SIG_NOTE", this.configurationContainer.getSignatureNote());
}
param.setSignatureLanguage(this.configurationContainer.getSignatureLocale().getLanguage());
@@ -477,7 +477,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
ImageConverter.convertToSWT(CachedFileNameEmblem.fixImage(
ImageIO.read(imgFile), imgFile)));
} catch (IOException e) {
- log.error("Error reading image", e); //
+ log.error("Error reading image", e);
}
} else {
this.logo = null;
@@ -491,10 +491,10 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
try {
setEmblemFileInternal(filename, false);
} catch (Exception ex) {
- log.error("processEmblemChanged: ", ex); //
+ log.error("processEmblemChanged: ", ex);
ErrorDialog dialog = new ErrorDialog(
getShell(),
- Messages.getString("error.FailedToLoadEmblem"), BUTTONS.OK); //
+ Messages.getString("error.FailedToLoadEmblem"), BUTTONS.OK);
dialog.open();
}
}
@@ -506,8 +506,8 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
} catch (Exception ex) {
this.txtMobileNumberErrorMarker.setVisible(true);
this.txtMobileNumberErrorMarker.setToolTipText(Messages
- .getString("error.InvalidPhoneNumber")); //
- log.error("processNumberChanged: ", ex); //
+ .getString("error.InvalidPhoneNumber"));
+ log.error("processNumberChanged: ", ex);
this.redraw();
this.doLayout();
}
@@ -516,17 +516,17 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
int getLocaleElementIndex(Locale locale) {
for (int i = 0; i < Constants.SUPPORTED_LOCALES.length; i++) {
if (Constants.SUPPORTED_LOCALES[i].equals(locale)) {
- log.debug("Locale: {} IDX: {}",locale, i); // //
+ log.debug("Locale: {} IDX: {}",locale, i);
return i;
}
}
- log.warn("NO Locale match for {}", locale); //
+ log.warn("NO Locale match for {}", locale);
return 0;
}
void performSignatureLangSelectionChanged(Locale selected, Locale previous) {
- log.debug("Selected Sign Locale: {}", selected); //
+ log.debug("Selected Sign Locale: {}", selected);
this.configurationContainer.setSignatureLocale(selected);
this.cmbSignatureLang.select(this.getLocaleElementIndex(selected));
@@ -537,7 +537,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
void preformProfileSelectionChanged(Profile newProfile) {
- log.debug("Signature Profile {} was selected", newProfile.name()); //
+ log.debug("Signature Profile {} was selected", newProfile.name());
Profile oldProfile = this.configurationContainer.getSignatureProfile();
this.configurationContainer.setSignatureProfile(newProfile);
this.cmbSignatureProfiles.select(newProfile.ordinal());
@@ -589,7 +589,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
this.configurationContainer.setMobileNumber(number);
number = this.configurationContainer.getMobileNumber();
if (number == null) {
- this.txtMobileNumber.setText(""); //
+ this.txtMobileNumber.setText("");
return;
}
this.txtMobileNumber.setText(number);
@@ -623,7 +623,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
this.configurationContainer.setEmblem(
provider.getDefaultEmblemPersistent());
} catch (InvalidEmblemFile e) {
- log.error("Failed to set emblem!", e); //
+ log.error("Failed to set emblem!", e);
}
this.configurationContainer.setSignatureLocale(
@@ -653,10 +653,10 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase {
setEmblemFileInternal(emblemFile, true);
this.btnClearImage.setSelection(true);
} catch (Exception e1) {
- log.error("Failed to load emblem: ", e1); //
+ log.error("Failed to load emblem: ", e1);
ErrorDialog dialog = new ErrorDialog(
getShell(),
- Messages.getString("error.FailedToLoadEmblem"), BUTTONS.OK); //
+ Messages.getString("error.FailedToLoadEmblem"), BUTTONS.OK);
dialog.open();
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java
index f2c7b8e6..f5b5bf9b 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java
@@ -30,7 +30,7 @@ public class ErrorDialog extends Dialog {
* @param button The buttons to be shown
*/
public ErrorDialog(Shell parent, String message, BUTTONS button) {
- super(parent, Messages.getString("error.Title"), //
+ super(parent, Messages.getString("error.Title"),
message, button, ICON.ERROR);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/InputDialog.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/InputDialog.java
index f86ed4db..15625539 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/InputDialog.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/InputDialog.java
@@ -134,7 +134,7 @@ public class InputDialog extends org.eclipse.swt.widgets.Dialog {
data.horizontalSpan = 2;
text.setLayoutData(data);
Button ok = new Button(shell, SWT.PUSH);
- ok.setText(Messages.getString("common.Ok")); //
+ ok.setText(Messages.getString("common.Ok"));
data = new GridData(GridData.FILL_HORIZONTAL);
ok.setLayoutData(data);
ok.addSelectionListener(new SelectionAdapter() {
@@ -145,7 +145,7 @@ public class InputDialog extends org.eclipse.swt.widgets.Dialog {
}
});
Button cancel = new Button(shell, SWT.PUSH);
- cancel.setText(Messages.getString("common.Cancel")); //
+ cancel.setText(Messages.getString("common.Cancel"));
data = new GridData(GridData.FILL_HORIZONTAL);
cancel.setLayoutData(data);
cancel.addSelectionListener(new SelectionAdapter() {
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java
index ee17f6b8..52bdf55c 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java
@@ -66,7 +66,7 @@ public abstract class MainBarButton extends Canvas {
private Color inactiveText = null;
- private String text = ""; //
+ private String text = "";
private boolean active = true;
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ATrustConnectionException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ATrustConnectionException.java
index 0e740a51..1b18c99c 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ATrustConnectionException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ATrustConnectionException.java
@@ -33,7 +33,7 @@ public class ATrustConnectionException extends Exception {
* @param file
*/
public ATrustConnectionException() {
- super(Messages.getString("error.ATrustConnection")); //
+ super(Messages.getString("error.ATrustConnection"));
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/CantLoadKeystoreException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/CantLoadKeystoreException.java
index ab0f66b7..6bb72ffa 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/CantLoadKeystoreException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/CantLoadKeystoreException.java
@@ -31,6 +31,6 @@ public class CantLoadKeystoreException extends ResumableException {
* @param cause The original exception
*/
public CantLoadKeystoreException(Throwable cause, int resumeIndex) {
- super(Messages.getString("error.KeyStore"), cause, resumeIndex); //
+ super(Messages.getString("error.KeyStore"), cause, resumeIndex);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java
index 30eb7bb8..e4e3223e 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java
@@ -34,7 +34,7 @@ public class InvalidEmblemFile extends PDFOverGUIException {
* @param file
*/
public InvalidEmblemFile(final File file) {
- super(String.format(Messages.getString("exception.InvalidEmblemFile"), file.getAbsolutePath())); //
+ super(String.format(Messages.getString("exception.InvalidEmblemFile"), file.getAbsolutePath()));
}
/**
@@ -43,6 +43,6 @@ public class InvalidEmblemFile extends PDFOverGUIException {
* @param reason
*/
public InvalidEmblemFile(final File file, Throwable reason) {
- super(String.format(Messages.getString("exception.InvalidEmblemFile"), file.getAbsolutePath()), reason); //
+ super(String.format(Messages.getString("exception.InvalidEmblemFile"), file.getAbsolutePath()), reason);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java
index 9c86bcc7..253f935d 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java
@@ -32,7 +32,7 @@ public class InvalidPortException extends PDFOverGUIException {
* @param port invalid port number
*/
public InvalidPortException(int port) {
- super(String.format(Messages.getString("exception.InvalidPort"), Integer.toString(port), 1, 0xffff)); //
+ super(String.format(Messages.getString("exception.InvalidPort"), Integer.toString(port), 1, 0xffff));
}
/**
@@ -41,6 +41,6 @@ public class InvalidPortException extends PDFOverGUIException {
* @param portString invalid port string
*/
public InvalidPortException(String portString, Throwable source) {
- super(String.format(Messages.getString("exception.InvalidPort"), portString, 1, 0xffff), source); //
+ super(String.format(Messages.getString("exception.InvalidPort"), portString, 1, 0xffff), source);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasDoesntExistException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasDoesntExistException.java
index 3e326a8c..8f817a8b 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasDoesntExistException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasDoesntExistException.java
@@ -31,6 +31,6 @@ public class KeystoreAliasDoesntExistException extends ResumableException {
* @param resumeIndex The resume Index
*/
public KeystoreAliasDoesntExistException(final String alias, int resumeIndex) {
- super(String.format(Messages.getString("error.KeyStoreAliasExist"), alias), resumeIndex); //
+ super(String.format(Messages.getString("error.KeyStoreAliasExist"), alias), resumeIndex);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasNoKeyException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasNoKeyException.java
index 17b4661f..f4416e42 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasNoKeyException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreAliasNoKeyException.java
@@ -31,6 +31,6 @@ public class KeystoreAliasNoKeyException extends ResumableException {
* @param resumeIndex The resume Index
*/
public KeystoreAliasNoKeyException(final String alias, int resumeIndex) {
- super(String.format(Messages.getString("error.KeyStoreAliasNoKey"), alias), resumeIndex); //
+ super(String.format(Messages.getString("error.KeyStoreAliasNoKey"), alias), resumeIndex);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreDoesntExistException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreDoesntExistException.java
index 5b3167b6..e1f19b72 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreDoesntExistException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreDoesntExistException.java
@@ -33,6 +33,6 @@ public class KeystoreDoesntExistException extends ResumableException {
* @param resumeIndex The resume Index
*/
public KeystoreDoesntExistException(final File keystore, int resumeIndex) {
- super(String.format(Messages.getString("error.KeyStoreFileNotExist"), keystore.getPath()), resumeIndex); //
+ super(String.format(Messages.getString("error.KeyStoreFileNotExist"), keystore.getPath()), resumeIndex);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreKeyPasswordException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreKeyPasswordException.java
index 1b2b4875..907c5577 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreKeyPasswordException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/KeystoreKeyPasswordException.java
@@ -30,6 +30,6 @@ public class KeystoreKeyPasswordException extends ResumableException {
* @param resumeIndex The resume Index
*/
public KeystoreKeyPasswordException(int resumeIndex) {
- super(Messages.getString("error.KeyStoreKeyPass"), resumeIndex); //
+ super(Messages.getString("error.KeyStoreKeyPass"), resumeIndex);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderDoesntExistException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderDoesntExistException.java
index c9d042e6..607f27bf 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderDoesntExistException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderDoesntExistException.java
@@ -33,7 +33,7 @@ public class OutputfolderDoesntExistException extends ResumableException {
* @param resumeIndex The resume Index
*/
public OutputfolderDoesntExistException(final File folder, int resumeIndex) {
- super(String.format(Messages.getString("exception.PathNotExist"), folder.getAbsolutePath()), resumeIndex); //
+ super(String.format(Messages.getString("exception.PathNotExist"), folder.getAbsolutePath()), resumeIndex);
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java
index 1f895783..30ad642c 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java
@@ -34,6 +34,6 @@ public class OutputfolderNotADirectoryException extends PDFOverGUIException {
* @param folder The file
*/
public OutputfolderNotADirectoryException(File folder) {
- super(String.format(Messages.getString("exception.PathNotDirectory"), folder.getAbsolutePath())); //
+ super(String.format(Messages.getString("exception.PathNotDirectory"), folder.getAbsolutePath()));
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooLongException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooLongException.java
index da2b29d5..6ea2b662 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooLongException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooLongException.java
@@ -28,7 +28,7 @@ public class PasswordTooLongException extends InvalidPasswordException {
* Constructor
*/
public PasswordTooLongException() {
- super(Messages.getString("exception.PasswordTooLong")); //
+ super(Messages.getString("exception.PasswordTooLong"));
}
/**
*
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooShortException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooShortException.java
index 3e4b43b1..ac1eafb0 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooShortException.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooShortException.java
@@ -32,7 +32,7 @@ public class PasswordTooShortException extends InvalidPasswordException {
* Constructor
*/
public PasswordTooShortException() {
- super(Messages.getString("exception.PasswordTooShort")); //
+ super(Messages.getString("exception.PasswordTooShort"));
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/osx/CocoaUIEnhancer.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/osx/CocoaUIEnhancer.java
index 3ded94eb..ed3e0057 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/osx/CocoaUIEnhancer.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/osx/CocoaUIEnhancer.java
@@ -105,18 +105,18 @@ public class CocoaUIEnhancer {
public long actionProc(final long id, final long sel, final long arg0) {
if (sel == sel_aboutMenuItemSelected_) {
if (log.isDebugEnabled()) {
- log.debug("[MenuHookObject - actionProc] : About"); //
+ log.debug("[MenuHookObject - actionProc] : About");
this.about.handleEvent(null);
}
} else if (sel == sel_preferencesMenuItemSelected_) {
if (log.isDebugEnabled()) {
- log.debug("[MenuHookObject - actionProc] : Preferences"); //
+ log.debug("[MenuHookObject - actionProc] : Preferences");
}
this.pref.handleEvent(null);
} else {
if (log.isDebugEnabled()) {
- log.debug("[MenuHookObject - actionProc] : Unknow selection!"); //
+ log.debug("[MenuHookObject - actionProc] : Unknow selection!");
}
}
// Return value is not used.
@@ -171,28 +171,28 @@ public class CocoaUIEnhancer {
// Schedule disposal of callback object
display.disposeExec(() -> {
- CocoaUIEnhancer.invoke(proc3Args, "dispose"); //
+ CocoaUIEnhancer.invoke(proc3Args, "dispose");
});
}
private static void initialize(final Object callbackObject) throws Exception {
- final Class<?> osCls = classForName("org.eclipse.swt.internal.cocoa.OS"); //
+ final Class<?> osCls = classForName("org.eclipse.swt.internal.cocoa.OS");
// Register names in objective-c.
if (sel_toolbarButtonClicked_ == 0) {
- // sel_toolbarButtonClicked_ = registerName( osCls, "toolbarButtonClicked:" ); //
+ // sel_toolbarButtonClicked_ = registerName( osCls, "toolbarButtonClicked:" );
sel_preferencesMenuItemSelected_ = registerName(osCls,
- "preferencesMenuItemSelected:"); //
+ "preferencesMenuItemSelected:");
sel_aboutMenuItemSelected_ = registerName(osCls,
- "aboutMenuItemSelected:"); //
+ "aboutMenuItemSelected:");
}
// Create an SWT Callback object that will invoke the actionProc method
// of our internal
// callbackObject.
- proc3Args = new Callback(callbackObject, "actionProc", 3); //
- final Method getAddress = Callback.class.getMethod("getAddress", //
+ proc3Args = new Callback(callbackObject, "actionProc", 3);
+ final Method getAddress = Callback.class.getMethod("getAddress",
new Class[0]);
Object object = getAddress.invoke(proc3Args, (Object[]) null);
final long proc3 = convertToLong(object);
@@ -200,82 +200,82 @@ public class CocoaUIEnhancer {
SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
}
- final Class<?> nsmenuCls = classForName("org.eclipse.swt.internal.cocoa.NSMenu"); //
- final Class<?> nsmenuitemCls = classForName("org.eclipse.swt.internal.cocoa.NSMenuItem"); //
- final Class<?> nsstringCls = classForName("org.eclipse.swt.internal.cocoa.NSString"); //
- final Class<?> nsapplicationCls = classForName("org.eclipse.swt.internal.cocoa.NSApplication"); //
+ final Class<?> nsmenuCls = classForName("org.eclipse.swt.internal.cocoa.NSMenu");
+ final Class<?> nsmenuitemCls = classForName("org.eclipse.swt.internal.cocoa.NSMenuItem");
+ final Class<?> nsstringCls = classForName("org.eclipse.swt.internal.cocoa.NSString");
+ final Class<?> nsapplicationCls = classForName("org.eclipse.swt.internal.cocoa.NSApplication");
// Instead of creating a new delegate class in objective-c,
// just use the current SWTApplicationDelegate. An instance of this
// is a field of the Cocoa Display object and is already the target
// for the menuItems. So just get this class and add the new methods
// to it.
- object = invoke(osCls, "objc_lookUpClass", //
- new Object[] { "SWTApplicationDelegate" }); //
+ object = invoke(osCls, "objc_lookUpClass",
+ new Object[] { "SWTApplicationDelegate" });
final long cls = convertToLong(object);
// Add the action callbacks for Preferences and About menu items.
- invoke(osCls, "class_addMethod", new Object[] { wrapPointer(cls), //
+ invoke(osCls, "class_addMethod", new Object[] { wrapPointer(cls),
wrapPointer(sel_preferencesMenuItemSelected_),
- wrapPointer(proc3), "@:@" }); //
- invoke(osCls, "class_addMethod", new Object[] { wrapPointer(cls), //
+ wrapPointer(proc3), "@:@" });
+ invoke(osCls, "class_addMethod", new Object[] { wrapPointer(cls),
wrapPointer(sel_aboutMenuItemSelected_), wrapPointer(proc3),
- "@:@" }); //
+ "@:@" });
// Get the Mac OS X Application menu.
final Object sharedApplication = invoke(nsapplicationCls,
- "sharedApplication"); //
- final Object mainMenu = invoke(sharedApplication, "mainMenu"); //
- final Object mainMenuItem = invoke(nsmenuCls, mainMenu, "itemAtIndex", //
+ "sharedApplication");
+ final Object mainMenu = invoke(sharedApplication, "mainMenu");
+ final Object mainMenuItem = invoke(nsmenuCls, mainMenu, "itemAtIndex",
new Object[] { wrapPointer(0) });
- final Object appMenu = invoke(mainMenuItem, "submenu"); //
+ final Object appMenu = invoke(mainMenuItem, "submenu");
// Create the About <application-name> menu command
- final Object aboutMenuItem = invoke(nsmenuCls, appMenu, "itemAtIndex", //
+ final Object aboutMenuItem = invoke(nsmenuCls, appMenu, "itemAtIndex",
new Object[] { wrapPointer(kAboutMenuItem) });
- final Object nsStrAbout = invoke(nsstringCls, "stringWith", //
- new Object[] { String.format(Messages.getString("main.about"), Constants.APP_NAME) }); //
- invoke(nsmenuitemCls, aboutMenuItem, "setTitle", //
+ final Object nsStrAbout = invoke(nsstringCls, "stringWith",
+ new Object[] { String.format(Messages.getString("main.about"), Constants.APP_NAME) });
+ invoke(nsmenuitemCls, aboutMenuItem, "setTitle",
new Object[] { nsStrAbout });
// Rename the quit action.
final Object quitMenuItem = invoke(nsmenuCls, appMenu,
- "itemAtIndex", new Object[] { wrapPointer(kQuitMenuItem) }); //
- final Object nsStrQuit = invoke(nsstringCls, "stringWith", //
- new Object[] { String.format(Messages.getString("main.quit"), Constants.APP_NAME) }); //
- invoke(nsmenuitemCls, quitMenuItem, "setTitle", //
+ "itemAtIndex", new Object[] { wrapPointer(kQuitMenuItem) });
+ final Object nsStrQuit = invoke(nsstringCls, "stringWith",
+ new Object[] { String.format(Messages.getString("main.quit"), Constants.APP_NAME) });
+ invoke(nsmenuitemCls, quitMenuItem, "setTitle",
new Object[] { nsStrQuit });
// Rename the hide action.
final Object hideMenuItem = invoke(nsmenuCls, appMenu,
- "itemAtIndex", //
+ "itemAtIndex",
new Object[] { wrapPointer(kHideApplicationMenuItem) });
- final Object nsStrHide = invoke(nsstringCls, "stringWith", //
- new Object[] { String.format(Messages.getString("main.hide"), Constants.APP_NAME) }); //
- invoke(nsmenuitemCls, hideMenuItem, "setTitle", //
+ final Object nsStrHide = invoke(nsstringCls, "stringWith",
+ new Object[] { String.format(Messages.getString("main.hide"), Constants.APP_NAME) });
+ invoke(nsmenuitemCls, hideMenuItem, "setTitle",
new Object[] { nsStrHide });
// Enable the Preferences menuItem.
- final Object prefMenuItem = invoke(nsmenuCls, appMenu, "itemAtIndex", //
+ final Object prefMenuItem = invoke(nsmenuCls, appMenu, "itemAtIndex",
new Object[] { wrapPointer(kPreferencesMenuItem) });
- invoke(nsmenuitemCls, prefMenuItem, "setEnabled", new Object[] { true }); //
+ invoke(nsmenuitemCls, prefMenuItem, "setEnabled", new Object[] { true });
// Set the action to execute when the About or Preferences menuItem is
// invoked.
- //
+
// We don't need to set the target here as the current target is the
// SWTApplicationDelegate
// and we have registerd the new selectors on it. So just set the new
// action to invoke the
// selector.
- invoke(nsmenuitemCls, prefMenuItem, "setAction", //
+ invoke(nsmenuitemCls, prefMenuItem, "setAction",
new Object[] { wrapPointer(sel_preferencesMenuItemSelected_) });
- invoke(nsmenuitemCls, aboutMenuItem, "setAction", //
+ invoke(nsmenuitemCls, aboutMenuItem, "setAction",
new Object[] { wrapPointer(sel_aboutMenuItemSelected_) });
}
private static long registerName(final Class<?> osCls, final String name)
throws IllegalArgumentException, SecurityException {
- final Object object = invoke(osCls, "sel_registerName", //
+ final Object object = invoke(osCls, "sel_registerName",
new Object[] { name });
return convertToLong(object);
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/FileUploadSource.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/FileUploadSource.java
index f15e5f6e..d556ccae 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/FileUploadSource.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/FileUploadSource.java
@@ -47,7 +47,7 @@ public class FileUploadSource implements PartSource {
@Override
public String getFileName() {
- return "sign.pdf"; //
+ return "sign.pdf";
}
@Override
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SignaturePlaceholderCache.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SignaturePlaceholderCache.java
index 00422b32..7e743a93 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SignaturePlaceholderCache.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SignaturePlaceholderCache.java
@@ -49,12 +49,12 @@ public class SignaturePlaceholderCache {
.getLogger(SignaturePlaceholderCache.class);
private static void saveImage(BufferedImage image, String fileDir, String fileName, String fileExt) throws IOException {
- File file = new File(fileDir, fileName + "." + fileExt); //
+ File file = new File(fileDir, fileName + "." + fileExt);
ImageIO.write(image, fileExt, file); // ignore returned boolean
}
private static Image loadImage(String fileDir, String fileName, String fileExt) throws IOException {
- return ImageIO.read(new File(fileDir, fileName + "." + fileExt)); //
+ return ImageIO.read(new File(fileDir, fileName + "." + fileExt));
}
/**
@@ -65,19 +65,19 @@ public class SignaturePlaceholderCache {
public static Image getPlaceholder(SignatureParameter param) {
final String fileDir = Constants.CONFIG_DIRECTORY;
final String imgFileName = Constants.PLACEHOLDER_CACHE_FILENAME;
- final String imgFileExt = "png"; //
+ final String imgFileExt = "png";
final String propFileName = Constants.PLACEHOLDER_CACHE_PROPS_FILENAME;
- final String sigLangProp = "LANG"; //
- final String sigEmblProp = "EMBL"; //
- final String sigEHshProp = "EHSH"; //
- final String sigPdfAProp = "PDFA"; //
- final String sigNoteProp = "NOTE"; //
- final String sigProfProp = "PROF"; //
+ final String sigLangProp = "LANG";
+ final String sigEmblProp = "EMBL";
+ final String sigEHshProp = "EHSH";
+ final String sigPdfAProp = "PDFA";
+ final String sigNoteProp = "NOTE";
+ final String sigProfProp = "PROF";
String sigLang = param.getSignatureLanguage();
- String sigEmbl = ""; //
- String sigEHsh = ""; //
+ String sigEmbl = "";
+ String sigEHsh = "";
if (param.getEmblem() != null) {
Emblem embl = param.getEmblem();
if (embl instanceof CachedFileNameEmblem) {
@@ -88,9 +88,9 @@ public class SignaturePlaceholderCache {
}
}
String sigPdfA = param.getSignaturePdfACompat() ? Constants.TRUE : Constants.FALSE;
- String sigNote = param.getProperty("SIG_NOTE"); //
+ String sigNote = param.getProperty("SIG_NOTE");
if (sigNote == null)
- sigNote = ""; //
+ sigNote = "";
String profile = param.getSignatureProfile();
if (profile == null){
// set default value
@@ -107,18 +107,18 @@ public class SignaturePlaceholderCache {
sigNote.equals(sigProps.getProperty(sigNoteProp)) &&
sigPdfA.equals(sigProps.getProperty(sigPdfAProp)) &&
profile.equals(sigProps.getProperty(sigProfProp))) {
- log.debug("Placeholder cache hit"); //
+ log.debug("Placeholder cache hit");
return loadImage(fileDir, imgFileName, imgFileExt);
}
- log.debug("Placeholder cache miss (" + //
- sigLang + "|" + sigProps.getProperty(sigLangProp) + " - " +// //
- sigEmbl + "|" + sigProps.getProperty(sigEmblProp) + " - " + // //
- sigEHsh + "|" + sigProps.getProperty(sigEHshProp) + " - " + // //
- sigNote + "|" + sigProps.getProperty(sigNoteProp) + " - " + // //
- sigPdfA + "|" + sigProps.getProperty(sigPdfAProp) + " - " + // //
+ log.debug("Placeholder cache miss (" +
+ sigLang + "|" + sigProps.getProperty(sigLangProp) + " - " +//
+ sigEmbl + "|" + sigProps.getProperty(sigEmblProp) + " - " +
+ sigEHsh + "|" + sigProps.getProperty(sigEHshProp) + " - " +
+ sigNote + "|" + sigProps.getProperty(sigNoteProp) + " - " +
+ sigPdfA + "|" + sigProps.getProperty(sigPdfAProp) + " - " +
profile + "|" + sigProps.getProperty(sigProfProp) + ")");
} catch (Exception e) {
- log.warn("Can't load signature Placeholder", e); //
+ log.warn("Can't load signature Placeholder", e);
}
// create new cache
@@ -135,7 +135,7 @@ public class SignaturePlaceholderCache {
saveImage((BufferedImage) img, fileDir, imgFileName, imgFileExt);
return img;
} catch (IOException e) {
- log.error("Can't save signature Placeholder", e); //
+ log.error("Can't save signature Placeholder", e);
return param.getPlaceholder();
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/VersionComparator.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/VersionComparator.java
index 6321586b..9d06dfb1 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/VersionComparator.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/VersionComparator.java
@@ -27,8 +27,8 @@ public class VersionComparator implements Comparator<String> {
*/
@Override
public int compare(String v1, String v2) {
- String[] v1Parts = v1.split("\\.|-"); //
- String[] v2Parts = v2.split("\\.|-"); //
+ String[] v1Parts = v1.split("\\.|-");
+ String[] v2Parts = v2.split("\\.|-");
int length = Math.max(v1Parts.length, v2Parts.length);
for (int i = 0; i < length; ++i) {
@@ -37,7 +37,7 @@ public class VersionComparator implements Comparator<String> {
if (i < v1Parts.length)
v1Part = Integer.parseInt(v1Parts[i]);
} catch (NumberFormatException e) {
- if (v1Parts[i].equals("SNAPSHOT")) //
+ if (v1Parts[i].equals("SNAPSHOT"))
v1Part = Integer.MAX_VALUE;
}
@@ -46,7 +46,7 @@ public class VersionComparator implements Comparator<String> {
if (i < v2Parts.length)
v2Part = Integer.parseInt(v2Parts[i]);
} catch (NumberFormatException e) {
- if (v2Parts[i].equals("SNAPSHOT")) //
+ if (v2Parts[i].equals("SNAPSHOT"))
v2Part = Integer.MAX_VALUE;
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Zipper.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Zipper.java
index 4fd2528a..a25de58a 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Zipper.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Zipper.java
@@ -105,12 +105,12 @@ public class Zipper {
// consume all the data from this entry
if (entry.isDirectory()) {
- log.debug("Extracting directory: " + entry.getName()); //
+ log.debug("Extracting directory: " + entry.getName());
File nDir = new File(targetPath + File.separator + entry.getName());
if(!nDir.exists()) {
if(!nDir.mkdir()) {
- throw new IOException("Failed to create dir: " + entry.getName()); //
+ throw new IOException("Failed to create dir: " + entry.getName());
}
}
continue;
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java
index 8b05a528..640d42bc 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java
@@ -92,9 +92,9 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
try {
current.run();
} catch (Exception e) {
- log.error("StateMachine update: ", e); //
+ log.error("StateMachine update: ", e);
ErrorDialog errorState = new ErrorDialog(this.getMainShell(),
- Messages.getString("error.Unexpected"), BUTTONS.OK); //
+ Messages.getString("error.Unexpected"), BUTTONS.OK);
//errorState.setException(e);
//jumpToState(errorState);
errorState.open();
@@ -109,7 +109,7 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
if (this.mainWindow != null
&& !this.mainWindow.getShell().isDisposed()) {
- log.debug("Allowing MainWindow to update its state for " //
+ log.debug("Allowing MainWindow to update its state for "
+ current);
current.updateMainWindowBehavior();
this.mainWindow.applyBehavior();
@@ -121,13 +121,13 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
}
if (next == null) {
- log.info("Next state is null -> exit"); //
+ log.info("Next state is null -> exit");
this.status.setCurrentState(next);
break;
}
- log.debug("Changing state from: " //
- + current + " to " //
+ log.debug("Changing state from: "
+ + current + " to "
+ next.toString());
this.status.setCurrentState(next);
}
@@ -181,7 +181,7 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
this.shell.open();
this.shell.layout();
} catch (Exception e) {
- log.warn("Main-Window creation FAILED. Reason: " + e.getMessage()); //
+ log.warn("Main-Window creation FAILED. Reason: " + e.getMessage());
this.display = null;
this.mainWindow = null;
this.shell = null;
@@ -214,7 +214,7 @@ public class StateMachineImpl implements StateMachine, GUIProvider {
Composite.class, int.class, State.class);
composite = constructor.newInstance(getComposite(), style, state);
} catch (Exception e) {
- log.error("Could not create Composite for Class " //
+ log.error("Could not create Composite for Class "
+ compositeClass.getName(), e);
}
return composite;
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StatusImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StatusImpl.java
index 2faf8b73..df64edf5 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StatusImpl.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StatusImpl.java
@@ -73,13 +73,13 @@ public class StatusImpl implements Status {
*/
public void setCurrentState(State currentState) {
//if (this.previousState == this.currentState)
- // log.error("Changing to same state? " + this.currentState); //
+ // log.error("Changing to same state? " + this.currentState);
if (this.previousState != null && !this.previousState.equals(currentState))
{
//Reference to previous state will be lost - perform cleanup
- log.debug("Changing from " + this.currentState + " to " + currentState); // //
- log.debug("Cleaning up " + this.previousState); //
+ log.debug("Changing from " + this.currentState + " to " + currentState);
+ log.debug("Cleaning up " + this.previousState);
this.previousState.cleanUp();
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java
index 38526326..3dd0dd7c 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java
@@ -32,7 +32,7 @@ public interface ConfigProvider {
/**
* RegEx for parsing signature position
*/
- public static final String SIGN_POS_REGEX = "(x=(\\d\\.?\\d?);y=(\\d\\.?\\d?);p=(\\d))|(auto)|(x=(\\d\\.?\\d?);y=(\\d\\.?\\d?))"; //
+ public static final String SIGN_POS_REGEX = "(x=(\\d\\.?\\d?);y=(\\d\\.?\\d?);p=(\\d))|(auto)|(x=(\\d\\.?\\d?);y=(\\d\\.?\\d?))";
/**
* Loads the configuration from a configuration file
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
index 6edd7662..1377f4ac 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
@@ -59,7 +59,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
/**
* An empty property entry
*/
- private static final String STRING_EMPTY = ""; //
+ private static final String STRING_EMPTY = "";
private String configurationFile = Constants.DEFAULT_CONFIG_FILENAME;
@@ -162,7 +162,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
this.configuration.setMobileBKUType(MobileBKUs.valueOf(
bkuType.trim().toUpperCase()));
} catch (IllegalArgumentException e) {
- log.error("Invalid BKU type: " + bkuType); //
+ log.error("Invalid BKU type: " + bkuType);
this.configuration.setMobileBKUType(DEFAULT_MOBILE_BKU_TYPE);
}
}
@@ -179,7 +179,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
if (port > 0 && port <= 0xFFFF)
setProxyPort(port);
else
- log.warn("Proxy port is out of range!: " + port); //
+ log.warn("Proxy port is out of range!: " + port);
}
// Set Default BKU
@@ -189,10 +189,10 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
try {
defaultBKU = BKUs.valueOf(bkuString);
} catch (IllegalArgumentException ex) {
- log.error("Invalid BKU config value " + bkuString + " using none!"); // //
+ log.error("Invalid BKU config value " + bkuString + " using none!");
defaultBKU = BKUs.NONE;
} catch (NullPointerException ex) {
- log.error("Invalid BKU config value " + bkuString + " using none!"); // //
+ log.error("Invalid BKU config value " + bkuString + " using none!");
defaultBKU = BKUs.NONE;
}
}
@@ -205,7 +205,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
try {
transparency = Integer.parseInt(trans);
} catch (NumberFormatException e) {
- log.debug("Couldn't parse placeholder transparency", e); //
+ log.debug("Couldn't parse placeholder transparency", e);
// ignore parsing exception
}
}
@@ -226,7 +226,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
width = Integer.parseInt(size.substring(0, pos).trim());
height = Integer.parseInt(size.substring(pos + 1).trim());
} catch (NumberFormatException e) {
- log.debug("Couldn't parse main window size", e); //
+ log.debug("Couldn't parse main window size", e);
// ignore parsing exception
}
}
@@ -257,7 +257,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
position = new SignaturePosition(x, y, p);
} catch (NumberFormatException ex) {
log.error(
- "Signature Position read from config failed: Not a valid number", ex); //
+ "Signature Position read from config failed: Not a valid number", ex);
}
} else if (matcher.group(5) != null) {
// we have format auto
@@ -273,10 +273,10 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
position = new SignaturePosition(x, y);
}
} else {
- log.error("Signature Position read from config failed: wrong group Count!"); //
+ log.error("Signature Position read from config failed: wrong group Count!");
}
} else {
- log.error("Signature Position read from config failed: not matching string"); //
+ log.error("Signature Position read from config failed: not matching string");
}
}
setDefaultSignaturePosition(position);
@@ -338,7 +338,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
Integer.toString(getPlaceholderTransparency()));
Point size = this.configuration.getMainWindowSize();
- props.setProperty(Constants.CFG_MAINWINDOW_SIZE, size.x + "," + size.y); //
+ props.setProperty(Constants.CFG_MAINWINDOW_SIZE, size.x + "," + size.y);
Locale configLocale = getLocale();
if(configLocale != null) {
@@ -366,12 +366,12 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
SignaturePosition pos = getDefaultSignaturePositionPersistent();
if (pos == null) {
- props.setProperty(Constants.CFG_SIGNATURE_POSITION, ""); //
+ props.setProperty(Constants.CFG_SIGNATURE_POSITION, "");
} else if (pos.useAutoPositioning()) {
- props.setProperty(Constants.CFG_SIGNATURE_POSITION, "auto"); //
+ props.setProperty(Constants.CFG_SIGNATURE_POSITION, "auto");
} else {
props.setProperty(Constants.CFG_SIGNATURE_POSITION,
- String.format((Locale) null, "x=%f;y=%f;p=%d", //
+ String.format((Locale) null, "x=%f;y=%f;p=%d",
pos.getX(), pos.getY(), pos.getPage()));
}
@@ -415,9 +415,9 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
FileOutputStream outputstream = new FileOutputStream(configFile, false);
- props.store(outputstream, "Configuration file was generated!"); //
+ props.store(outputstream, "Configuration file was generated!");
- log.info("Configuration file saved to " + configFile.getAbsolutePath()); //
+ log.info("Configuration file saved to " + configFile.getAbsolutePath());
}
@@ -676,7 +676,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
this.configuration.setEmblem(emblem);
}
} catch (InvalidEmblemFile e) {
- log.error("Error setting emblem file", e); //
+ log.error("Error setting emblem file", e);
try {
this.configuration.setEmblem(STRING_EMPTY);
} catch (InvalidEmblemFile e1) {
@@ -697,7 +697,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
this.configurationOverlay.setEmblem(emblem);
}
} catch (InvalidEmblemFile e) {
- log.error("Error setting emblem file", e); //
+ log.error("Error setting emblem file", e);
try {
this.configurationOverlay.setEmblem(STRING_EMPTY);
} catch (InvalidEmblemFile e1) {
@@ -797,7 +797,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
try {
this.configuration.setProxyPort(port);
} catch (InvalidPortException e) {
- log.error("Error setting proxy port" , e); //
+ log.error("Error setting proxy port" , e);
// ignore
}
}
@@ -810,7 +810,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
try {
this.configurationOverlay.setProxyPort(port);
} catch (InvalidPortException e) {
- log.error("Error setting proxy port" , e); //
+ log.error("Error setting proxy port" , e);
// ignore
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/KSState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/KSState.java
index 86d8f32f..21a3a2ac 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/KSState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/KSState.java
@@ -70,10 +70,10 @@ public class KSState extends State {
String file = config.getKeyStoreFile();
File f = new File(file);
if (!f.isFile()) {
- log.error("Keystore not found"); //
+ log.error("Keystore not found");
ErrorDialog dialog = new ErrorDialog(
getStateMachine().getGUIProvider().getMainShell(),
- String.format(Messages.getString("error.KeyStoreFileNotExist"), f.getName()), //
+ String.format(Messages.getString("error.KeyStoreFileNotExist"), f.getName()),
BUTTONS.RETRY_CANCEL);
if (dialog.open() != SWT.RETRY) {
//getStateMachine().exit();
@@ -88,25 +88,25 @@ public class KSState extends State {
if (storePass.isEmpty()) {
PasswordInputDialog pwd = new PasswordInputDialog(
getStateMachine().getGUIProvider().getMainShell(),
- Messages.getString("keystore_config.KeystoreStorePass"), //
- Messages.getString("keystore.KeystoreStorePassEntry")); //
+ Messages.getString("keystore_config.KeystoreStorePass"),
+ Messages.getString("keystore.KeystoreStorePassEntry"));
storePass = pwd.open();
}
String keyPass = config.getKeyStoreKeyPass();
if (keyPass.isEmpty()) {
PasswordInputDialog pwd = new PasswordInputDialog(
getStateMachine().getGUIProvider().getMainShell(),
- Messages.getString("keystore_config.KeystoreKeyPass"), //
- Messages.getString("keystore.KeystoreKeyPassEntry")); //
+ Messages.getString("keystore_config.KeystoreKeyPass"),
+ Messages.getString("keystore.KeystoreKeyPassEntry"));
keyPass = pwd.open();
}
String type = config.getKeyStoreType();
signingState.setKSSigner(file, alias, storePass, keyPass, type);
} catch (SignatureException e) {
- log.error("Error loading keystore", e); //
+ log.error("Error loading keystore", e);
ErrorDialog dialog = new ErrorDialog(
getStateMachine().getGUIProvider().getMainShell(),
- Messages.getString("error.KeyStore"), //
+ Messages.getString("error.KeyStore"),
BUTTONS.RETRY_CANCEL);
if (dialog.open() != SWT.RETRY) {
//getStateMachine().exit();
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java
index ed6ee411..91fae1cc 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java
@@ -51,17 +51,17 @@ public class LocalBKUState extends State {
/**
* HTTP Response server HEADER
*/
- public final static String BKU_RESPONSE_HEADER_SERVER = "server"; //
+ public final static String BKU_RESPONSE_HEADER_SERVER = "server";
/**
* HTTP Response user-agent HEADER
*/
- public final static String BKU_RESPONSE_HEADER_USERAGENT = "user-agent"; //
+ public final static String BKU_RESPONSE_HEADER_USERAGENT = "user-agent";
/**
* HTTP Response SignatureLayout HEADER
*/
- public final static String BKU_RESPONSE_HEADER_SIGNATURE_LAYOUT = "SignatureLayout"; //
+ public final static String BKU_RESPONSE_HEADER_SIGNATURE_LAYOUT = "SignatureLayout";
Exception threadException = null;
@@ -71,8 +71,8 @@ public class LocalBKUState extends State {
/**
* Null-Operation SL-Request
*/
- private final static String NULL_OPERATION_REQUEST = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + //
- "<sl:NullOperationRequest xmlns:sl=\"http://www.buergerkarte.at/namespaces/securitylayer/1.2#\"/>"; //
+ private final static String NULL_OPERATION_REQUEST = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
+ "<sl:NullOperationRequest xmlns:sl=\"http://www.buergerkarte.at/namespaces/securitylayer/1.2#\"/>";
/**
* Constructor
@@ -109,7 +109,7 @@ public class LocalBKUState extends State {
PostMethod method = new PostMethod(Constants.LOCAL_BKU_URL);
String sl_request = NULL_OPERATION_REQUEST;
- method.addParameter("XMLRequest", sl_request); //
+ method.addParameter("XMLRequest", sl_request);
int returnCode = client.executeMethod(method);
String userAgent = getResponseHeader(method, BKU_RESPONSE_HEADER_USERAGENT);
@@ -121,27 +121,27 @@ public class LocalBKUState extends State {
} else {
server = getResponseHeader(method, BKU_RESPONSE_HEADER_SERVER);
if (server == null)
- server = ""; //
+ server = "";
else
- if (server.contains("trustDeskbasic") || server.contains("asignSecurityLayer")) // //
+ if (server.contains("trustDeskbasic") || server.contains("asignSecurityLayer"))
LocalBKUState.this.useBase64Request = true;
userAgent = getResponseHeader(method, BKU_RESPONSE_HEADER_USERAGENT);
if (userAgent == null)
- userAgent = ""; //
+ userAgent = "";
String signatureLayout = getResponseHeader(method, BKU_RESPONSE_HEADER_SIGNATURE_LAYOUT);
- log.debug("Server - UA: " + server + " - " + userAgent); // //
+ log.debug("Server - UA: " + server + " - " + userAgent);
String response = method.getResponseBodyAsString();
- log.debug("SL Response: " + response); //
+ log.debug("SL Response: " + response);
SLResponse slResponse = new SLResponse(response, server,
userAgent, signatureLayout);
this.signingState.setSignatureResponse(slResponse);
this.signingState.setUseBase64Request(LocalBKUState.this.useBase64Request);
}
} catch (Exception e) {
- log.error("SignLocalBKUThread: ", e); //
+ log.error("SignLocalBKUThread: ", e);
this.state.threadException = e;
} finally {
@@ -186,7 +186,7 @@ public class LocalBKUState extends State {
if (this.threadException != null) {
ErrorDialog dialog = new ErrorDialog(
getStateMachine().getGUIProvider().getMainShell(),
- Messages.getString("error.LocalBKU"), //
+ Messages.getString("error.LocalBKU"),
BUTTONS.RETRY_CANCEL);
if (dialog.open() != SWT.RETRY) {
//getStateMachine().exit();
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
index 153d4b1d..f130c0e6 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java
@@ -164,11 +164,11 @@ public class MobileBKUState extends State {
* the exception
*/
public void displayError(Exception e) {
- String message = Messages.getString("error.Unexpected"); //
+ String message = Messages.getString("error.Unexpected");
log.error(message, e);
String errormsg = e.getLocalizedMessage();
if (errormsg != null && !errormsg.isEmpty())
- message += ": " + errormsg; //
+ message += ": " + errormsg;
displayError(message);
}
@@ -207,7 +207,7 @@ public class MobileBKUState extends State {
ui.setErrorMessage(mobileStatus.errorMessage);
mobileStatus.errorMessage = null;
} else if (mobileStatus instanceof ATrustStatus) {
- ui.setErrorMessage(Messages.getString("mobileBKU.aTrustDisclaimer")); //
+ ui.setErrorMessage(Messages.getString("mobileBKU.aTrustDisclaimer"));
}
if (ui.getMobileNumber() == null
@@ -234,7 +234,7 @@ public class MobileBKUState extends State {
if (ui.userCancel) {
ui.userCancel = false;
- mobileStatus.errorMessage = "cancel"; //
+ mobileStatus.errorMessage = "cancel";
return;
}
@@ -313,7 +313,7 @@ public class MobileBKUState extends State {
try {
String resp = handler.getSignaturePage();
if (handler.handleQRResponse(resp)) {
- log.debug("Signature page response: " + resp); //
+ log.debug("Signature page response: " + resp);
getMobileBKUQRComposite().setDone(true);
Display display = getStateMachine().getGUIProvider().
getMainShell().getDisplay();
@@ -322,7 +322,7 @@ public class MobileBKUState extends State {
}
Display.getDefault().wake();
} catch (Exception e) {
- log.error("Error getting signature page", e); //
+ log.error("Error getting signature page", e);
}
}
}, 0, 5000);
@@ -336,7 +336,7 @@ public class MobileBKUState extends State {
InputStream qrcode = handler.getQRCode();
if (qrcode == null) {
MobileBKUState.this.threadException = new Exception(
- Messages.getString("error.FailedToLoadQRCode")); //
+ Messages.getString("error.FailedToLoadQRCode"));
}
qr.setQR(qrcode);
getStateMachine().getGUIProvider().display(qr);
@@ -470,7 +470,7 @@ public class MobileBKUState extends State {
try {
String resp = handler.getSignaturePage();
if (handler.handleQRResponse(resp)) {
- log.debug("Signature page response: " + resp); //
+ log.debug("Signature page response: " + resp);
getMobileBKUFingerprintComposite().setDone(true);
Display display = getStateMachine().getGUIProvider().getMainShell().getDisplay();
display.wake();
@@ -478,7 +478,7 @@ public class MobileBKUState extends State {
}
Display.getDefault().wake();
} catch (Exception e) {
- log.error("Error getting signature page", e); //
+ log.error("Error getting signature page", e);
}
}
}, 0, 5000);
@@ -538,15 +538,15 @@ public class MobileBKUState extends State {
this.signingState = getStateMachine().getStatus().getSigningState();
this.signingState.setBKUConnector(new MobileBKUConnector(this));
- log.debug("Setting base64 request to " + this.handler.useBase64Request()); //
+ log.debug("Setting base64 request to " + this.handler.useBase64Request());
this.signingState.setUseBase64Request(this.handler.useBase64Request());
if (this.threadException != null) {
- String message = Messages.getString("error.Unexpected"); //
+ String message = Messages.getString("error.Unexpected");
log.error(message, this.threadException);
String errormsg = this.threadException.getLocalizedMessage();
if (errormsg != null && !errormsg.isEmpty())
- message += ": " + errormsg; //
+ message += ": " + errormsg;
ErrorDialog error = new ErrorDialog(
getStateMachine().getGUIProvider().getMainShell(),
message, BUTTONS.OK);
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java
index 78b9db3c..1e04a446 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java
@@ -67,7 +67,7 @@ public class OpenState extends State {
**/
private static final Logger log = LoggerFactory
.getLogger(OpenState.class);
- private static final String advancedConfig = Constants.CONFIG_DIRECTORY + File.separator + "/cfg/advancedconfig.properties"; //
+ private static final String advancedConfig = Constants.CONFIG_DIRECTORY + File.separator + "/cfg/advancedconfig.properties";
private DataSourceSelectComposite selectionComposite = null;
@@ -106,7 +106,7 @@ public class OpenState extends State {
return;
}
}
- log.debug("Got Datasource: " + getStateMachine().getStatus().getDocument().getAbsolutePath()); //
+ log.debug("Got Datasource: " + getStateMachine().getStatus().getDocument().getAbsolutePath());
// scan for signature placeholders
// - see if we want to scan for placeholders in the settings
@@ -128,8 +128,8 @@ public class OpenState extends State {
// icon
MessageBox dialog = new MessageBox(getStateMachine().getGUIProvider().getMainShell(),
SWT.ICON_QUESTION | SWT.YES | SWT.NO | SWT.CANCEL);
- dialog.setText(Messages.getString("dataSourceSelection.usePlaceholderTitle")); //
- dialog.setMessage(Messages.getString("dataSourceSelection.usePlaceholderText")); //
+ dialog.setText(Messages.getString("dataSourceSelection.usePlaceholderTitle"));
+ dialog.setMessage(Messages.getString("dataSourceSelection.usePlaceholderText"));
// open dialog and await user selection
int result = dialog.open();
@@ -143,8 +143,8 @@ public class OpenState extends State {
} else if (fields.size() > 1) {
PlaceholderSelectionGui gui = new PlaceholderSelectionGui(
- getStateMachine().getGUIProvider().getMainShell(), 65570, "text", //
- "select the fields", fields); //
+ getStateMachine().getGUIProvider().getMainShell(), 65570, "text",
+ "select the fields", fields);
int res = gui.open();
if (res != -1) {
getStateMachine().getStatus().setSearchForPlaceholderSignature(true);
@@ -174,8 +174,8 @@ public class OpenState extends State {
// create a dialog with ok and cancel buttons and a question icon
MessageBox dialog = new MessageBox(getStateMachine().getGUIProvider().getMainShell(),
SWT.ICON_QUESTION | SWT.YES | SWT.NO | SWT.CANCEL);
- dialog.setText(Messages.getString("dataSourceSelection.usePlaceholderTitle")); //
- dialog.setMessage(Messages.getString("dataSourceSelection.usePlaceholderText")); //
+ dialog.setText(Messages.getString("dataSourceSelection.usePlaceholderTitle"));
+ dialog.setMessage(Messages.getString("dataSourceSelection.usePlaceholderText"));
// open dialog and await user selection
int result = dialog.open();
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java
index 89b7d346..79e6551e 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java
@@ -52,7 +52,7 @@ public class OutputState extends State {
ConfigProvider config = getStateMachine().getConfigProvider();
Status status = getStateMachine().getStatus();
- File tmpDir = new File(config.getConfigurationDirectory() + File.separator + "tmp"); //
+ File tmpDir = new File(config.getConfigurationDirectory() + File.separator + "tmp");
if(!tmpDir.exists()) {
tmpDir.mkdir();
@@ -83,7 +83,7 @@ public class OutputState extends State {
if (status.getSignResult() == null) {
ErrorDialog error = new ErrorDialog(getStateMachine().getGUIProvider().getMainShell(),
- Messages.getString("error.Signatur"), BUTTONS.RETRY_CANCEL); //
+ Messages.getString("error.Signatur"), BUTTONS.RETRY_CANCEL);
if(error.open() == SWT.RETRY) {
this.setNextState(new PrepareSigningState(getStateMachine()));
} else {
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
index df157774..6e1710bf 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
@@ -124,7 +124,7 @@ public class PositioningState extends State {
Emblem emblem = new CachedFileNameEmblem(config.getDefaultEmblem());
param.setEmblem(emblem);
if(config.getSignatureNote() != null && !config.getSignatureNote().isEmpty()) {
- param.setProperty("SIG_NOTE", config.getSignatureNote()); //
+ param.setProperty("SIG_NOTE", config.getSignatureNote());
}
param.setSignatureLanguage(config.getSignatureLocale().getLanguage());
@@ -156,15 +156,15 @@ public class PositioningState extends State {
if ((this.document == null) ||
(this.loadedDocumentPath != getStateMachine().getStatus().getDocument())) {
- log.debug("Checking PDF document for encryption"); //
+ log.debug("Checking PDF document for encryption");
try {
openPDFDocument();
} catch (IOException e) {
this.positionComposite = null;
- log.error("Failed to display PDF document", e); //
+ log.error("Failed to display PDF document", e);
String message = e.getLocalizedMessage();
if (message == null)
- message = Messages.getString("error.IOError"); //
+ message = Messages.getString("error.IOError");
ErrorDialog dialog = new ErrorDialog(
getStateMachine().getGUIProvider().getMainShell(),
message, BUTTONS.RETRY_CANCEL);
@@ -182,10 +182,10 @@ public class PositioningState extends State {
try {
position = this.getPositioningComposite(this.document);
} catch(Exception ex) {
- log.error("Failed to create composite (probably a mac...)", ex); //
+ log.error("Failed to create composite (probably a mac...)", ex);
ErrorDialog dialog = new ErrorDialog(
getStateMachine().getGUIProvider().getMainShell(),
- Messages.getString("error.PositioningNotPossible"), BUTTONS.OK); //
+ Messages.getString("error.PositioningNotPossible"), BUTTONS.OK);
dialog.open();
status.setSignaturePosition(new SignaturePosition());
this.setNextState(new BKUSelectionState(getStateMachine()));
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java
index 062231b4..b31ba4a9 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java
@@ -114,7 +114,7 @@ public class PrepareConfigurationState extends State {
new FileInputStream(
getStateMachine().getConfigProvider().getConfigurationDirectory() + FILE_SEPARATOR + filename));
- log.info("Loaded config from file : " + filename); //
+ log.info("Loaded config from file : " + filename);
} catch (FileNotFoundException ex) {
if (filename.equals(Constants.DEFAULT_CONFIG_FILENAME)) {
// we only check for resource config file if it is the
@@ -125,7 +125,7 @@ public class PrepareConfigurationState extends State {
getStateMachine().getConfigProvider()
.loadConfiguration(is);
- log.info("Loaded config from resource : " + filename); //
+ log.info("Loaded config from resource : " + filename);
} catch (Exception eex) {
throw ex;
}
@@ -136,7 +136,7 @@ public class PrepareConfigurationState extends State {
} catch (IOException ex) {
throw new InitializationException(
- "Failed to read configuration from config file", ex); //
+ "Failed to read configuration from config file", ex);
}
}
@@ -150,7 +150,7 @@ public class PrepareConfigurationState extends State {
String note = config.getSignatureNote();
Locale loc = config.getSignatureLocale();
- String note_old = Messages.getString("simple_config.Note_Default_Old", loc); //
+ String note_old = Messages.getString("simple_config.Note_Default_Old", loc);
if (note.equals(note_old))
resetSignatureNoteField(config);
}
@@ -189,9 +189,9 @@ public class PrepareConfigurationState extends State {
}
} catch (Exception e) {
log.error(
- "Failed to write PDF Over config file to config directory", e); //
+ "Failed to write PDF Over config file to config directory", e);
throw new InitializationException(
- "Failed to write PDF Over config file to config directory", //
+ "Failed to write PDF Over config file to config directory",
e);
} finally {
if (pdfOverConfig != null) {
@@ -199,7 +199,7 @@ public class PrepareConfigurationState extends State {
pdfOverConfig.close();
} catch (IOException e) {
log.warn(
- "Failed to close File stream for PDFOver config", e); //
+ "Failed to close File stream for PDFOver config", e);
}
}
@@ -208,7 +208,7 @@ public class PrepareConfigurationState extends State {
inputStream.close();
} catch (IOException e) {
log.warn(
- "Failed to close Resource stream for PDFOver config", e); //
+ "Failed to close Resource stream for PDFOver config", e);
}
}
}
@@ -237,9 +237,9 @@ public class PrepareConfigurationState extends State {
PropertyConfigurator.configureAndWatch(filename);
} catch (Exception e) {
log.error(
- "Failed to write log4j config file to config directory", e); //
+ "Failed to write log4j config file to config directory", e);
throw new InitializationException(
- "Failed to write log4j config file to config directory", //
+ "Failed to write log4j config file to config directory",
e);
} finally {
if (pdfOverConfig != null) {
@@ -247,7 +247,7 @@ public class PrepareConfigurationState extends State {
pdfOverConfig.close();
} catch (IOException e) {
log.warn(
- "Failed to close File stream for log4j config", e); //
+ "Failed to close File stream for log4j config", e);
}
}
@@ -256,7 +256,7 @@ public class PrepareConfigurationState extends State {
inputStream.close();
} catch (IOException e) {
log.warn(
- "Failed to close Resource stream for log4j config", e); //
+ "Failed to close Resource stream for log4j config", e);
}
}
}*/
@@ -269,9 +269,9 @@ public class PrepareConfigurationState extends State {
Zipper.unzip(is, configDir.getAbsolutePath());
} catch (IOException e) {
log.error(
- "Failed to create local configuration directory!", e); //
+ "Failed to create local configuration directory!", e);
throw new InitializationException(
- "Failed to create local configuration directory!", //
+ "Failed to create local configuration directory!",
e);
}
}
@@ -280,14 +280,14 @@ public class PrepareConfigurationState extends State {
File versionFile = new File(configDir, Constants.CONFIG_VERSION_FILENAME);
try {
BufferedWriter versionWriter = new BufferedWriter(new FileWriter(versionFile));
- String version = Constants.APP_VERSION == null ? "Unknown" : Constants.APP_VERSION; //
+ String version = Constants.APP_VERSION == null ? "Unknown" : Constants.APP_VERSION;
versionWriter.write(version);
versionWriter.close();
} catch (IOException e) {
log.error(
- "Failed to create configuration version file!", e); //
+ "Failed to create configuration version file!", e);
throw new InitializationException(
- "Failed to create configuration version file!", //
+ "Failed to create configuration version file!",
e);
}
}
@@ -302,9 +302,9 @@ public class PrepareConfigurationState extends State {
getStateMachine().getConfigManipulator().saveCurrentConfiguration();
} catch (IOException e) {
log.error(
- "Failed to set local configuration signature note!", e); //
+ "Failed to set local configuration signature note!", e);
throw new InitializationException(
- "Failed to set local configuration signature note!", //
+ "Failed to set local configuration signature note!",
e);
}
}
@@ -312,7 +312,7 @@ public class PrepareConfigurationState extends State {
private void createConfiguration(File configDir) throws InitializationException {
boolean allOK = false;
- log.info("Creating configuration directory"); //
+ log.info("Creating configuration directory");
if (!configDir.exists()) {
configDir.mkdir();
}
@@ -345,14 +345,14 @@ public class PrepareConfigurationState extends State {
String version;
while ((version = versionReader.readLine()) != null) {
version = version.trim();
- if (version.length() > 0 && !version.startsWith("#")) { //
- log.trace("configuration version from " + versionFile //
- + ": " + version); //
+ if (version.length() > 0 && !version.startsWith("#")) {
+ log.trace("configuration version from " + versionFile
+ + ": " + version);
return version;
}
}
} catch (IOException ex) {
- log.error("failed to read configuration version from " //
+ log.error("failed to read configuration version from "
+ versionFile, ex);
} finally {
try {
@@ -362,7 +362,7 @@ public class PrepareConfigurationState extends State {
}
}
}
- log.debug("unknown configuration version"); //
+ log.debug("unknown configuration version");
return null;
}
@@ -373,24 +373,24 @@ public class PrepareConfigurationState extends State {
*/
private void backupAndCreatePdfAsConfiguration(File configDir) throws InitializationException {
try {
- File backup = File.createTempFile(Constants.PDF_AS_CONFIG_BACKUP_FILENAME, ".zip"); //
+ File backup = File.createTempFile(Constants.PDF_AS_CONFIG_BACKUP_FILENAME, ".zip");
OutputStream os = new FileOutputStream(backup);
- Zipper.zip(configDir + FILE_SEPARATOR + "cfg", os, true); //
+ Zipper.zip(configDir + FILE_SEPARATOR + "cfg", os, true);
os.close();
unzipPdfAsConfig(configDir);
- File b = new File(configDir, Constants.PDF_AS_CONFIG_BACKUP_FILENAME + ".zip"); //
+ File b = new File(configDir, Constants.PDF_AS_CONFIG_BACKUP_FILENAME + ".zip");
int i = 1;
while (b.exists()) {
- b = new File(configDir, Constants.PDF_AS_CONFIG_BACKUP_FILENAME + i++ + ".zip"); //
+ b = new File(configDir, Constants.PDF_AS_CONFIG_BACKUP_FILENAME + i++ + ".zip");
}
backup.renameTo(b);
updateVersionFile(configDir);
} catch (FileNotFoundException e) {
- log.error("Backup file not found", e); //
- throw new InitializationException("Backup file not found", e); //
+ log.error("Backup file not found", e);
+ throw new InitializationException("Backup file not found", e);
} catch (IOException e) {
- log.error("Error creating configuration backup", e); //
- throw new InitializationException("Error creating configuration backup", e); //
+ log.error("Error creating configuration backup", e);
+ throw new InitializationException("Error creating configuration backup", e);
}
}
@@ -405,10 +405,10 @@ public class PrepareConfigurationState extends State {
File configDir = new File(cDir);
File configFile = new File(configDir, Constants.DEFAULT_CONFIG_FILENAME);
if (!configDir.exists() || !configFile.exists()) {
- log.debug("Creating configuration file"); //
+ log.debug("Creating configuration file");
createConfiguration(configDir);
} else {
- log.debug("Configuration directory exists!"); //
+ log.debug("Configuration directory exists!");
// Check PDF-AS config version
File versionFile = new File(configDir, Constants.CONFIG_VERSION_FILENAME);
String configVersion = getVersion(versionFile);
@@ -422,9 +422,9 @@ public class PrepareConfigurationState extends State {
initializeFromArguments(stateMachine.getCmdArgs(),
this.configFileHandler);
} catch (InitializationException e) {
- log.error("Error in cmd line arguments: ", e); //
+ log.error("Error in cmd line arguments: ", e);
ErrorDialog error = new ErrorDialog(gui.getMainShell(),
- Messages.getString("error.CmdLineArgs") + "\n" + // //
+ Messages.getString("error.CmdLineArgs") + "\n" +
e.getMessage(),
BUTTONS.OK);
error.open();
@@ -440,18 +440,18 @@ public class PrepareConfigurationState extends State {
initializeFromArguments(stateMachine.getCmdArgs(),
this.handler);
} catch (InitializationException e) {
- log.error("Error in cmd line arguments: ", e); //
+ log.error("Error in cmd line arguments: ", e);
ErrorDialog error;
if (e.getCause() instanceof FileNotFoundException) {
error = new ErrorDialog(gui.getMainShell(),
String.format(
- Messages.getString("error.FileNotExist"), //
+ Messages.getString("error.FileNotExist"),
e.getCause().getMessage()),
BUTTONS.OK);
} else {
error = new ErrorDialog(gui.getMainShell(),
- Messages.getString("error.CmdLineArgs") + "\n" + // //
+ Messages.getString("error.CmdLineArgs") + "\n" +
e.getMessage(),
BUTTONS.OK);
}
@@ -476,7 +476,7 @@ public class PrepareConfigurationState extends State {
// invoke GUI message in main thread
gui.getMainShell().getDisplay().asyncExec(() -> {
Dialog info = new Dialog(gui.getMainShell(),
- Messages.getString("version_check.UpdateTitle"), //
+ Messages.getString("version_check.UpdateTitle"),
String.format(Messages.getString("version_check.UpdateText"), version),
BUTTONS.OK_CANCEL, ICON.INFORMATION);
@@ -486,16 +486,16 @@ public class PrepareConfigurationState extends State {
try {
Desktop.getDesktop().browse(new URI(Constants.UPDATE_URL));
} catch (Exception e) {
- log.error("Error opening update location ", e); //
+ log.error("Error opening update location ", e);
}
} else {
- log.info("SWT Desktop is not supported on this platform"); //
+ log.info("SWT Desktop is not supported on this platform");
Program.launch(Constants.UPDATE_URL);
}
}
});
} catch (Exception e) {
- log.error("Error downloading update information: ", e); //
+ log.error("Error downloading update information: ", e);
}
}).start();
}
@@ -514,10 +514,10 @@ public class PrepareConfigurationState extends State {
setNextState(new OpenState(stateMachine));
} catch (InitializationException e) {
- log.error("Failed to initialize: ", e); //
+ log.error("Failed to initialize: ", e);
ErrorDialog error = new ErrorDialog(getStateMachine()
.getGUIProvider().getMainShell(),
- Messages.getString("error.Initialization"), //
+ Messages.getString("error.Initialization"),
BUTTONS.OK);
// error.setException(e);
// setNextState(error);
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
index 11f5459a..10d1cd9f 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
@@ -80,33 +80,33 @@ public class PrepareSigningState extends State {
final String proxyPass = configuration.getProxyPass();
if (proxyHost != null && !proxyHost.isEmpty()) {
- log.debug("Setting proxy host to " + proxyHost); //
- System.setProperty("http.proxyHost", proxyHost); //
- System.setProperty("https.proxyHost", proxyHost); //
+ log.debug("Setting proxy host to " + proxyHost);
+ System.setProperty("http.proxyHost", proxyHost);
+ System.setProperty("https.proxyHost", proxyHost);
}
if (proxyPort > 0 && proxyPort <= 0xFFFF) {
String port = Integer.toString(proxyPort);
- log.debug("Setting proxy port to " + port); //
- System.setProperty("http.proxyPort", port); //
- System.setProperty("https.proxyPort", port); //
+ log.debug("Setting proxy port to " + port);
+ System.setProperty("http.proxyPort", port);
+ System.setProperty("https.proxyPort", port);
}
if (proxyUser != null && !proxyUser.isEmpty()) {
- log.debug("Setting proxy username to " + proxyUser); //
- System.setProperty("http.proxyUser", proxyUser); //
- System.setProperty("https.proxyUser", proxyUser); //
+ log.debug("Setting proxy username to " + proxyUser);
+ System.setProperty("http.proxyUser", proxyUser);
+ System.setProperty("https.proxyUser", proxyUser);
}
if (proxyPass != null) {
- log.debug("Setting proxy password"); //
- System.setProperty("http.proxyPassword", proxyPass); //
- System.setProperty("https.proxyPassword", proxyPass); //
+ log.debug("Setting proxy password");
+ System.setProperty("http.proxyPassword", proxyPass);
+ System.setProperty("https.proxyPassword", proxyPass);
}
if (proxyUser != null && !proxyUser.isEmpty() &&
proxyPass != null && !proxyPass.isEmpty()) {
- log.debug("Enabling proxy authentication"); //
+ log.debug("Enabling proxy authentication");
Authenticator.setDefault(new Authenticator() {
/* (non-Javadoc)
* @see java.net.Authenticator#getPasswordAuthentication()
@@ -153,7 +153,7 @@ public class PrepareSigningState extends State {
if (configuration.getSignatureNote() != null
&& !configuration.getSignatureNote().isEmpty()) {
this.state.signatureParameter.setProperty(
- "SIG_NOTE", configuration.getSignatureNote()); //
+ "SIG_NOTE", configuration.getSignatureNote());
}
this.state.signatureParameter
@@ -172,7 +172,7 @@ public class PrepareSigningState extends State {
.prepare(this.state.signatureParameter);
} catch (Exception e) {
- log.error("PrepareDocumentThread: ", e); //
+ log.error("PrepareDocumentThread: ", e);
this.state.threadException = e;
} finally {
this.state.updateStateMachine();
@@ -228,7 +228,7 @@ public class PrepareSigningState extends State {
if (this.threadException != null) {
ErrorDialog error = new ErrorDialog(getStateMachine()
.getGUIProvider().getMainShell(),
- Messages.getString("error.PrepareDocument"), //
+ Messages.getString("error.PrepareDocument"),
BUTTONS.RETRY_CANCEL);
this.threadException = null;
if (error.open() == SWT.RETRY) {
@@ -249,7 +249,7 @@ public class PrepareSigningState extends State {
} else if (status.getBKU() == BKUs.KS) {
this.setNextState(new KSState(getStateMachine()));
} else {
- log.error("Invalid selected BKU Value \"NONE\" in PrepareSigningState!"); //
+ log.error("Invalid selected BKU Value \"NONE\" in PrepareSigningState!");
this.setNextState(new BKUSelectionState(getStateMachine()));
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java
index 12412b42..3bc67d65 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java
@@ -102,13 +102,13 @@ public class SigningState extends State {
this.threadException = new SignatureException(new IllegalStateException());
}
- String message = Messages.getString("error.Signatur"); //
+ String message = Messages.getString("error.Signatur");
if (this.threadException instanceof SignatureException) {
Throwable cause = this.threadException;
while (cause.getCause() != null)
cause = cause.getCause();
if (cause instanceof ConnectException)
- message += ": " + cause.getMessage(); //
+ message += ": " + cause.getMessage();
if (cause instanceof IllegalStateException) {
// Dummy exception - don't display error, go back to BKU Selection
this.setNextState(new BKUSelectionState(getStateMachine()));