Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Pre-fetched assets on GHReleases #1750

Copy link
Copy link
Closed
@skaldarnar

Description

@skaldarnar
Issue body actions

Hi,

I'm a bit confused about the situation on pre-fetched/cached assets on GHRelease. I'd like to avoid additional API calls, see also my previous PR #977.

Can we make getAssets() use the behavior of assets() by now, and remove assets()? Or how do you want to handle this?

assets() lost it's @Preview/@BetaApi annotation in 4e7ac70#diff-d6ca05bee054ef7153d926fbe1c6cf67524ecaf7298ada1d9fff838119dceb95L263, maybe by accident. I guess if it would have kept the annotation, it would by now a non-deprecated preview (see #1184).

/**
* Get the cached assets.
*
* @return the assets
*
* @deprecated This should be the default behavior of {@link #getAssets()} in a future release. This method is
* introduced in addition to enable a transition to using cached asset information while keeping the
* existing logic in place for backwards compatibility.
*/
@Deprecated
public List<GHAsset> assets() {
return Collections.unmodifiableList(assets);
}
/**
* Re-fetch the assets of this release.
*
* @return the assets
* @throws IOException
* the io exception
* @deprecated The behavior of this method will change in a future release. It will then provide cached assets as
* provided by {@link #assets()}. Use {@link #listAssets()} instead to fetch up-to-date information of
* assets.
*/
@Deprecated
public List<GHAsset> getAssets() throws IOException {
return listAssets().toList();
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.