Skip to content

Let the DefaultBuildContext also delegate getValue and setValue to the legacy build-api #107

Description

@Volodjam

Since #48 (PR #50), DefaultBuildContext stores objects in an internal contextMap.

Starting with PR #71, DefaultBuildContext delegates all methods to the legacy build API except getValue() and setValue(). As a result, objects are stored in the singleton DefaultBuildContext instead of the thread-local build context (ThreadBuildContext).

This causes problems in Eclipse when updating multiple projects that use plugins based on the new build API (for example, bnd-maven-plugin) to store and retrieve objects from the build context. In this situation, the same contextMap is shared across projects, leading to unintended cross-project state sharing.

It would be better to also delegate getValue() and setValue() to the legacy build API so that objects are stored in the thread-local ThreadBuildContext rather than the singleton DefaultBuildContext.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions