Skip to content

Commit

Permalink
decoration: Backward compatibility phase 2
Browse files Browse the repository at this point in the history
Complete the changes by changing the `+` behavior back to not
adding literals.

Fixes #5260

Signed-off-by: BJ Hargrave <bj@hargrave.dev>
  • Loading branch information
bjhargrave committed May 24, 2022
1 parent 13a6c34 commit f3aead2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
3 changes: 1 addition & 2 deletions biz.aQute.bndlib/src/aQute/bnd/build/Project.java
Original file line number Diff line number Diff line change
Expand Up @@ -619,8 +619,7 @@ public List<Container> getBundles(Strategy strategyx, String spec, String source
Parameters bundles = parseHeader(spec);
if (source != null) {
Instructions decorator = new Instructions(mergeProperties(source + "+"));
// TODO change the decorated call to remove the second arg.
decorator.decorate(bundles, true);
decorator.decorate(bundles);
decorator = new Instructions(mergeProperties(source + "++"));
decorator.decorate(bundles, true);
}
Expand Down
12 changes: 4 additions & 8 deletions biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,7 @@ public boolean hasSources() {
@Override
protected Jar getExtra() throws Exception {
Parameters conditionals = getMergedParameters(CONDITIONAL_PACKAGE);
// TODO change the decorated call to remove the second arg.
conditionals.putAll(decorated(CONDITIONALPACKAGE, true));
conditionals.putAll(decorated(CONDITIONALPACKAGE));
if (conditionals.isEmpty())
return null;
logger.debug("do Conditional Package {}", conditionals);
Expand Down Expand Up @@ -629,11 +628,9 @@ private void doExpand(Jar dot) throws Exception {
}

Parameters private_package = getParameters(PRIVATE_PACKAGE);
// TODO change the decorated call to remove the second arg.
Parameters privatepackage = decorated(PRIVATEPACKAGE, true);
Parameters privatepackage = decorated(PRIVATEPACKAGE);
Parameters testpackage = new Parameters();
// TODO change the decorated call to remove the second arg.
Parameters includepackage = decorated(INCLUDEPACKAGE, true);
Parameters includepackage = decorated(INCLUDEPACKAGE);

if (buildInstrs.undertest()) {
String h = mergeProperties(Constants.TESTPACKAGES, "test;presence:=optional");
Expand Down Expand Up @@ -905,8 +902,7 @@ private Instruction matches(Instructions instructions, String pack, Set<Instruct
private void doIncludeResources(Jar jar) throws Exception {
Parameters includes = parseHeader(getProperty("Bundle-Includes"));
if (includes.isEmpty()) {
// TODO change the decorated call to remove the second arg.
includes = decorated(Constants.INCLUDERESOURCE, true);
includes = decorated(Constants.INCLUDERESOURCE);
includes.putAll(getMergedParameters(Constants.INCLUDE_RESOURCE));
} else {
warning("Please use -includeresource instead of Bundle-Includes");
Expand Down

0 comments on commit f3aead2

Please sign in to comment.