summaryrefslogtreecommitdiff
path: root/bkucommon/src/main/java/at/gv/egiz/bku/conf
diff options
context:
space:
mode:
authormcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-12-04 10:00:31 +0000
committermcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-12-04 10:00:31 +0000
commit3aadcf8f877a560bed75af7e0db918aa26ef2a03 (patch)
tree66e382b6f87b0034046e4fb906497ed6aed74198 /bkucommon/src/main/java/at/gv/egiz/bku/conf
parent99134c1be5db0fedadc051922e70c9bf563ce16d (diff)
downloadmocca-3aadcf8f877a560bed75af7e0db918aa26ef2a03.tar.gz
mocca-3aadcf8f877a560bed75af7e0db918aa26ef2a03.tar.bz2
mocca-3aadcf8f877a560bed75af7e0db918aa26ef2a03.zip
Refactoring of infobox implementation.
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@232 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'bkucommon/src/main/java/at/gv/egiz/bku/conf')
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/conf/Configurator.java41
1 files changed, 21 insertions, 20 deletions
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/conf/Configurator.java b/bkucommon/src/main/java/at/gv/egiz/bku/conf/Configurator.java
index 9ed99190..6078de36 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/conf/Configurator.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/conf/Configurator.java
@@ -187,28 +187,29 @@ public abstract class Configurator {
}
public void configureVersion() {
- Properties p = new Properties();
- try {
- InputStream is = getManifest();
- if (is != null) {
- p.load(getManifest());
- String version = p.getProperty("Implementation-Build");
- properties.setProperty(DataUrlConnection.USER_AGENT_PROPERTY_KEY,
- "citizen-card-environment/1.2 MOCCA " + version);
- DataUrl.setConfiguration(properties);
- log
- .debug("Setting user agent to: "
- + properties
- .getProperty(DataUrlConnection.USER_AGENT_PROPERTY_KEY));
- } else {
- log.warn("Cannot read manifest");
- properties.setProperty(DataUrlConnection.USER_AGENT_PROPERTY_KEY,
- "citizen-card-environment/1.2 MOCCA UNKNOWN");
- DataUrl.setConfiguration(properties);
+ if (properties.getProperty(DataUrlConnection.USER_AGENT_PROPERTY_KEY) == null) {
+ Properties p = new Properties();
+ try {
+ InputStream is = getManifest();
+ if (is != null) {
+ p.load(getManifest());
+ String version = p.getProperty("Implementation-Build");
+ properties.setProperty(DataUrlConnection.USER_AGENT_PROPERTY_KEY,
+ "citizen-card-environment/1.2 MOCCA " + version);
+ log
+ .debug("Setting user agent to: "
+ + properties
+ .getProperty(DataUrlConnection.USER_AGENT_PROPERTY_KEY));
+ } else {
+ log.warn("Cannot read manifest");
+ properties.setProperty(DataUrlConnection.USER_AGENT_PROPERTY_KEY,
+ "citizen-card-environment/1.2 MOCCA UNKNOWN");
+ }
+ } catch (IOException e) {
+ log.error(e);
}
- } catch (IOException e) {
- log.error(e);
}
+ DataUrl.setConfiguration(properties);
}
public void configure() {