From: Roland Haeder Date: Mon, 10 Aug 2015 09:32:19 +0000 (+0200) Subject: Fixes for factory class, you need to take DatabaseFrontend.class as parameter type... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=444efc4b066f1c94b4cf0dc7706f0a2e2fd3cd76;p=jcore.git Fixes for factory class, you need to take DatabaseFrontend.class as parameter type (sure) because it is used there Signed-off-by:Roland Häder --- diff --git a/src/org/mxchange/jcore/database/backend/base64/Base64CsvDatabaseBackend.java b/src/org/mxchange/jcore/database/backend/base64/Base64CsvDatabaseBackend.java index 2a3e87b..da18a25 100644 --- a/src/org/mxchange/jcore/database/backend/base64/Base64CsvDatabaseBackend.java +++ b/src/org/mxchange/jcore/database/backend/base64/Base64CsvDatabaseBackend.java @@ -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(); diff --git a/src/org/mxchange/jcore/exceptions/UnsupportedDatabaseBackendException.java b/src/org/mxchange/jcore/exceptions/UnsupportedDatabaseBackendException.java index 395a5f6..023baab 100644 --- a/src/org/mxchange/jcore/exceptions/UnsupportedDatabaseBackendException.java +++ b/src/org/mxchange/jcore/exceptions/UnsupportedDatabaseBackendException.java @@ -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 } } diff --git a/src/org/mxchange/jcore/factory/database/backend/BackendFactory.java b/src/org/mxchange/jcore/factory/database/backend/BackendFactory.java index 59f949f..d86cfb5 100644 --- a/src/org/mxchange/jcore/factory/database/backend/BackendFactory.java +++ b/src/org/mxchange/jcore/factory/database/backend/BackendFactory.java @@ -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