]> git.mxchange.org Git - jcore.git/commitdiff
Fixes for factory class, you need to take DatabaseFrontend.class as parameter type...
authorRoland Haeder <roland@mxchange.org>
Mon, 10 Aug 2015 09:32:19 +0000 (11:32 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 10 Aug 2015 09:32:19 +0000 (11:32 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/jcore/database/backend/base64/Base64CsvDatabaseBackend.java
src/org/mxchange/jcore/exceptions/UnsupportedDatabaseBackendException.java
src/org/mxchange/jcore/factory/database/backend/BackendFactory.java

index 2a3e87bddb25eeab73cb48658f7802c0d9812706..da18a25c00a6bb00e31fd0d8f8f0c48bb5e287f4 100644 (file)
@@ -53,7 +53,7 @@ public class Base64CsvDatabaseBackend extends BaseDatabaseBackend implements Dat
         */
        public Base64CsvDatabaseBackend (final DatabaseFrontend frontend) {
                // Trace message
-               this.getLogger().trace(MessageFormat.format("frontend={1} - CALLED!", frontend)); //NOI18N
+               this.getLogger().trace(MessageFormat.format("frontend={0} - CALLED!", frontend)); //NOI18N
 
                // Get table name
                String tableName = frontend.getTableName();
index 395a5f6480151b2f080609ac630d62e5ddedbe13..023baab5b0845a1b508f82ebf17aeb82a6bf7b1e 100644 (file)
@@ -16,6 +16,8 @@
  */
 package org.mxchange.jcore.exceptions;
 
+import java.text.MessageFormat;
+
 /**
  * An exception thrown when the given backend type is not valid
  * 
@@ -30,7 +32,7 @@ public class UnsupportedDatabaseBackendException extends Exception {
         */
        public UnsupportedDatabaseBackendException (final Throwable cause) {
                // Call super constructor
-               super("Backend is not supported.", cause); //NOI18N
+               super(MessageFormat.format("Backend is not supported: {0}", cause), cause); //NOI18N
        }
        
 }
index 59f949fce3f20f41dc9d076371889469735afef5..d86cfb51f6a6482b480378ab7ed351fcc3a1e650 100644 (file)
@@ -61,7 +61,7 @@ public class BackendFactory extends BaseFrameworkSystem {
                factory.getLogger().debug(MessageFormat.format("reflection={0}", reflection)); //NOI18N
 
                // Get constructor
-               Constructor<?> constructor = reflection.getConstructor(frontend.getClass());
+               Constructor<?> constructor = reflection.getConstructor(DatabaseFrontend.class);
 
                // Debug message
                factory.getLogger().debug(MessageFormat.format("constructor={0}", constructor)); //NOI18N