]
Gail Badner updated HHH-6817:
-----------------------------
Fix Version/s: 3.6.next
4.0.0.next
Logging of strings containing the percent character broken
----------------------------------------------------------
Key: HHH-6817
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6817
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 4.0.0.CR6
Environment: HSQLDB 2.2.6 snapshot
Reporter: Fred Toussi
Priority: Blocker
Fix For: 4.0.0.next, 3.6.next
The method AbstractTypeDescriptor#extractLoggableRepresentation(T value) does not escape
the percent character. Possible workaround below:
public String extractLoggableRepresentation(T value) {
if (value == null)
return null;
String stringValue = value.toString();
return stringValue.replace("%", "%%");
}
The return value is used for logging, where the string is used as the format argument to
java.lang.String#format(String format, Object... args). The percent character is
interpreted as a format identifier and causes an exception as what follows is not
necessarily a valid format template.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: