This is an automated email from the ASF dual-hosted git repository.

alien11689 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/aries.git


The following commit(s) were added to refs/heads/trunk by this push:
     new e56a7ac84 ARIES-2243: Avoid manifest localization in SPI Fly
e56a7ac84 is described below

commit e56a7ac8479ee2f9d0d80f54a77f2219d1947a32
Author: OLSander <[email protected]>
AuthorDate: Thu Nov 5 11:02:30 2026 +0100

    ARIES-2243: Avoid manifest localization in SPI Fly
    
    Read raw manifest headers for consumer/provider discovery and bundle class 
paths, avoiding localization work for technical metadata. Add host and fragment 
consumer-discovery regression coverage and update provider/weaving mock 
expectations.
---
 .../org/apache/aries/spifly/BaseActivator.java     |   2 +-
 .../spifly/ProviderBundleTrackerCustomizer.java    |   8 +-
 .../main/java/org/apache/aries/spifly/Util.java    |   2 +-
 .../aries/spifly/ConsumerHeaderDiscoveryTest.java  | 139 +++++++++++++++++++++
 ...ndleTrackerCustomizerGenericCapabilityTest.java |   8 +-
 .../ProviderBundleTrackerCustomizerTest.java       |   6 +-
 .../java/org/apache/aries/spifly/UtilTest.java     |   4 +-
 .../ClientWeavingHookGenericCapabilityTest.java    |   4 +-
 .../dynamic/ClientWeavingHookOSGi43Test.java       |   2 +-
 .../spifly/dynamic/ClientWeavingHookTest.java      |   2 +-
 10 files changed, 158 insertions(+), 19 deletions(-)

diff --git 
a/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/BaseActivator.java 
b/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/BaseActivator.java
index ad34f13cd..39c602eb0 100644
--- 
a/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/BaseActivator.java
+++ 
b/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/BaseActivator.java
@@ -171,7 +171,7 @@ public abstract class BaseActivator implements 
BundleActivator {
 
         List<String> l = new ArrayList<String>();
         for (Bundle bf : bundlesFragments) {
-            String header = bf.getHeaders().get(headerName);
+            String header = bf.getHeaders("").get(headerName);
             if (header != null) {
                 l.add(header);
             }
diff --git 
a/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java
 
b/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java
index 1dc7e6bef..92708f2bf 100644
--- 
a/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java
+++ 
b/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java
@@ -88,7 +88,7 @@ public class ProviderBundleTrackerCustomizer implements 
BundleTrackerCustomizer
         DiscoveryMode discoveryMode = DiscoveryMode.SERVICELOADER_CAPABILITIES;
         List<String> providedServices = null;
         Map<String, Object> customAttributes = new HashMap<String, Object>();
-        if (bundle.getHeaders().get(SpiFlyConstants.REQUIRE_CAPABILITY) != 
null) {
+        if (bundle.getHeaders("").get(SpiFlyConstants.REQUIRE_CAPABILITY) != 
null) {
             try {
                 providedServices = 
readServiceLoaderMediatorCapabilityMetadata(bundle, customAttributes);
             } catch (InvalidSyntaxException e) {
@@ -275,7 +275,7 @@ public class ProviderBundleTrackerCustomizer implements 
BundleTrackerCustomizer
             serviceFileURLs.addAll(Collections.list(entries));
         }
 
-        Object bcp = bundle.getHeaders().get(Constants.BUNDLE_CLASSPATH);
+        Object bcp = bundle.getHeaders("").get(Constants.BUNDLE_CLASSPATH);
         if (bcp instanceof String) {
             for (String entry : ((String) bcp).split(",")) {
                 entry = entry.trim();
@@ -298,7 +298,7 @@ public class ProviderBundleTrackerCustomizer implements 
BundleTrackerCustomizer
 
     private String getHeaderFromBundleOrFragment(Bundle bundle, String 
headerName, String matchString) {
         final boolean mergeHeader = MERGE_HEADERS.contains(headerName);
-        Parameters headerParameters = new 
Parameters(bundle.getHeaders().get(headerName));
+        Parameters headerParameters = new 
Parameters(bundle.getHeaders("").get(headerName));
         if (matches(headerParameters.toString(), matchString) && !mergeHeader) 
{
             return headerParameters.isEmpty() ? null : 
headerParameters.toString();
         }
@@ -309,7 +309,7 @@ public class ProviderBundleTrackerCustomizer implements 
BundleTrackerCustomizer
             if (wiring != null) {
                 for (BundleWire wire : 
wiring.getProvidedWires("osgi.wiring.host")) {
                     Bundle fragment = 
wire.getRequirement().getRevision().getBundle();
-                    Parameters fragmentParameters = new 
Parameters(fragment.getHeaders().get(headerName));
+                    Parameters fragmentParameters = new 
Parameters(fragment.getHeaders("").get(headerName));
                     if (mergeHeader) {
                         // Parameters.mergeWith merges the attributes of 
colliding map entries.
                         // Fragment headers are parsed independently, so 
append every clause and
diff --git 
a/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/Util.java 
b/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/Util.java
index 1bed94702..1bb2b3f89 100644
--- a/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/Util.java
+++ b/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/Util.java
@@ -274,7 +274,7 @@ public class Util {
         }
 
         // if we can't find any classes in the bundle directly, try the 
Bundle-ClassPath
-        Object bcp = b.getHeaders().get(Constants.BUNDLE_CLASSPATH);
+        Object bcp = b.getHeaders("").get(Constants.BUNDLE_CLASSPATH);
         if (bcp instanceof String) {
             for (String entry : ((String) bcp).split(",")) {
                 entry = entry.trim();
diff --git 
a/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ConsumerHeaderDiscoveryTest.java
 
b/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ConsumerHeaderDiscoveryTest.java
new file mode 100644
index 000000000..bd0791339
--- /dev/null
+++ 
b/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ConsumerHeaderDiscoveryTest.java
@@ -0,0 +1,139 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.spifly;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Dictionary;
+import java.util.Hashtable;
+import java.util.Optional;
+import java.util.Set;
+
+import org.easymock.EasyMock;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.wiring.BundleRequirement;
+import org.osgi.framework.wiring.BundleRevision;
+import org.osgi.framework.wiring.BundleWire;
+import org.osgi.framework.wiring.BundleWiring;
+
+/**
+ * Verifies that consumer discovery reads raw manifest headers from hosts and
+ * fragments without requesting header localization.
+ *
+ * @see <a 
href="https://issues.apache.org/jira/browse/ARIES-2243";>ARIES-2243</a>
+ */
+@RunWith(Parameterized.class)
+public class ConsumerHeaderDiscoveryTest {
+    @Parameters(name = "{0}, fragment={1}")
+    public static Iterable<Object[]> parameters() {
+        return Arrays.asList(new Object[][] {
+            {SpiFlyConstants.SPI_CONSUMER_HEADER, false},
+            {SpiFlyConstants.SPI_CONSUMER_HEADER, true},
+            {SpiFlyConstants.REQUIRE_CAPABILITY, false},
+            {SpiFlyConstants.REQUIRE_CAPABILITY, true}
+        });
+    }
+
+    private final String headerName;
+    private final boolean fragment;
+
+    public ConsumerHeaderDiscoveryTest(String headerName, boolean fragment) {
+        this.headerName = headerName;
+        this.fragment = fragment;
+    }
+
+    @Test
+    public void testConsumerDiscoveryUsesRawHeaders() throws Exception {
+        Dictionary<String, String> headers = new Hashtable<String, String>();
+        if (SpiFlyConstants.REQUIRE_CAPABILITY.equals(headerName)) {
+            headers.put(headerName, SpiFlyConstants.CLIENT_REQUIREMENT + 
",osgi.serviceloader;"
+                    + "filter:=\"(osgi.serviceloader=org.example.Service)\"");
+        } else {
+            headers.put(headerName, 
"java.util.ServiceLoader#load(java.lang.Class)");
+        }
+
+        Bundle fragmentBundle = null;
+        BundleRevision hostRevision = null;
+        if (fragment) {
+            fragmentBundle = mockBundle(headers, null);
+            hostRevision = mockHostRevision(fragmentBundle);
+        }
+        Bundle host = mockBundle(fragment ? new Hashtable<String, String>() : 
headers, hostRevision);
+        BaseActivator activator = new BaseActivator() {
+            @Override
+            public void start(BundleContext context) throws Exception {}
+        };
+        activator.setAutoConsumerInstructions(Optional.empty());
+
+        activator.addConsumerWeavingData(host, 
SpiFlyConstants.SPI_CONSUMER_HEADER);
+
+        Set<WeavingData> weavingData = activator.getWeavingData(host);
+        assertNotNull(weavingData);
+        assertEquals(SpiFlyConstants.REQUIRE_CAPABILITY.equals(headerName) ? 2 
: 1, weavingData.size());
+        for (WeavingData data : weavingData) {
+            assertEquals("java.util.ServiceLoader", data.getClassName());
+            assertEquals("load", data.getMethodName());
+        }
+        EasyMock.verify(host);
+        if (fragmentBundle != null) {
+            EasyMock.verify(fragmentBundle);
+        }
+    }
+
+    private Bundle mockBundle(Dictionary<String, String> headers, 
BundleRevision revision) {
+        Bundle bundle = EasyMock.createMock(Bundle.class);
+        // The no-argument overload must not be called: it requests localized 
headers.
+        EasyMock.expect(bundle.getHeaders("")).andReturn(headers).times(2);
+        
EasyMock.expect(bundle.adapt(BundleRevision.class)).andReturn(revision).anyTimes();
+        EasyMock.replay(bundle);
+        return bundle;
+    }
+
+    private BundleRevision mockHostRevision(Bundle fragmentBundle) {
+        BundleRevision fragmentRevision = 
EasyMock.createMock(BundleRevision.class);
+        
EasyMock.expect(fragmentRevision.getBundle()).andReturn(fragmentBundle).anyTimes();
+        EasyMock.replay(fragmentRevision);
+
+        BundleRequirement requirement = 
EasyMock.createMock(BundleRequirement.class);
+        
EasyMock.expect(requirement.getRevision()).andReturn(fragmentRevision).anyTimes();
+        EasyMock.replay(requirement);
+
+        BundleWire wire = EasyMock.createMock(BundleWire.class);
+        
EasyMock.expect(wire.getRequirement()).andReturn(requirement).anyTimes();
+        EasyMock.replay(wire);
+
+        BundleWiring wiring = EasyMock.createMock(BundleWiring.class);
+        EasyMock.expect(wiring.getProvidedWires("osgi.wiring.host"))
+                .andReturn(Collections.singletonList(wire)).anyTimes();
+        EasyMock.replay(wiring);
+
+        BundleRevision revision = EasyMock.createMock(BundleRevision.class);
+        EasyMock.expect(revision.getWiring()).andReturn(wiring).anyTimes();
+        EasyMock.replay(revision);
+        return revision;
+    }
+}
diff --git 
a/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerGenericCapabilityTest.java
 
b/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerGenericCapabilityTest.java
index 4cf5ddbff..96342c2d3 100644
--- 
a/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerGenericCapabilityTest.java
+++ 
b/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerGenericCapabilityTest.java
@@ -554,7 +554,7 @@ public class 
ProviderBundleTrackerCustomizerGenericCapabilityTest {
                 SpiFlyConstants.SERVICELOADER_CAPABILITY_NAMESPACE + "; " +
                 SpiFlyConstants.SERVICELOADER_CAPABILITY_NAMESPACE + 
"=org.apache.aries.mytest.MySPI");
         headers.put(Constants.BUNDLE_CLASSPATH, 
".,non-jar.jar,embedded.jar,embedded2.jar");
-        EasyMock.expect(implBundle.getHeaders()).andReturn(headers).anyTimes();
+        
EasyMock.expect(implBundle.getHeaders("")).andReturn(headers).anyTimes();
 
         URL embeddedJar = getClass().getResource("/embedded.jar");
         assertNotNull("precondition", embeddedJar);
@@ -616,7 +616,7 @@ public class 
ProviderBundleTrackerCustomizerGenericCapabilityTest {
 
         Bundle implBundle = EasyMock.createNiceMock(Bundle.class);
         
EasyMock.expect(implBundle.getBundleContext()).andReturn(implBC).anyTimes();
-        EasyMock.expect(implBundle.getHeaders()).andReturn(headers).anyTimes();
+        
EasyMock.expect(implBundle.getHeaders("")).andReturn(headers).anyTimes();
         
EasyMock.expect(implBundle.getSymbolicName()).andReturn("bsn").anyTimes();
 
         // List the resources found at META-INF/services in the test bundle
@@ -681,7 +681,7 @@ public class 
ProviderBundleTrackerCustomizerGenericCapabilityTest {
     private Bundle mockSPIBundle4(BundleContext implBC, Dictionary<String, 
String> headers, BundleRevision rev) throws ClassNotFoundException {
         Bundle implBundle = EasyMock.createNiceMock(Bundle.class);
         
EasyMock.expect(implBundle.getBundleContext()).andReturn(implBC).anyTimes();
-        EasyMock.expect(implBundle.getHeaders()).andReturn(headers).anyTimes();
+        
EasyMock.expect(implBundle.getHeaders("")).andReturn(headers).anyTimes();
         if (rev != null)
             
EasyMock.expect(implBundle.adapt(BundleRevision.class)).andReturn(rev).anyTimes();
 
@@ -711,7 +711,7 @@ public class 
ProviderBundleTrackerCustomizerGenericCapabilityTest {
 
     private Bundle mockFragment(Dictionary<String, String> headers) {
         Bundle fragment = EasyMock.createMock(Bundle.class);
-        EasyMock.expect(fragment.getHeaders()).andReturn(headers).anyTimes();
+        EasyMock.expect(fragment.getHeaders("")).andReturn(headers).anyTimes();
         EasyMock.replay(fragment);
         return fragment;
     }
diff --git 
a/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerTest.java
 
b/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerTest.java
index ae7a6b5f9..af7ecb9f7 100644
--- 
a/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerTest.java
+++ 
b/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerTest.java
@@ -120,7 +120,7 @@ public class ProviderBundleTrackerCustomizerTest {
         Dictionary<String, String> headers = new Hashtable<String, String>();
         headers.put(SpiFlyConstants.SPI_PROVIDER_HEADER, "*");
         headers.put(Constants.BUNDLE_CLASSPATH, 
".,non-jar.jar,embedded.jar,embedded2.jar");
-        EasyMock.expect(implBundle.getHeaders()).andReturn(headers).anyTimes();
+        
EasyMock.expect(implBundle.getHeaders("")).andReturn(headers).anyTimes();
 
         URL embeddedJar = getClass().getResource("/embedded.jar");
         assertNotNull("precondition", embeddedJar);
@@ -189,7 +189,7 @@ public class ProviderBundleTrackerCustomizerTest {
         Dictionary<String, String> headers = new Hashtable<String, String>();
         if (spiProviderHeader != null)
             headers.put(SpiFlyConstants.SPI_PROVIDER_HEADER, 
spiProviderHeader);
-        EasyMock.expect(implBundle.getHeaders()).andReturn(headers).anyTimes();
+        
EasyMock.expect(implBundle.getHeaders("")).andReturn(headers).anyTimes();
 
         // List the resources found at META-INF/services in the test bundle
         URL dir = getClass().getResource("impl1/META-INF/services");
@@ -219,7 +219,7 @@ public class ProviderBundleTrackerCustomizerTest {
             
"osgi.serviceloader;osgi.serviceloader='org.apache.aries.mytest.MySPI2';register:='org.apache.aries.spifly.impl4.MySPIImpl4b';foo='bbb',"
 +
             
"osgi.serviceloader;osgi.serviceloader='org.apache.aries.mytest.MySPI2';register:='org.apache.aries.spifly.impl4.MySPIImpl4c';foo='ccc'"
         );
-        EasyMock.expect(implBundle.getHeaders()).andReturn(headers).anyTimes();
+        
EasyMock.expect(implBundle.getHeaders("")).andReturn(headers).anyTimes();
 
         // List the resources found at META-INF/services in the test bundle
         URL dir = getClass().getResource("impl4/META-INF/services");
diff --git 
a/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/UtilTest.java 
b/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/UtilTest.java
index f2ef9cfde..10e7afaeb 100644
--- a/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/UtilTest.java
+++ b/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/UtilTest.java
@@ -83,7 +83,7 @@ public class UtilTest {
         EasyMock.expect(providerBundle.getEntryPaths((String) 
EasyMock.anyObject())).andReturn(null).anyTimes();
         Dictionary<String, String> providerHeaders = new Hashtable<String, 
String>();
         providerHeaders.put(Constants.BUNDLE_CLASSPATH, ".,embedded3.jar");
-        
EasyMock.expect(providerBundle.getHeaders()).andReturn(providerHeaders).anyTimes();
+        
EasyMock.expect(providerBundle.getHeaders("")).andReturn(providerHeaders).anyTimes();
         
EasyMock.expect(providerBundle.getResource("embedded3.jar")).andReturn(url).anyTimes();
         providerBundle.loadClass((String) EasyMock.anyObject());
         EasyMock.expectLastCall().andAnswer(new IAnswer<Class<?>>() {
@@ -117,7 +117,7 @@ public class UtilTest {
         EasyMock.expect(providerBundle.getEntryPaths((String) 
EasyMock.anyObject())).andReturn(null).anyTimes();
         Dictionary<String, String> providerHeaders = new Hashtable<String, 
String>();
         providerHeaders.put(Constants.BUNDLE_CLASSPATH, ".,embedded3.jar");
-        
EasyMock.expect(providerBundle.getHeaders()).andReturn(providerHeaders).anyTimes();
+        
EasyMock.expect(providerBundle.getHeaders("")).andReturn(providerHeaders).anyTimes();
         
EasyMock.expect(providerBundle.getResource("embedded3.jar")).andReturn(url).anyTimes();
         providerBundle.loadClass((String) EasyMock.anyObject());
         EasyMock.expectLastCall().andAnswer(new IAnswer<Class<?>>() {
diff --git 
a/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/ClientWeavingHookGenericCapabilityTest.java
 
b/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/ClientWeavingHookGenericCapabilityTest.java
index bcd3036c5..197ec952f 100644
--- 
a/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/ClientWeavingHookGenericCapabilityTest.java
+++ 
b/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/ClientWeavingHookGenericCapabilityTest.java
@@ -199,7 +199,7 @@ public class ClientWeavingHookGenericCapabilityTest {
         fragmentConsumerHeaders.put(SpiFlyConstants.REQUIRE_CAPABILITY, 
SpiFlyConstants.CLIENT_REQUIREMENT);
 
         Bundle fragment = EasyMock.createMock(Bundle.class);
-        
EasyMock.expect(fragment.getHeaders()).andReturn(fragmentConsumerHeaders).anyTimes();
+        
EasyMock.expect(fragment.getHeaders("")).andReturn(fragmentConsumerHeaders).anyTimes();
         EasyMock.replay(fragment);
         BundleRevision frev = EasyMock.createMock(BundleRevision.class);
         EasyMock.expect(frev.getBundle()).andReturn(fragment).anyTimes();
@@ -838,7 +838,7 @@ public class ClientWeavingHookGenericCapabilityTest {
         Bundle consumerBundle = EasyMock.createMock(Bundle.class);
         
EasyMock.expect(consumerBundle.getSymbolicName()).andReturn("testConsumer").anyTimes();
         EasyMock.expect(consumerBundle.getVersion()).andReturn(new Version(1, 
2, 3)).anyTimes();
-        
EasyMock.expect(consumerBundle.getHeaders()).andReturn(headers).anyTimes();
+        
EasyMock.expect(consumerBundle.getHeaders("")).andReturn(headers).anyTimes();
         
EasyMock.expect(consumerBundle.getBundleContext()).andReturn(bc).anyTimes();
         
EasyMock.expect(consumerBundle.getBundleId()).andReturn(Long.MAX_VALUE).anyTimes();
         
EasyMock.expect(consumerBundle.adapt(BundleRevision.class)).andReturn(rev).anyTimes();
diff --git 
a/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/ClientWeavingHookOSGi43Test.java
 
b/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/ClientWeavingHookOSGi43Test.java
index 2400eb133..70a6dc2e0 100644
--- 
a/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/ClientWeavingHookOSGi43Test.java
+++ 
b/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/ClientWeavingHookOSGi43Test.java
@@ -241,7 +241,7 @@ public class ClientWeavingHookOSGi43Test  {
 
         Bundle consumerBundle = EasyMock.createMock(Bundle.class);
         
EasyMock.expect(consumerBundle.getSymbolicName()).andReturn("testConsumer").anyTimes();
-        
EasyMock.expect(consumerBundle.getHeaders()).andReturn(headers).anyTimes();
+        
EasyMock.expect(consumerBundle.getHeaders("")).andReturn(headers).anyTimes();
         
EasyMock.expect(consumerBundle.getBundleContext()).andReturn(bc).anyTimes();
         
EasyMock.expect(consumerBundle.getBundleId()).andReturn(Long.MAX_VALUE).anyTimes();
         
EasyMock.expect(consumerBundle.adapt(BundleRevision.class)).andReturn(null).anyTimes();
diff --git 
a/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/ClientWeavingHookTest.java
 
b/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/ClientWeavingHookTest.java
index 57ef54ef1..e2ac153d5 100644
--- 
a/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/ClientWeavingHookTest.java
+++ 
b/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/ClientWeavingHookTest.java
@@ -816,7 +816,7 @@ public class ClientWeavingHookTest {
 
         Bundle consumerBundle = EasyMock.createMock(Bundle.class);
         
EasyMock.expect(consumerBundle.getSymbolicName()).andReturn("testConsumer").anyTimes();
-        
EasyMock.expect(consumerBundle.getHeaders()).andReturn(headers).anyTimes();
+        
EasyMock.expect(consumerBundle.getHeaders("")).andReturn(headers).anyTimes();
         
EasyMock.expect(consumerBundle.getBundleContext()).andReturn(bc).anyTimes();
         
EasyMock.expect(consumerBundle.getBundleId()).andReturn(Long.MAX_VALUE).anyTimes();
         
EasyMock.expect(consumerBundle.adapt(BundleRevision.class)).andReturn(null).anyTimes();

Reply via email to