Skip to content

Commit

Permalink
List to varargs in testcase
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Rueger <[email protected]>
  • Loading branch information
chrisrueger committed Dec 5, 2023
1 parent 71edceb commit 735f936
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,14 @@ public void testDetectDuplicateExports() throws Exception {
// we'd see differences. The problem was that there were two
// exporters with different packages with the same name.

Capability cap1 = createCap("org.bundleA", "org.example.foo", "1.7.23", Arrays.asList("123", "456", "789"));
Capability cap1 = createCap("org.bundleA", "org.example.foo", "1.7.23", "123", "456", "789");

// same package but differences in the hashes (missing one hash) -> this
// is a problem
Capability cap2 = createCap("org.bundleB", "org.example.foo", "1.7.23", Arrays.asList("456", "789"));
Capability cap2 = createCap("org.bundleB", "org.example.foo", "1.7.23", "456", "789");

// some other OK cap
Capability cap3 = createCap("org.bundleC", "org.example.bar", "1.7.23", Arrays.asList("789,910"));
Capability cap3 = createCap("org.bundleC", "org.example.bar", "1.7.23", "789,910");


List<Capability> culprits = ResourceUtils.detectDuplicateCapabilitiesWithDifferentHashes("osgi.wiring.package",
Expand All @@ -247,7 +247,7 @@ public void testDetectDuplicateExports() throws Exception {



private CapabilityImpl createCap(String bundleSymName, String pck, String version, List<String> hashes) {
private CapabilityImpl createCap(String bundleSymName, String pck, String version, String... hashes) {
CapReqBuilder cr = new CapReqBuilder("osgi.wiring.package");
Attrs attrs1 = new Attrs();
attrs1.putTyped("bundle-symbolic-name", bundleSymName);
Expand Down

0 comments on commit 735f936

Please sign in to comment.