Skip to content

Commit d25a86b

Browse files
committed
minor fix to generated @see jdoc annotation in @find method
Signed-off-by: Gavin King <[email protected]>
1 parent 7bf6004 commit d25a86b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tooling/metamodel-generator/src/jakartaData/java/org/hibernate/processor/test/data/eg/Bookshop.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
import jakarta.transaction.Transactional;
1313
import jakarta.validation.constraints.NotBlank;
1414
import jakarta.validation.constraints.NotNull;
15+
import jakarta.validation.constraints.Size;
1516

1617
import java.util.List;
1718

1819
@Repository
1920
public interface Bookshop extends CrudRepository<Book,String> {
2021
@Find
2122
@Transactional
22-
List<Book> byPublisher(String publisher_name);
23+
List<Book> byPublisher(@Size(min=2,max=100) String publisher_name);
2324

2425
@Find
2526
List<Book> byTitle(@Nonnull String title);

tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AbstractQueryMethod.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ String strip(final String fullType) {
109109
String type = fullType;
110110
// strip off type annotations
111111
while ( type.charAt(0) == '@' ) {
112-
int startIndex = type.indexOf( ' ' );
112+
int startIndex = type.lastIndexOf( ' ' );
113113
if ( startIndex > 0 ) {
114114
type = type.substring(startIndex+1);
115115
}

0 commit comments

Comments
 (0)