Skip to content

Commit 2eb7800

Browse files
committed
HSEARCH-755 whitespace fixes
1 parent 0b2114e commit 2eb7800

File tree

7 files changed

+19
-28
lines changed

7 files changed

+19
-28
lines changed

hibernate-search/src/main/java/org/hibernate/search/hcore/impl/HibernateSearchIntegrator.java

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,16 @@
2323
*/
2424
package org.hibernate.search.hcore.impl;
2525

26-
import org.jboss.logging.Logger;
27-
28-
import org.hibernate.AnnotationException;
26+
import org.hibernate.cfg.Configuration;
2927
import org.hibernate.engine.spi.SessionFactoryImplementor;
28+
import org.hibernate.event.service.spi.DuplicationStrategy;
29+
import org.hibernate.event.service.spi.EventListenerRegistry;
3030
import org.hibernate.event.spi.EventType;
31-
import org.hibernate.event.spi.PostCollectionRemoveEventListener;
32-
import org.hibernate.event.spi.PostCollectionUpdateEventListener;
33-
import org.hibernate.event.spi.PostDeleteEventListener;
34-
import org.hibernate.event.spi.PostInsertEventListener;
35-
import org.hibernate.internal.CoreMessageLogger;
36-
import org.hibernate.cfg.Configuration;
37-
import org.hibernate.event.spi.PostCollectionRecreateEventListener;
38-
import org.hibernate.event.spi.PostUpdateEventListener;
3931
import org.hibernate.integrator.spi.Integrator;
4032
import org.hibernate.internal.util.config.ConfigurationHelper;
4133
import org.hibernate.search.event.impl.FullTextIndexEventListener;
4234
import org.hibernate.search.util.logging.impl.Log;
4335
import org.hibernate.search.util.logging.impl.LoggerFactory;
44-
import org.hibernate.service.classloading.spi.ClassLoaderService;
45-
import org.hibernate.event.service.spi.DuplicationStrategy;
46-
import org.hibernate.event.service.spi.EventListenerRegistry;
4736
import org.hibernate.service.spi.SessionFactoryServiceRegistry;
4837

4938
/**
@@ -54,10 +43,11 @@
5443
* @author Steve Ebersole
5544
*/
5645
public class HibernateSearchIntegrator implements Integrator {
57-
private static final Log log = LoggerFactory.make();
58-
public static final String AUTO_REGISTER = "hibernate.search.autoregister_listeners";
5946

60-
private FullTextIndexEventListener listener;
47+
private static final Log log = LoggerFactory.make();
48+
public static final String AUTO_REGISTER = "hibernate.search.autoregister_listeners";
49+
50+
private FullTextIndexEventListener listener;
6151

6252
@Override
6353
public void integrate(
@@ -70,10 +60,10 @@ public void integrate(
7060
return;
7161
}
7262

73-
listener = new FullTextIndexEventListener(FullTextIndexEventListener.Installation.SINGLE_INSTANCE);
63+
listener = new FullTextIndexEventListener(FullTextIndexEventListener.Installation.SINGLE_INSTANCE);
7464

7565
EventListenerRegistry listenerRegistry = serviceRegistry.getService( EventListenerRegistry.class );
76-
//TODO if the event is duplicated, do not initialize the newly created listener
66+
//TODO if the event is duplicated, do not initialize the newly created listener
7767
listenerRegistry.addDuplicationStrategy( new DuplicationStrategyImpl( FullTextIndexEventListener.class ) );
7868

7969
listenerRegistry.getEventListenerGroup( EventType.POST_INSERT ).appendListener( listener );
@@ -82,9 +72,9 @@ public void integrate(
8272
listenerRegistry.getEventListenerGroup( EventType.POST_COLLECTION_RECREATE ).appendListener( listener );
8373
listenerRegistry.getEventListenerGroup( EventType.POST_COLLECTION_REMOVE ).appendListener( listener );
8474
listenerRegistry.getEventListenerGroup( EventType.POST_COLLECTION_UPDATE ).appendListener( listener );
85-
listenerRegistry.getEventListenerGroup( EventType.FLUSH ).appendListener( listener );
75+
listenerRegistry.getEventListenerGroup( EventType.FLUSH ).appendListener( listener );
8676

87-
listener.initialize(configuration);
77+
listener.initialize(configuration);
8878
}
8979

9080
public static class DuplicationStrategyImpl implements DuplicationStrategy {

hibernate-search/src/main/java/org/hibernate/search/util/configuration/impl/ConfigurationParseHelper.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
*/
4343
public abstract class ConfigurationParseHelper {
4444

45-
/** Try to locate a local URL representing the incoming path. The first attempt
45+
/**
46+
* Try to locate a local URL representing the incoming path. The first attempt
4647
* assumes that the incoming path is an actual URL string (file://, etc). If this
4748
* does not work, then the next attempts try to locate this UURL as a java system
4849
* resource.
@@ -59,7 +60,7 @@ public static URL locateConfig(final String path) {
5960
}
6061
}
6162

62-
/**
63+
/**
6364
* Try to locate a local URL representing the incoming path.
6465
* This method <b>only</b> attempts to locate this URL as a
6566
* java system resource.

hibernate-search/src/main/java/org/hibernate/search/util/impl/JNDIHelper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
public class JNDIHelper {
3838

3939
public static final String HIBERNATE_JNDI_PREFIX = "hibernate.jndi.";
40+
4041
private JNDIHelper() {
4142
}
4243

hibernate-search/src/test/java/org/hibernate/search/test/analyzer/DuplicatedAnalyzerDefinitionTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void testDuplicatedAnalyzerDefinitionThrowsException() throws Exception {
6262
config.buildSessionFactory();
6363
fail( "Session creation should have failed due to duplicate analyzer definition" );
6464
}
65-
catch ( SearchException e ) { // the SearchException will be wrapped in a HibernateException
65+
catch ( SearchException e ) {
6666
assertTrue(
6767
e.getMessage().equals(
6868
"Multiple analyzer definitions with the same name: my-analyzer"
@@ -79,7 +79,7 @@ public void testDuplicatedProgrammaticAnalyzerDefinitionThrowsException() throws
7979
config.buildSessionFactory();
8080
fail( "Session creation should have failed due to duplicate analyzer definition" );
8181
}
82-
catch ( SearchException e ) { // the SearchException will be wrapped in a HibernateException
82+
catch ( SearchException e ) {
8383
assertTrue(
8484
e .getMessage().equals( "Multiple analyzer definitions with the same name: english" )
8585
);

hibernate-search/src/test/java/org/hibernate/search/test/configuration/HibernateSearchIntegratorTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ public ServiceRegistry getParentServiceRegistry() {
247247
@Override
248248
public <R extends Service> R getService(Class<R> serviceRole) {
249249
if ( EventListenerRegistry.class.equals( serviceRole ) ) {
250-
251250
return ( R ) eventListenerRegistry;
252251
}
253252
else {

hibernate-search/src/test/java/org/hibernate/search/test/jgroups/slave/JGroupsSlaveTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public class JGroupsSlaveTest extends SearchTestCase {
5656
/** makes sure that different tests don't join **/
5757
private final String CHANNEL_NAME = UUID.randomUUID().toString();
5858

59-
@FailureExpected( jiraKey = "HSEARCH-803")
59+
@FailureExpected( jiraKey = "HSEARCH-803" )
6060
public void testMessageSend() throws Exception {
6161

6262
JGroupsReceiver.reset();

hibernate-search/src/test/java/org/hibernate/search/test/jmx/IndexControlMBeanTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public void testAttributesAndOperations() throws Exception {
8484
}
8585
}
8686

87-
@FailureExpected( jiraKey = "HSEARCH-802")
87+
@FailureExpected( jiraKey = "HSEARCH-802" )
8888
public void testIndexAndPurge() throws Exception {
8989
FullTextSession s = Search.getFullTextSession( openSession() );
9090
Transaction tx = s.beginTransaction();

0 commit comments

Comments
 (0)