summaryrefslogtreecommitdiffstats
path: root/idrop-swing
diff options
context:
space:
mode:
authorMike Conway <michael.c.conway@gmail.com>2011-10-31 18:52:08 (GMT)
committer Mike Conway <michael.c.conway@gmail.com>2011-10-31 18:52:08 (GMT)
commit880018149dcf5da1aac5d48b1d2c4db5f493b54a (patch)
treef821c5f3000231ba90e245616ce78663b2ee31c5 /idrop-swing
parente4a8a33337bc2c58ab14119858c39b37271cda50 (diff)
downloadQCG-Data-880018149dcf5da1aac5d48b1d2c4db5f493b54a.zip
QCG-Data-880018149dcf5da1aac5d48b1d2c4db5f493b54a.tar.gz
QCG-Data-880018149dcf5da1aac5d48b1d2c4db5f493b54a.tar.bz2
[#517] idrop startup error with numberformatexception
Diffstat (limited to 'idrop-swing')
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropConfig.java83
-rw-r--r--idrop-swing/src/main/resources/idrop.properties4
2 files changed, 44 insertions, 43 deletions
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropConfig.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropConfig.java
index 2e88acc..7662f0c 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropConfig.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropConfig.java
@@ -155,8 +155,8 @@ public class IdropConfig {
return verify;
}
-
- /**
+
+ /**
* Should connections be re-routed on put/get based on file resource containing files
* @return
*/
@@ -170,47 +170,47 @@ public class IdropConfig {
}
return bool;
}
-
+
/**
* Should transfer progress within a file be shown?
* @return <code>boolean</code> that will be <code>true</code> if intra-file call-backs are desired.
*/
- public boolean isIntraFileStatusCallbacks() {
+ public boolean isIntraFileStatusCallbacks() {
return getBooleanForKey(IdropConfigurationService.INTRA_FILE_STATUS_CALLBACKS);
}
- /**
- * Time-out (in seconds) for the main iRODS connection. This can be set to 0 or less to inactivate
- * @return
- */
- public int getIrodsConnectionTimeout() {
- return getIntForKey("idrop.irods.timeout");
- }
-
- /**
- * Time-out (in seconds) for iRODS connections during parallel transfer. This can be set to 0 or less to inactivate
- * @return
- */
- public int getIrodsParallelConnectionTimeout() {
- return getIntForKey(IdropConfigurationService.IRODS_PARALLEL_CONNECTION_TIMEOUT);
- }
-
- /**
- * Maximum number of threads in parallel transfers. This is a trade-off in performance and through-put
- * @return
- */
- public int getIrodsParallelTransferMaxThreads() {
- return getIntForKey(IdropConfigurationService.IRODS_PARALLEL_CONNECTION_MAX_THREADS);
- }
-
- /**
- * Indicates whether a pool is used to maintain parallel transfer threads
- * @return
- */
- public boolean isParallelUsePool() {
+ /**
+ * Time-out (in seconds) for the main iRODS connection. This can be set to 0 or less to inactivate
+ * @return
+ */
+ public int getIrodsConnectionTimeout() {
+ return getIntForKey("idrop.irods.timeout");
+ }
+
+ /**
+ * Time-out (in seconds) for iRODS connections during parallel transfer. This can be set to 0 or less to inactivate
+ * @return
+ */
+ public int getIrodsParallelConnectionTimeout() {
+ return getIntForKey(IdropConfigurationService.IRODS_PARALLEL_CONNECTION_TIMEOUT);
+ }
+
+ /**
+ * Maximum number of threads in parallel transfers. This is a trade-off in performance and through-put
+ * @return
+ */
+ public int getIrodsParallelTransferMaxThreads() {
+ return getIntForKey(IdropConfigurationService.IRODS_PARALLEL_CONNECTION_MAX_THREADS);
+ }
+
+ /**
+ * Indicates whether a pool is used to maintain parallel transfer threads
+ * @return
+ */
+ public boolean isParallelUsePool() {
return getBooleanForKey(IdropConfigurationService.IRODS_PARALLEL_USE_POOL);
}
-
+
/**
* Get the configured synch device name. If not set, this will return a
* <code>null</code>
@@ -308,17 +308,18 @@ public class IdropConfig {
}
return propBoolean;
}
-
- private int getIntForKey(String key) {
+
+ private int getIntForKey(String key) {
int propInt = -1;
String propString = idropProperties.getProperty(key);
- if (propString != null ) {
- propInt = Integer.parseInt(propString);
+ if (propString == null) {
+ return propInt;
}
+
+
+ propInt = Integer.parseInt(propString.trim());
+
return propInt;
}
-
-
-
}
diff --git a/idrop-swing/src/main/resources/idrop.properties b/idrop-swing/src/main/resources/idrop.properties
index 6ae499a..f8dc221 100644
--- a/idrop-swing/src/main/resources/idrop.properties
+++ b/idrop-swing/src/main/resources/idrop.properties
@@ -1,6 +1,6 @@
policy.aware=false
-login.preset=true
-force.mode=true
+login.preset=false
+force.mode=false
force.no.synch=false
advanced.view=true
show.startup=true