From 32e2ce7ac21c92ae065a187eb7fb943980be9628 Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Thu, 12 Nov 2015 22:45:12 +0000 Subject: [PATCH] HHH-10279 - Fix checkstyle errors --- .../engine/query/spi/HQLQueryPlan.java | 5 +- .../org/hibernate/engine/spi/ActionQueue.java | 87 +++++++++++++++---- 2 files changed, 71 insertions(+), 21 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/engine/query/spi/HQLQueryPlan.java b/hibernate-core/src/main/java/org/hibernate/engine/query/spi/HQLQueryPlan.java index eb0cf433ab..c84fa8f6e9 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/query/spi/HQLQueryPlan.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/query/spi/HQLQueryPlan.java @@ -215,8 +215,9 @@ public class HQLQueryPlan implements Serializable { final List combinedResults = new ArrayList( guessedResultSize ); final IdentitySet distinction; if ( needsLimit ) { - distinction = new IdentitySet(guessedResultSize); - } else { + distinction = new IdentitySet( guessedResultSize ); + } + else { distinction = null; } int includedCount = -1; diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java index c1bb7ae893..3c4d13da17 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java @@ -95,29 +95,77 @@ public class ActionQueue { static { EXECUTABLE_LISTS = new ListProvider[8]; EXECUTABLE_LISTS[0] = new ListProvider() { - ExecutableList get(ActionQueue instance) { return instance.orphanRemovals; } - ExecutableList init(ActionQueue instance) { return instance.orphanRemovals = new ExecutableList();} }; + ExecutableList get(ActionQueue instance) { + return instance.orphanRemovals; + } + + ExecutableList init(ActionQueue instance) { + return instance.orphanRemovals = new ExecutableList(); + } + }; EXECUTABLE_LISTS[1] = new ListProvider() { - ExecutableList get(ActionQueue instance) { return instance.insertions; } - ExecutableList init(ActionQueue instance) { return instance.insertions = new ExecutableList( new InsertActionSorter() );} }; + ExecutableList get(ActionQueue instance) { + return instance.insertions; + } + + ExecutableList init(ActionQueue instance) { + return instance.insertions = new ExecutableList( new InsertActionSorter() ); + } + }; EXECUTABLE_LISTS[2] = new ListProvider() { - ExecutableList get(ActionQueue instance) { return instance.updates; } - ExecutableList init(ActionQueue instance) { return instance.updates = new ExecutableList();} }; + ExecutableList get(ActionQueue instance) { + return instance.updates; + } + + ExecutableList init(ActionQueue instance) { + return instance.updates = new ExecutableList(); + } + }; EXECUTABLE_LISTS[3] = new ListProvider() { - ExecutableList get(ActionQueue instance) { return instance.collectionQueuedOps; } - ExecutableList init(ActionQueue instance) { return instance.collectionQueuedOps = new ExecutableList();} }; + ExecutableList get(ActionQueue instance) { + return instance.collectionQueuedOps; + } + + ExecutableList init(ActionQueue instance) { + return instance.collectionQueuedOps = new ExecutableList(); + } + }; EXECUTABLE_LISTS[4] = new ListProvider() { - ExecutableList get(ActionQueue instance) { return instance.collectionRemovals; } - ExecutableList init(ActionQueue instance) { return instance.collectionRemovals = new ExecutableList();} }; + ExecutableList get(ActionQueue instance) { + return instance.collectionRemovals; + } + + ExecutableList init(ActionQueue instance) { + return instance.collectionRemovals = new ExecutableList(); + } + }; EXECUTABLE_LISTS[5] = new ListProvider() { - ExecutableList get(ActionQueue instance) { return instance.collectionUpdates; } - ExecutableList init(ActionQueue instance) { return instance.collectionUpdates = new ExecutableList();} }; + ExecutableList get(ActionQueue instance) { + return instance.collectionUpdates; + } + + ExecutableList init(ActionQueue instance) { + return instance.collectionUpdates = new ExecutableList(); + } + }; EXECUTABLE_LISTS[6] = new ListProvider() { - ExecutableList get(ActionQueue instance) { return instance.collectionCreations; } - ExecutableList init(ActionQueue instance) { return instance.collectionCreations = new ExecutableList();} }; + ExecutableList get(ActionQueue instance) { + return instance.collectionCreations; + } + + ExecutableList init(ActionQueue instance) { + return instance.collectionCreations = new ExecutableList(); + } + }; EXECUTABLE_LISTS[7] = new ListProvider() { - ExecutableList get(ActionQueue instance) { return instance.deletions; } - ExecutableList init(ActionQueue instance) { return instance.deletions = new ExecutableList();} }; + ExecutableList get(ActionQueue instance) { + return instance.deletions; + } + + ExecutableList init(ActionQueue instance) { + return instance.deletions = new ExecutableList(); + } + }; } /** @@ -769,9 +817,10 @@ public class ActionQueue { ExecutableList l = p.get(this); if( l == null ) { oos.writeBoolean(false); - } else { - oos.writeBoolean(true); - l.writeExternal(oos); + } + else { + oos.writeBoolean( true ); + l.writeExternal( oos ); } } }