eclipse-jkube / jkube

Build and Deploy java applications on Kubernetes
https://www.eclipse.dev/jkube/
Eclipse Public License 2.0
775 stars 521 forks source link

Issue: Replace Deprecated `asList()` Method in `DefaultServiceEnricherAddMissingPartsTest` #3507

Closed ShivamChavan01 closed 1 week ago

ShivamChavan01 commented 1 week ago

Component

JKube Kit

Task description

Description

The DefaultServiceEnricherAddMissingPartsTest class in the JKube project currently uses the deprecated asList() method from AssertJ, which is incompatible with the latest AssertJ versions. This issue aims to replace asList() with asInstanceOf(InstanceOfAssertFactories.list(type.class)) to ensure compatibility and maintain best practices.

Affected Class

https://github.com/eclipse-jkube/jkube/blob/358ce5c29b101de94fc42748ead91c5433cfa44c/jkube-kit/enricher/generic/src/test/java/org/eclipse/jkube/enricher/generic/DefaultServiceEnricherAddMissingPartsTest.java#L71-L72

Proposed Solution

  1. Method Replacement: Replace all instances of asList() with asInstanceOf(InstanceOfAssertFactories.list(type.class)) in the DefaultServiceEnricherAddMissingPartsTest class.
  2. Code Cleanup: Check and remove any unused imports or redundant code during this update.

Expected Outcome

Additional Context

This update is part of an ongoing initiative to refactor deprecated methods throughout the JKube project for better maintainability and compatibility.

Thank you for working on this issue!

ShivamChavan01 commented 1 week ago

@rohanKanojia assigin me