Skip to content

Fix: DownloadStatus should carry information about its URI - #1109

Merged
merks merged 2 commits into
eclipse-equinox:masterfrom
subyssurendran666:DownloadStatus_should_carry_information_about_URI_178
Jul 30, 2026
Merged

Fix: DownloadStatus should carry information about its URI#1109
merks merged 2 commits into
eclipse-equinox:masterfrom
subyssurendran666:DownloadStatus_should_carry_information_about_URI_178

Conversation

@subyssurendran666

Copy link
Copy Markdown
Contributor

DownloadStatus already tracked file size, last-modified timestamp, and transfer rate, but had no field to identify which URL the status was recorded for, making it impossible for callers to correlate a status object back to the download that produced it. A uri field is added with getUri() / setUri(URI) accessors and included in toString(), following the same mutable-setter pattern as the existing fields to avoid any constructor API break. In RepositoryTransport, the URI was already flowing through as a parameter at every DownloadStatus construction site but was never attached to the resulting object; this fix wires it in across all exit paths — success, cancellation, authentication failure, and retry exhaustion — via thin public wrappers around internal helpers, with the same pattern applied symmetrically to RepositoryStatus. Nine unit tests are added in DownloadStatusTest covering the new field, the toString() null fallback, and all four factory methods across both classes.

Fix: #178

Add a uri field to DownloadStatus with getUri() and setUri(URI) accessors and include it in toString(). In RepositoryTransport, the URI was already flowing as a parameter through every status-creation path but was never attached to the resulting object — this wires it in at every construction site in download() and via thin public wrappers around the internal forStatus0/forException0 helpers so no construction point is missed. The same wrapper pattern is applied to RepositoryStatus for consistency, keeping both public API classes behaviourally equivalent.

Fix: eclipse-equinox#178
@subyssurendran666
subyssurendran666 force-pushed the DownloadStatus_should_carry_information_about_URI_178 branch from 9c3c4dd to 74e1c24 Compare July 29, 2026 09:11
@eclipse-equinox-bot

Copy link
Copy Markdown
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

bundles/org.eclipse.equinox.p2.transport.ecf/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 1df8647a64cc38627b6ccad005abebf2c8e47770 Mon Sep 17 00:00:00 2001
From: Eclipse Equinox Bot <equinox-bot@eclipse.org>
Date: Wed, 29 Jul 2026 09:16:21 +0000
Subject: [PATCH] Version bump(s) for 4.41 stream


diff --git a/bundles/org.eclipse.equinox.p2.transport.ecf/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.transport.ecf/META-INF/MANIFEST.MF
index 2bdd13315..4bcda62c1 100644
--- a/bundles/org.eclipse.equinox.p2.transport.ecf/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.transport.ecf/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.equinox.p2.transport.ecf
-Bundle-Version: 1.4.700.qualifier
+Bundle-Version: 1.4.800.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Require-Bundle: org.eclipse.ecf;bundle-version="3.1.0",
  org.eclipse.ecf.filetransfer;bundle-version="4.0.0",
-- 
2.54.0

Further information are available in Common Build Issues - Missing version increments.

@github-actions

Copy link
Copy Markdown

Test Results

   18 files  ± 0     18 suites  ±0   29m 45s ⏱️ + 1m 0s
2 191 tests +10  2 188 ✅ +10  3 💤 ±0  0 ❌ ±0 
5 227 runs  +30  5 218 ✅ +30  9 💤 ±0  0 ❌ ±0 

Results for commit 48371e4. ± Comparison against base commit cc32498.

@merks

merks commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@laeubi

Given you seem to have asked for something like this, do you want to review this?

@merks
merks merged commit d9a40db into eclipse-equinox:master Jul 30, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DownloadStatus should carry information about its URL/URI

3 participants