From 444efc4b066f1c94b4cf0dc7706f0a2e2fd3cd76 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Mon, 10 Aug 2015 11:32:19 +0200 Subject: [PATCH] =?utf8?q?Fixes=20for=20factory=20class,=20you=20need=20to?= =?utf8?q?=20take=20DatabaseFrontend.class=20as=20parameter=20type=20(sure?= =?utf8?q?)=20because=20it=20is=20used=20there=20Signed-off-by:Roland=20H?= =?utf8?q?=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../database/backend/base64/Base64CsvDatabaseBackend.java | 2 +- .../jcore/exceptions/UnsupportedDatabaseBackendException.java | 4 +++- .../jcore/factory/database/backend/BackendFactory.java | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) 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 -- 2.39.5