Skip to content

Commit 2baaf04

Browse files
committed
HSEARCH-5256 Apply autoformatting to a few more files
1 parent f655ea4 commit 2baaf04

File tree

9 files changed

+33
-14
lines changed

9 files changed

+33
-14
lines changed

build/config/src/main/java/org/hibernate/checkstyle/filters/ExcludeTestPackages.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@
2222
*/
2323
public class ExcludeTestPackages implements Filter {
2424

25-
private static final String UNIT_TESTS_SUB_PATH = File.separator + "src" + File.separator + "test" + File.separator + "java";
26-
private static final String COPIED_SOURCES_TESTS_SUB_PATH = File.separator + "copied-sources" + File.separator + "test" + File.separator + "java";
25+
private static final String UNIT_TESTS_SUB_PATH =
26+
File.separator + "src" + File.separator + "test" + File.separator + "java";
27+
private static final String COPIED_SOURCES_TESTS_SUB_PATH =
28+
File.separator + "copied-sources" + File.separator + "test" + File.separator + "java";
2729
private static final String INTEGRATION_TESTS_SUB_PATH = File.separator + "integrationtest" + File.separator;
28-
private static final String TEST_UTIL_SUB_PATH = File.separator + "util" + File.separator + "impl" + File.separator + "test" + File.separator;
30+
private static final String TEST_UTIL_SUB_PATH =
31+
File.separator + "util" + File.separator + "impl" + File.separator + "test" + File.separator;
2932
private static final String MESSAGE_DISABLE_KEYWORD = "[not required for tests]";
3033

3134
@Override

build/enforcer/src/main/java/org/hibernate/search/build/enforcer/MavenProjectUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ private MavenProjectUtils() {
1919
public static boolean isAnyParentPublicParent(MavenProject project) {
2020
return project.hasParent()
2121
&& ( HIBERNATE_SEARCH_PARENT_PUBLIC.equals( project.getParent().getArtifactId() )
22-
|| isAnyParentPublicParent( project.getParent() ) );
22+
|| isAnyParentPublicParent( project.getParent() ) );
2323
}
2424

2525
public static boolean isAnyParentRelocationParent(MavenProject project) {
2626
return project.hasParent()
2727
&& ( HIBERNATE_SEARCH_PARENT_RELOCATION.equals( project.getParent().getArtifactId() )
28-
|| isAnyParentRelocationParent( project.getParent() ) );
28+
|| isAnyParentRelocationParent( project.getParent() ) );
2929
}
3030

3131
public static boolean isAnyParentIntegrationTestParent(MavenProject project) {
3232
return project.hasParent()
3333
&& ( HIBERNATE_SEARCH_PARENT_INTEGRATION_TEST.equals( project.getParent().getArtifactId() )
34-
|| isAnyParentIntegrationTestParent( project.getParent() ) );
34+
|| isAnyParentIntegrationTestParent( project.getParent() ) );
3535
}
3636

3737
public static boolean isProjectDeploySkipped(MavenProject project) {

integrationtest/java/modules/orm-elasticsearch/src/main/java/module-info.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module org.hibernate.search.integrationtest.java.module.orm.elasticsearch {
22
exports org.hibernate.search.integrationtest.java.modules.orm.elasticsearch.service;
3+
34
opens org.hibernate.search.integrationtest.java.modules.orm.elasticsearch.entity to
45
org.hibernate.orm.core,
56
/*

integrationtest/java/modules/orm-lucene/src/main/java/module-info.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module org.hibernate.search.integrationtest.java.module.orm.lucene {
22
exports org.hibernate.search.integrationtest.java.modules.orm.lucene.service;
3+
34
opens org.hibernate.search.integrationtest.java.modules.orm.lucene.entity to
45
org.hibernate.orm.core,
56
/*

integrationtest/java/modules/orm-outbox-polling-elasticsearch/src/main/java/module-info.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module org.hibernate.search.integrationtest.java.module.orm.elasticsearch.outboxpolling {
22
exports org.hibernate.search.integrationtest.java.modules.orm.elasticsearch.outboxpolling.service;
3+
34
opens org.hibernate.search.integrationtest.java.modules.orm.elasticsearch.outboxpolling.entity to
45
org.hibernate.orm.core,
56
/*

integrationtest/java/modules/pojo-standalone-elasticsearch/src/main/java/module-info.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module org.hibernate.search.integrationtest.java.modules.pojo.standalone.elasticsearch {
22
exports org.hibernate.search.integrationtest.java.modules.pojo.standalone.elasticsearch.service;
3+
34
opens org.hibernate.search.integrationtest.java.modules.pojo.standalone.elasticsearch.entity to
45
org.hibernate.search.mapper.pojo.standalone;
56
opens org.hibernate.search.integrationtest.java.modules.pojo.standalone.elasticsearch.config to

integrationtest/java/modules/pojo-standalone-lucene/src/main/java/module-info.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module org.hibernate.search.integrationtest.java.modules.pojo.standalone.lucene {
22
exports org.hibernate.search.integrationtest.java.modules.pojo.standalone.lucene.service;
3+
34
opens org.hibernate.search.integrationtest.java.modules.pojo.standalone.lucene.entity to
45
org.hibernate.search.mapper.pojo.standalone;
56
opens org.hibernate.search.integrationtest.java.modules.pojo.standalone.lucene.config to

integrationtest/mapper/pojo-base/src/test/java-noparameters/org/hibernate/search/integrationtest/mapper/pojo/mapping/definition/noparameters/ProjectionConstructorClassNoParametersCompilerFlagIT.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
class ProjectionConstructorClassNoParametersCompilerFlagIT extends AbstractProjectionConstructorIT {
3636

3737
@RegisterExtension
38-
public StandalonePojoMappingSetupHelper setupHelper = StandalonePojoMappingSetupHelper.withBackendMock( MethodHandles.lookup(), backendMock );
38+
public StandalonePojoMappingSetupHelper setupHelper =
39+
StandalonePojoMappingSetupHelper.withBackendMock( MethodHandles.lookup(), backendMock );
3940

4041
@BeforeEach
4142
void sourcesCompiledWithoutParametersFlag() {
@@ -52,15 +53,18 @@ class MyProjection {
5253
private final String someText;
5354
private final Integer someInteger;
5455
private final InnerProjection someContained;
56+
5557
MyProjection(String someText, Integer someInteger, InnerProjection someContained) {
5658
this.someText = someText;
5759
this.someInteger = someInteger;
5860
this.someContained = someContained;
5961
}
62+
6063
@ProjectionConstructor
6164
static class InnerProjection {
6265
private final String someText2;
6366
private final Integer someInteger2;
67+
6468
InnerProjection(String someText2, Integer someInteger2) {
6569
this.someText2 = someText2;
6670
this.someInteger2 = someInteger2;
@@ -73,7 +77,8 @@ static class InnerProjection {
7377
.isInstanceOf( SearchException.class )
7478
.satisfies( FailureReportUtils.hasFailureReport()
7579
.typeContext( MyProjection.class.getName() )
76-
.constructorContext( ProjectionConstructorClassNoParametersCompilerFlagIT.class, String.class, Integer.class,
80+
.constructorContext( ProjectionConstructorClassNoParametersCompilerFlagIT.class, String.class,
81+
Integer.class,
7782
MyProjection.InnerProjection.class )
7883
.methodParameterContext( 1 )
7984
.failure( "Missing parameter names in Java metadata for projection constructor",
@@ -102,17 +107,20 @@ class MyProjection {
102107
private final String someText;
103108
private final Integer someInteger;
104109
private final InnerProjection someContained;
110+
105111
MyProjection(@FieldProjection String someText,
106112
@FieldProjection Integer someInteger,
107113
@ObjectProjection InnerProjection someContained) {
108114
this.someText = someText;
109115
this.someInteger = someInteger;
110116
this.someContained = someContained;
111117
}
118+
112119
@ProjectionConstructor
113120
static class InnerProjection {
114121
private final String someText2;
115122
private final Integer someInteger2;
123+
116124
InnerProjection(@FieldProjection String someText2,
117125
@FieldProjection Integer someInteger2) {
118126
this.someText2 = someText2;
@@ -126,7 +134,8 @@ static class InnerProjection {
126134
.isInstanceOf( SearchException.class )
127135
.satisfies( FailureReportUtils.hasFailureReport()
128136
.typeContext( MyProjection.class.getName() )
129-
.constructorContext( ProjectionConstructorClassNoParametersCompilerFlagIT.class, String.class, Integer.class,
137+
.constructorContext( ProjectionConstructorClassNoParametersCompilerFlagIT.class, String.class,
138+
Integer.class,
130139
MyProjection.InnerProjection.class )
131140
.methodParameterContext( 1 )
132141
.failure( "Missing parameter names in Java metadata for projection constructor",
@@ -155,17 +164,20 @@ class MyProjection {
155164
private final String someText;
156165
private final Integer someInteger;
157166
private final InnerProjection someContained;
167+
158168
MyProjection(@FieldProjection(path = "text") String someText,
159169
@FieldProjection(path = "integer") Integer someInteger,
160170
@ObjectProjection(path = "contained") InnerProjection someContained) {
161171
this.someText = someText;
162172
this.someInteger = someInteger;
163173
this.someContained = someContained;
164174
}
175+
165176
@ProjectionConstructor
166177
static class InnerProjection {
167178
private final String someText2;
168179
private final Integer someInteger2;
180+
169181
InnerProjection(@FieldProjection(path = "text2") String someText2,
170182
@FieldProjection(path = "integer2") Integer someInteger2) {
171183
this.someText2 = someText2;

integrationtest/mapper/pojo-base/src/test/java-noparameters/org/hibernate/search/integrationtest/mapper/pojo/mapping/definition/noparameters/ProjectionConstructorRecordNoParametersCompilerFlagIT.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed;
1818
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.ProjectionConstructor;
1919
import org.hibernate.search.mapper.pojo.standalone.mapping.SearchMapping;
20-
import org.hibernate.search.mapper.pojo.standalone.session.SearchSession;
21-
import org.hibernate.search.util.impl.integrationtest.common.extension.BackendMock;
22-
import org.hibernate.search.util.impl.integrationtest.common.extension.StubSearchWorkBehavior;
2320
import org.hibernate.search.util.impl.integrationtest.mapper.pojo.standalone.StandalonePojoMappingSetupHelper;
2421

2522
import org.junit.jupiter.api.BeforeEach;
@@ -29,7 +26,8 @@
2926
class ProjectionConstructorRecordNoParametersCompilerFlagIT extends AbstractProjectionConstructorIT {
3027

3128
@RegisterExtension
32-
public StandalonePojoMappingSetupHelper setupHelper = StandalonePojoMappingSetupHelper.withBackendMock( MethodHandles.lookup(), backendMock );
29+
public StandalonePojoMappingSetupHelper setupHelper =
30+
StandalonePojoMappingSetupHelper.withBackendMock( MethodHandles.lookup(), backendMock );
3331

3432
@BeforeEach
3533
void sourcesCompiledWithoutParametersFlag() {
@@ -51,7 +49,8 @@ class IndexedEntity {
5149
public Integer integer;
5250
}
5351
@ProjectionConstructor
54-
record MyProjection(String text, Integer integer) { }
52+
record MyProjection(String text, Integer integer) {
53+
}
5554

5655
backendMock.expectAnySchema( INDEX_NAME );
5756
SearchMapping mapping = setupHelper.start()

0 commit comments

Comments
 (0)