Skip to content

Fix initializing an implementation of an abstract base component#33

Merged
rconner46 merged 1 commit intomasterfrom
fix-initializing-implementation-of-abstract-component
Jan 14, 2025
Merged

Fix initializing an implementation of an abstract base component#33
rconner46 merged 1 commit intomasterfrom
fix-initializing-implementation-of-abstract-component

Conversation

@rconner46
Copy link
Contributor

What changed?

The SDK is unable to initialize an abstract BaseComponent with a valid, non-abstract, Implementation. Something like the following example:

@Implementation(is = ImplementationComponent.class, on = Platform.WEB)
// There could also be an implementation on other platforms
public abstract SomeComponent extends BaseComponent {
    // Some locators
    
    // Some abstract methods
}

public ImplementationComponent extends SomeComponent {
    // Implementation of the above
}

This was possible in version 5.x of the SDK. The issue is with the abstract check within the BaseComponentBuilder. It was being performed on the class being passed in to the BaseComponentBuilder instead of the implementation class that we look up from the annotation.

@rconner46 rconner46 merged commit 7fe53ad into master Jan 14, 2025
1 check passed
@rconner46 rconner46 deleted the fix-initializing-implementation-of-abstract-component branch January 14, 2025 17:28
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.

2 participants

Comments