From fef3988c4667e440f94d1fb1de835cf428dba427 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Sun, 7 Apr 2019 23:12:13 +0000 Subject: [PATCH] =?UTF-8?q?Improved:=20Remove=20=E2=80=98CreateTableCallab?= =?UTF-8?q?le=E2=80=99=20private=20class=20(OFBIZ-10912)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This class was never instantiated locally. Since this was a private class it is better to remove it. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857090 13f79535-47bb-0310-9956-ffa450edef68 --- .../ofbiz/entity/jdbc/DatabaseUtil.java | 46 +------------------ 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java index 1b36f25987..9487e4ef26 100644 --- a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java +++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java @@ -217,7 +217,7 @@ public class DatabaseUtil { Debug.logError(message, module); return; } - List> tableFutures = new LinkedList>(); + for (ModelEntity entity: modelEntityList) { curEnt++; @@ -400,9 +400,6 @@ public class DatabaseUtil { } } } - for (CreateTableCallable tableCallable: ExecutionPool.getAllFutures(tableFutures)) { - tableCallable.updateData(messages, entitiesAdded); - } timer.timerString("After Individual Table/Column Check"); @@ -1482,47 +1479,6 @@ public class DatabaseUtil { return indexInfo; } - private class CreateTableCallable implements Callable { - private final ModelEntity entity; - private final Map modelEntities; - private final String tableName; - private String message; - private boolean success; - - protected CreateTableCallable(ModelEntity entity, Map modelEntities, String tableName) { - this.entity = entity; - this.modelEntities = modelEntities; - this.tableName = tableName; - } - - public CreateTableCallable call() throws Exception { - String errMsg = createTable(entity, modelEntities, false); - if (UtilValidate.isNotEmpty(errMsg)) { - this.success = false; - this.message = "Could not create table [" + tableName + "]: " + errMsg; - Debug.logError(this.message, module); - } else { - this.success = true; - this.message = "Created table [" + tableName + "]"; - Debug.logImportant(this.message, module); - } - return this; - } - - protected void updateData(Collection messages, List entitiesAdded) { - if (this.success) { - entitiesAdded.add(entity); - if (messages != null) { - messages.add(this.message); - } - } else { - if (messages != null) { - messages.add(this.message); - } - } - } - } - private abstract class AbstractCountingCallable implements Callable { protected final ModelEntity entity; protected final Map modelEntities;