summaryrefslogtreecommitdiff
path: root/BKUViewer
diff options
context:
space:
mode:
authormcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-05-05 15:29:01 +0000
committermcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-05-05 15:29:01 +0000
commitb1c8641a63a67e3c64d948f9e8dce5c01e11e2dd (patch)
tree0883f08a408f89f758e9a1be629232e3dd055c3a /BKUViewer
parent83a9b613836910f7edc370c2fe60fa2268dc4461 (diff)
downloadmocca-b1c8641a63a67e3c64d948f9e8dce5c01e11e2dd.tar.gz
mocca-b1c8641a63a67e3c64d948f9e8dce5c01e11e2dd.tar.bz2
mocca-b1c8641a63a67e3c64d948f9e8dce5c01e11e2dd.zip
Merged feature branch mocca-1.2.13-id@r724 back to trunk.
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@725 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUViewer')
-rw-r--r--BKUViewer/pom.xml17
-rw-r--r--BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/SLXHTMLValidator.java10
-rw-r--r--BKUViewer/src/main/java/at/gv/egiz/bku/text/TextValidator.java10
-rw-r--r--BKUViewer/src/test/java/at/gv/egiz/bku/slxhtml/ValidatorTest.java9
-rw-r--r--BKUViewer/src/test/resources/commons-logging.properties1
5 files changed, 20 insertions, 27 deletions
diff --git a/BKUViewer/pom.xml b/BKUViewer/pom.xml
index ce39dc94..69367c54 100644
--- a/BKUViewer/pom.xml
+++ b/BKUViewer/pom.xml
@@ -1,24 +1,20 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>bku</artifactId>
+ <artifactId>mocca</artifactId>
<groupId>at.gv.egiz</groupId>
- <version>1.2.14-SNAPSHOT</version>
+ <version>1.3.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>at.gv.egiz</groupId>
<artifactId>BKUViewer</artifactId>
<name>BKU Viewer</name>
- <version>1.2.14-SNAPSHOT</version>
+ <version>${project.parent.version}</version>
<description />
<dependencies>
<dependency>
<groupId>at.gv.egiz</groupId>
<artifactId>bkucommon</artifactId>
- <version>1.2.14-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
+ <version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
@@ -40,9 +36,8 @@
</exclusions>
</dependency>
<dependency>
- <groupId>at.gv.egiz</groupId>
- <artifactId>BKUFonts</artifactId>
- <version>1.2</version>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>
</project>
diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/SLXHTMLValidator.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/SLXHTMLValidator.java
index a230afa6..0ed34d07 100644
--- a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/SLXHTMLValidator.java
+++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/SLXHTMLValidator.java
@@ -34,8 +34,8 @@ import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
import javax.xml.validation.ValidatorHandler;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.InputSource;
@@ -78,7 +78,7 @@ public class SLXHTMLValidator implements at.gv.egiz.bku.viewer.Validator {
/**
* Logging facility.
*/
- private static Log log = LogFactory.getLog(SLXHTMLValidator.class);
+ private static Logger log = LoggerFactory.getLogger(SLXHTMLValidator.class);
private static Schema slSchema;
@@ -91,11 +91,11 @@ public class SLXHTMLValidator implements at.gv.egiz.bku.viewer.Validator {
SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
ClassLoader cl = SLXHTMLValidator.class.getClassLoader();
URL schemaURL = cl.getResource(SLXHTML_SCHEMA_FILE);
- log.debug("Trying to create SLXHTML schema from URL '" + schemaURL + "'.");
+ log.debug("Trying to create SLXHTML schema from URL '{}'.", schemaURL);
long t0 = System.currentTimeMillis();
slSchema = schemaFactory.newSchema(schemaURL);
long t1 = System.currentTimeMillis();
- log.debug("SLXHTML schema successfully created in " + (t1 - t0) + "ms.");
+ log.debug("SLXHTML schema successfully created in {}ms.", (t1 - t0));
} catch (SAXException e) {
log.error("Failed to load security layer XHTML schema.", e);
throw new RuntimeException("Failed to load security layer XHTML schema.", e);
diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/text/TextValidator.java b/BKUViewer/src/main/java/at/gv/egiz/bku/text/TextValidator.java
index dee8ff2e..5abaed11 100644
--- a/BKUViewer/src/main/java/at/gv/egiz/bku/text/TextValidator.java
+++ b/BKUViewer/src/main/java/at/gv/egiz/bku/text/TextValidator.java
@@ -25,8 +25,8 @@ import java.io.UnsupportedEncodingException;
import java.nio.CharBuffer;
import java.nio.charset.Charset;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import at.gv.egiz.bku.viewer.ValidationException;
import at.gv.egiz.bku.viewer.Validator;
@@ -37,7 +37,7 @@ public class TextValidator implements Validator {
/**
* Logging facility.
*/
- protected static Log log = LogFactory.getLog(TextValidator.class);
+ protected static Logger log = LoggerFactory.getLogger(TextValidator.class);
protected Font viewerFont;
@@ -46,7 +46,7 @@ public class TextValidator implements Validator {
}
private void invalid(char c) throws ValidationException {
- log.info("Invalid character (0x" + Integer.toHexString(c) + ") found.");
+ log.info("Invalid character (0x{}) found.", Integer.toHexString(c));
// TODO: localize
throw new ValidationException();
}
@@ -60,7 +60,7 @@ public class TextValidator implements Validator {
try {
reader = new InputStreamReader(is, charset);
} catch (UnsupportedEncodingException e) {
- log.info("Charset '" + charset + "' not supported.", e);
+ log.info("Charset '{}' not supported.", charset, e);
// TODO: localize
throw new ValidationException(e);
}
diff --git a/BKUViewer/src/test/java/at/gv/egiz/bku/slxhtml/ValidatorTest.java b/BKUViewer/src/test/java/at/gv/egiz/bku/slxhtml/ValidatorTest.java
index c5b54a56..daf662dc 100644
--- a/BKUViewer/src/test/java/at/gv/egiz/bku/slxhtml/ValidatorTest.java
+++ b/BKUViewer/src/test/java/at/gv/egiz/bku/slxhtml/ValidatorTest.java
@@ -20,9 +20,8 @@ import static org.junit.Assert.assertNotNull;
import java.io.InputStream;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.junit.Ignore;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.junit.Test;
import at.gv.egiz.bku.viewer.ValidationException;
@@ -32,7 +31,7 @@ import at.gv.egiz.bku.viewer.ValidatorFactory;
//@Ignore
public class ValidatorTest {
- private static Log log = LogFactory.getLog(ValidatorTest.class);
+ private static Logger log = LoggerFactory.getLogger(ValidatorTest.class);
@Test
public void testGetInstance() {
@@ -60,7 +59,7 @@ public class ValidatorTest {
throw e;
}
long t1 = System.currentTimeMillis();
- log.info("Validated SLXHTML file '" + slxhtmlFile + "' in " + (t1 - t0) + "ms.");
+ log.info("Validated SLXHTML file '{}' in {}ms.", slxhtmlFile, t1 - t0);
}
diff --git a/BKUViewer/src/test/resources/commons-logging.properties b/BKUViewer/src/test/resources/commons-logging.properties
deleted file mode 100644
index 29292562..00000000
--- a/BKUViewer/src/test/resources/commons-logging.properties
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger