Skip to content

Commit 19257e7

Browse files
committedDec 28, 2023
Add custom ANTLR template to avoid Maven Replacer plugin.
Closes #3285
1 parent 027c48a commit 19257e7

File tree

3 files changed

+1041
-23
lines changed

3 files changed

+1041
-23
lines changed
 

‎org/antlr/v4/tool/templates/codegen/Java/Java.stg

+1,006
Large diffs are not rendered by default.

‎spring-data-jpa/pom.xml

-23
Original file line numberDiff line numberDiff line change
@@ -336,29 +336,6 @@
336336
</executions>
337337
</plugin>
338338

339-
<plugin>
340-
<groupId>com.google.code.maven-replacer-plugin</groupId>
341-
<artifactId>maven-replacer-plugin</artifactId>
342-
<version>1.4.1</version>
343-
<executions>
344-
<execution>
345-
<phase>process-sources</phase>
346-
<goals>
347-
<goal>replace</goal>
348-
</goals>
349-
<configuration>
350-
<basedir>${project.build.directory}/generated-sources</basedir>
351-
<includes>
352-
<include>antlr4/**/*.java</include>
353-
</includes>
354-
<variableTokenValueMap>
355-
public class=class,public interface=interface
356-
</variableTokenValueMap>
357-
</configuration>
358-
</execution>
359-
</executions>
360-
</plugin>
361-
362339
<plugin>
363340
<groupId>org.apache.maven.plugins</groupId>
364341
<artifactId>maven-compiler-plugin</artifactId>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Copyright 2023 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package org.springframework.data.jpa.repository.query;
17+
18+
import static org.assertj.core.api.Assertions.*;
19+
20+
import org.junit.jupiter.api.Test;
21+
22+
/**
23+
* Unit tests to verify that our ANTLR customizations are in place.
24+
*
25+
* @author Mark Paluch
26+
*/
27+
class HqlParserUnitTests {
28+
29+
@Test // GH-3282
30+
void shouldConsiderVisibility() {
31+
32+
assertThat(HqlParser.class).isPackagePrivate();
33+
assertThat(HqlListener.class).isPackagePrivate();
34+
}
35+
}

0 commit comments

Comments
 (0)
Please sign in to comment.