Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333772 - empty replacement is not allowed in property replace function, but should be
Summary: empty replacement is not allowed in property replace function, but should be
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Buckminster (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: buckminster.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-07 12:33 EST by Matthew Webber CLA
Modified: 2019-02-25 14:41 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Webber CLA 2011-01-07 12:33:19 EST
In an rmap I have the following:
  <rm:propertyElement key="subversion_authentication_string">
    <bc:replace pattern=".*not\.set.*" replacement="">
      <bc:constant value="${svn.username}:${svn.password}@"/>
    </bc:replace>
  </rm:propertyElement>
  <rm:propertyElement key="subversion_url">
    <bc:constant value="https://${subversion_authentication_string}myserver/svn"/>
  </rm:propertyElement>

The idea here is that is svn.username and svn.password are both set (on the command line or in the CQUERY), then ${subversion_authentication_string} will contain the appropriate text, otherwise it will be the empty string.

However, this results in
org.xml.sax.SAXParseException: pattern but no replacement
(I get the same result if I omit the replacement= attribute entirely).

I can work around this, but it seems to me that an empty string should be a valid replacement.