Value of hibernate.hbm2ddl.auto not trimmed of whitespace

Description

Hibernate does not seem to trim any possible whitespace from the value of the hibernate.hbm2ddl.auto property when parsing.

For example, an accidentally mis-configured value of "update " (with whitespace at the end) is not recognized as a valid option. This results in Hibernate quietly ignoring what seems to be, at first glance, a valid value for the property.

Considering how easy it can be to accidentally add whitespace to the end of a plaintext file (such as a .properties file format), I think it would make sense for ease of use if these values were trimmed of whitespace before being interpreted.

Environment

Hibernate version 3.5.4-Final, PostgreSQL dialect

Activity

Show:
Brett Meyer
October 2, 2013, 9:01 PM

I'd rather not try to handle incorrect values dynamically, even if trim is simple. Instead, logs a warning if an un-expected value is found.

Rejected

Assignee

Unassigned

Reporter

Matt Brown

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Trivial