Add default implementation for UIComponent#getFamily()
- Dominant language
- Java
- Stars
- 127
- Forks
- 59
- Avg merge
- 23h
- Merged PRs (30d)
- 7
Description
Custom components inheriting from UIComponentBase are currently required to provide an implementation for UIComponent#getFamily() as it's an abstract method.
This is a small nuisance for simple custom components (e.g. ones used internally by some application), which rarely have any need for distinguishing components based on family.
Typically those components just return the empty string or null (#1267")) or some nonsense string like "whatshouldido.with.this".
If developers are not providing any meaningful return value for this method, I guess JSF might just as well provide a default implementation in UIComponentBase (e.g. a method just returning null), thereby making custom components yet again a tiny bit easier to create.
Contributor guide
Research direction
Start by reading UIComponentBase and the abstract UIComponent#getFamily() contract, then review the discussion referenced by issue #1267 for the expected behavior. Confirm whether the default should return null or an empty string and identify the relevant component tests; done means simple custom components no longer need to implement getFamily() while existing behavior remains compatible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100