Camel Case To Underscores Naming Strategy mapping bug

CamelCaseToUnderscoresNamingStrategy incorrectly maps column with capatalized single trailing character

spring-boot 3.1.0 / Hibernate 6.2.2

#spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
#spring.jpa.hibernate.naming.implicit-strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy

You can toggle the above but the result stays the same. (or leave it out for the default SpringImplicitNamingStrategy)

Entity with attribute: private issueD and DB column: issue_d gets mapped to a query with target r1_0.issued.

resulting in an exception(condensed):

ERROR: column r1_0.issued does not exist Hint: Perhaps you meant to reference the column "r1_0.issue_d".

All other columns work properly.

@Test
    void testCamelConverter(){
        
        String name = "issueD";
        StringBuilder builder = new StringBuilder(name.replace('.', '_'));
    
        for(int i = 1; i < builder.length() - 1; ++i) {
            if (this.isUnderscoreRequired(builder.charAt(i - 1), builder.charAt(i), builder.charAt(i + 1))) {
                builder.insert(i++, '_');
            }
        }
    
        System.out.println("CamelCaseToUnderscoresNamingStrategy: " + builder.toString().toLowerCase());
        System.out.println("Guava: " + CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, name));
    }
    
    private boolean isUnderscoreRequired(final char before, final char current, final char after) {
        return Character.isLowerCase( before ) && Character.isUpperCase( current ) && Character.isLowerCase( after );
    }
CamelCaseToUnderscoresNamingStrategy: issued
Guava: issue_d

This is the intended behavior, the naming strategy only inserts an underscore if the upper case letter is followed by at least one lower case letter.

For example, a property named issueDate would be translated to issue_date on the database side - whereas the property issueDATE would become issuedate.