Issue 123107 - remove implicit rtl::O*StringBuffer conversions to char/utf-16 pointers
Summary: remove implicit rtl::O*StringBuffer conversions to char/utf-16 pointers
Status: CONFIRMED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 4.0.0
Hardware: All All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on: 123068
Blocks:
  Show dependency tree
 
Reported: 2013-08-26 08:48 UTC by hdu@apache.org
Modified: 2013-08-26 08:48 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description hdu@apache.org 2013-08-26 08:48:51 UTC
The implicit O*StringBuffer conversions to char/utf-16 pointers does not only facilitate the four bug families seen with the similar OString conversions in bug 123068 where the problems are more described in more detail:
- unintended pointer arithmetic instead of appending a value-string to a string
- failed tests for the emptiness of a string
- unintended template specializations
- string buffer lifetime mismanagement
but it also introduces a new bug family
- failing string comparisons
because the O*StringBuffer classes don't have the == and != comparison operators of their O*String counterparts. If string buffers are compared with == or != then the compiler does implicit conversions to their buffer pointer and compares these pointers, which is not the content-comparison that seems to be expected.