Skip to content

Commit bacb601

Browse files
vogellaclaude
andcommitted
Fix deprecation warning in ChainedReexportPerformanceTest
Cast null to VersionRange (org.osgi.framework) to resolve to the non-deprecated overload of IBundleProjectService.newRequiredBundle(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1cac8bc commit bacb601

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/core/tests/internal/classpath/ChainedReexportPerformanceTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import org.junit.jupiter.api.BeforeEach;
5555
import org.junit.jupiter.api.Test;
5656
import org.osgi.framework.Version;
57+
import org.osgi.framework.VersionRange;
5758

5859
public class ChainedReexportPerformanceTest {
5960

@@ -163,8 +164,8 @@ public void testChainedReexportPerformance() throws Exception {
163164
consumerDesc.setBundleVersion(new Version("1.0.0"));
164165

165166
// Require the last bundle in the chain with re-export
166-
IRequiredBundleDescription mainReq = service.newRequiredBundle(CHAIN_PREFIX + (BUNDLE_CHAIN_DEPTH - 1), null,
167-
false, true);
167+
IRequiredBundleDescription mainReq = service.newRequiredBundle(CHAIN_PREFIX + (BUNDLE_CHAIN_DEPTH - 1),
168+
(VersionRange) null, false, true);
168169
consumerDesc.setRequiredBundles(new IRequiredBundleDescription[] { mainReq });
169170

170171
consumerDesc.setNatureIds(new String[] { JavaCore.NATURE_ID, IBundleProjectDescription.PLUGIN_NATURE });

0 commit comments

Comments
 (0)