[Arakhnę-Dev] [126] Fixing unit test errors. |
[ Thread Index |
Date Index
| More arakhne.org/dev Archives
]
Revision: 126
Author: galland
Date: 2010-02-12 22:32:51 +0100 (Fri, 12 Feb 2010)
Log Message:
-----------
Fixing unit test errors.
Modified Paths:
--------------
trunk/arakhneVmutils/java/src/test/java/org/arakhne/vmutil/FileURLConnectionTest.java
trunk/arakhneVmutils/java/src/test/java/org/arakhne/vmutil/ResourceURLConnectionTest.java
Modified: trunk/arakhneVmutils/java/src/test/java/org/arakhne/vmutil/FileURLConnectionTest.java
===================================================================
--- trunk/arakhneVmutils/java/src/test/java/org/arakhne/vmutil/FileURLConnectionTest.java 2010-02-12 21:26:08 UTC (rev 125)
+++ trunk/arakhneVmutils/java/src/test/java/org/arakhne/vmutil/FileURLConnectionTest.java 2010-02-12 21:32:51 UTC (rev 126)
@@ -45,7 +45,12 @@
private FileURLConnection connection;
static {
- URL.setURLStreamHandlerFactory(new FileURLStreamHandlerFactory());
+ try {
+ URL.setURLStreamHandlerFactory(new FileURLStreamHandlerFactory());
+ }
+ catch(Error _) {
+ // Duplicate registration of the factory.
+ }
}
/**
Modified: trunk/arakhneVmutils/java/src/test/java/org/arakhne/vmutil/ResourceURLConnectionTest.java
===================================================================
--- trunk/arakhneVmutils/java/src/test/java/org/arakhne/vmutil/ResourceURLConnectionTest.java 2010-02-12 21:26:08 UTC (rev 125)
+++ trunk/arakhneVmutils/java/src/test/java/org/arakhne/vmutil/ResourceURLConnectionTest.java 2010-02-12 21:32:51 UTC (rev 126)
@@ -37,7 +37,12 @@
private ResourceURLConnection connection;
static {
- URL.setURLStreamHandlerFactory(new ResourceURLStreamHandlerFactory());
+ try {
+ URL.setURLStreamHandlerFactory(new FileURLStreamHandlerFactory());
+ }
+ catch(Error _) {
+ // Duplicate registration of the factory.
+ }
}
/**