Skip to content

Commit

Permalink
Checkstyle fixups.
Browse files Browse the repository at this point in the history
  • Loading branch information
Naros committed Jun 12, 2017
1 parent 699b507 commit 0305350
Showing 1 changed file with 28 additions and 28 deletions.
Expand Up @@ -285,8 +285,8 @@ private void addResolvedEntityInsertAction(AbstractEntityInsertAction insert) {
}
insert.makeEntityManaged();
if( unresolvedInsertions != null ) {
for (AbstractEntityInsertAction resolvedAction : unresolvedInsertions.resolveDependentActions(insert.getInstance(), session)) {
addResolvedEntityInsertAction(resolvedAction);
for ( AbstractEntityInsertAction resolvedAction : unresolvedInsertions.resolveDependentActions( insert.getInstance(), session ) ) {
addResolvedEntityInsertAction( resolvedAction );
}
}
}
Expand Down Expand Up @@ -383,7 +383,7 @@ private void registerCleanupActions(Executable executable) {
if( beforeTransactionProcesses == null ) {
beforeTransactionProcesses = new BeforeTransactionCompletionProcessQueue( session );
}
beforeTransactionProcesses.register(executable.getBeforeTransactionCompletionProcess());
beforeTransactionProcesses.register( executable.getBeforeTransactionCompletionProcess() );
}
if ( session.getFactory().getSessionFactoryOptions().isQueryCacheEnabled() ) {
invalidateSpaces( executable.getPropertySpaces() );
Expand All @@ -392,7 +392,7 @@ private void registerCleanupActions(Executable executable) {
if( afterTransactionProcesses == null ) {
afterTransactionProcesses = new AfterTransactionCompletionProcessQueue( session );
}
afterTransactionProcesses.register(executable.getAfterTransactionCompletionProcess());
afterTransactionProcesses.register( executable.getAfterTransactionCompletionProcess() );
}
}

Expand Down Expand Up @@ -495,7 +495,7 @@ public void afterTransactionCompletion(boolean success) {
if ( !isTransactionCoordinatorShared ) {
// Execute completion actions only in transaction owner (aka parent session).
if( afterTransactionProcesses != null ) {
afterTransactionProcesses.afterTransactionCompletion(success);
afterTransactionProcesses.afterTransactionCompletion( success );
}
}
}
Expand Down Expand Up @@ -593,13 +593,13 @@ private <E extends Executable & Comparable<?> & Serializable> void executeAction
if( beforeTransactionProcesses == null ) {
beforeTransactionProcesses = new BeforeTransactionCompletionProcessQueue( session );
}
beforeTransactionProcesses.register(e.getBeforeTransactionCompletionProcess());
beforeTransactionProcesses.register( e.getBeforeTransactionCompletionProcess() );
}
if( e.getAfterTransactionCompletionProcess() != null ) {
if( afterTransactionProcesses == null ) {
afterTransactionProcesses = new AfterTransactionCompletionProcessQueue( session );
}
afterTransactionProcesses.register(e.getAfterTransactionCompletionProcess());
afterTransactionProcesses.register( e.getAfterTransactionCompletionProcess() );
}
}
}
Expand Down Expand Up @@ -655,14 +655,14 @@ private void invalidateSpaces(Serializable... spaces) {
*/
@Override
public String toString() {
return "ActionQueue[insertions=" + toString(insertions)
+ " updates=" + toString(updates)
+ " deletions=" + toString(deletions)
+ " orphanRemovals=" + toString(orphanRemovals)
+ " collectionCreations=" + toString(collectionCreations)
+ " collectionRemovals=" + toString(collectionRemovals)
+ " collectionUpdates=" + toString(collectionUpdates)
+ " collectionQueuedOps=" + toString(collectionQueuedOps)
return "ActionQueue[insertions=" + toString( insertions )
+ " updates=" + toString( updates )
+ " deletions=" + toString( deletions )
+ " orphanRemovals=" + toString( orphanRemovals )
+ " collectionCreations=" + toString( collectionCreations )
+ " collectionRemovals=" + toString( collectionRemovals )
+ " collectionUpdates=" + toString( collectionUpdates )
+ " collectionQueuedOps=" + toString( collectionQueuedOps )
+ " unresolvedInsertDependencies=" + unresolvedInsertions
+ "]";
}
Expand Down Expand Up @@ -811,25 +811,25 @@ public boolean hasAnyQueuedActions() {

public void unScheduleDeletion(EntityEntry entry, Object rescuedEntity) {
if ( rescuedEntity instanceof HibernateProxy ) {
LazyInitializer initializer = ( ( HibernateProxy ) rescuedEntity ).getHibernateLazyInitializer();
LazyInitializer initializer = ( (HibernateProxy) rescuedEntity ).getHibernateLazyInitializer();
if ( !initializer.isUninitialized() ) {
rescuedEntity = initializer.getImplementation( session );
}
}
if( deletions != null ) {
for ( int i = 0; i < deletions.size(); i++ ) {
EntityDeleteAction action = deletions.get(i);
EntityDeleteAction action = deletions.get( i );
if (action.getInstance() == rescuedEntity) {
deletions.remove(i);
deletions.remove( i );
return;
}
}
}
if( orphanRemovals != null ) {
for ( int i = 0; i < orphanRemovals.size(); i++ ) {
EntityDeleteAction action = orphanRemovals.get(i);
EntityDeleteAction action = orphanRemovals.get( i );
if (action.getInstance() == rescuedEntity) {
orphanRemovals.remove(i);
orphanRemovals.remove( i );
return;
}
}
Expand All @@ -851,9 +851,9 @@ public void serialize(ObjectOutputStream oos) throws IOException {
unresolvedInsertions.serialize( oos );

for ( ListProvider p : EXECUTABLE_LISTS_MAP.values() ) {
ExecutableList<?> l = p.get(this);
ExecutableList<?> l = p.get( this );
if( l == null ) {
oos.writeBoolean(false);
oos.writeBoolean( false );
}
else {
oos.writeBoolean( true );
Expand All @@ -874,18 +874,18 @@ public void serialize(ObjectOutputStream oos) throws IOException {
public static ActionQueue deserialize(ObjectInputStream ois, SessionImplementor session) throws IOException, ClassNotFoundException {
final boolean traceEnabled = LOG.isTraceEnabled();
if ( traceEnabled ) {
LOG.trace("Deserializing action-queue");
LOG.trace( "Deserializing action-queue" );
}
ActionQueue rtn = new ActionQueue( session );

rtn.unresolvedInsertions = UnresolvedEntityInsertActions.deserialize( ois, session );

for ( ListProvider provider : EXECUTABLE_LISTS_MAP.values() ) {
ExecutableList<?> l = provider.get(rtn);
ExecutableList<?> l = provider.get( rtn );
boolean notNull = ois.readBoolean();
if( notNull ) {
if(l == null) {
l = provider.init(rtn);
l = provider.init( rtn );
}
l.readExternal( ois );

Expand All @@ -899,7 +899,7 @@ public static ActionQueue deserialize(ObjectInputStream ois, SessionImplementor
return rtn;
}

private static abstract class AbstractTransactionCompletionProcessQueue<T> {
private abstract static class AbstractTransactionCompletionProcessQueue<T> {
protected SessionImplementor session;
// Concurrency handling required when transaction completion process is dynamically registered
// inside event listener (HHH-7478).
Expand Down Expand Up @@ -1111,7 +1111,7 @@ public void sort(List<AbstractEntityInsertAction> insertions) {
}
addParentChildEntityNames( action, batchIdentifier );
entityBatchIdentifier.put( currentEntity, batchIdentifier );
addToBatch(batchIdentifier, action);
addToBatch( batchIdentifier, action );
}
insertions.clear();

Expand Down Expand Up @@ -1220,7 +1220,7 @@ private void addToBatch(BatchIdentifier batchIdentifier, AbstractEntityInsertAct

}

private static abstract class ListProvider<T extends Executable & Comparable & Serializable> {
private abstract static class ListProvider<T extends Executable & Comparable & Serializable> {
abstract ExecutableList<T> get(ActionQueue instance);
abstract ExecutableList<T> init(ActionQueue instance);
ExecutableList<T> getOrInit( ActionQueue instance ) {
Expand Down

0 comments on commit 0305350

Please sign in to comment.