Hbm2java fails with nullpointer if an index does not have a columnName

Description

I'm sure it's a rare case and I'm not exactly certain how the index ended up with no columnName (i'm running it against a large COTS application) but adding a null-safe to the IndexProcessor class seems to address this.

The condition on line 45 allows the columnName to be null but adding a null-safe when finding a column (lines 60 and 86 seem to solve it.

https://github.com/hibernate/hibernate-tools/blame/20e91606166e44aae2609c55e4091b3b6b362f8b/orm/src/main/java/org/hibernate/tool/internal/reveng/reader/IndexProcessor.java#L45

Environment

None

Assignee

Joel Ramos

Reporter

Joel Ramos

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Priority

Minor
Configure