[hibernate-issues] [Hibernate-JIRA] Assigned: (HHH-6817) Logging of strings containing the percent character broken
Sanne Grinovero (JIRA)
noreply at atlassian.com
Tue Nov 22 18:53:19 EST 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sanne Grinovero reassigned HHH-6817:
------------------------------------
Assignee: Sanne Grinovero
> 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
> Assignee: Sanne Grinovero
> 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: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list