Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArchiveDecompressor : Repalce raw use of parameterized class 'ArchiveInputStream' by providing type #2838

Closed
2 tasks
rohanKanojia opened this issue Mar 20, 2024 · 2 comments · Fixed by #2869
Closed
2 tasks
Assignees
Labels
first-timers-only Is this your first time contributing? This could be a good place to start! good first issue Good for newcomers
Milestone

Comments

@rohanKanojia
Copy link
Member

Component

JKube Kit

Task description

Description

ArchiveInputStream is a parameterized class, however we don't seem to be providing it's type while creating it here:

https://github.com/eclipse/jkube/blob/b10c54f17d33974c80c1fc4a26ce6a44ef29dcf7/jkube-kit/common/src/main/java/org/eclipse/jkube/kit/common/archive/ArchiveDecompressor.java#L91

We should specify complete type parameter like this:

try (ArchiveInputStream<ArchiveEntry> ais = new ArchiveStreamFactory().createArchiveInputStream(is)) {

Expected Behavior

Parameterized type is provided in Generic

Acceptance Criteria

  • Raw use is replaced by providing generic type in variable declaration
  • ArchiveDecompressorTest passes after making this change

Before you start 🔴

👇 👇 👇 👇 👇 👇 👇 👇 👇 👇👇👇👇👇👇👇
Make sure you read the contributing guide first. Pay special attention to the ECA agreement section and the requirement to sign-off your commit.

How to manually test my changes

Kubernetes

If you don't have a real Kubernetes cluster available (most probably), you can use Minikube or Kind to test with a local cluster.

OpenShift

If you don't have a real OpenShift cluster available (most probably), you can use Red Hat's developer Sandbox for Red Hat OpenShift. The only requirement is to have a Red Hat account.

Once you have your Sandbox environment, you'll need to download the oc tool from the cluster console.
(Press the ? icon and from the context menu select Command line tools, you'll be redirected to https://$subdomain.openshiftapps.com/command-lines-tools where you'll be able to download the CLI for your platform)

@rohanKanojia rohanKanojia added good first issue Good for newcomers first-timers-only Is this your first time contributing? This could be a good place to start! labels Mar 20, 2024
@Jonathanlemon
Copy link
Contributor

Hi @rohanKanojia I'd like to tackle this. For the parameterized type, shall I use ArchiveEntry, or should I find a different suitable type?

@manusa
Copy link
Member

manusa commented Mar 28, 2024

shall I use ArchiveEntry

Yes, the relevant code changes are explained in the description. The point of this issue is for you to get familiarized with the Eclipse contribution procedure (ECA, creating a fork, pull request, and so on).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first-timers-only Is this your first time contributing? This could be a good place to start! good first issue Good for newcomers
Projects
None yet
3 participants