What needs to happen?
During migration of legacy PDI transformations to HOP, some code paths use the public constructor:
public ValueMetaBase(String name, int type, int length, int precision)
Using these public constructors can lead to issues in transformations that rely on inherited members in subclasses of ValueMetaBase.
This makes it harder to ensure correct usage and can introduce subtle bugs.
Recommendation
Change the following constructors from public to protected:
protected ValueMetaBase(String name)
protected ValueMetaBase(String name, int type)
protected ValueMetaBase(String name, int type, Comparator<Object> comparator)
protected ValueMetaBase(String name, int type, int length, int precision)
protected ValueMetaBase(String name, int type, int length, int precision, Comparator<Object> comparator)
Expected Outcome
- Encourage use of ValueMetaFactory.createValueMeta(...)
- Prevent incorrect direct instantiation
- Clarify intended usage patterns
Additional Context
The ValueMetaFactory should be the preferred way to create instances, as it ensures consistent initialization and better compatibility across transformations.
Issue Priority
Priority: 3
Issue Component
Component: API
What needs to happen?
During migration of legacy PDI transformations to HOP, some code paths use the public constructor:
Using these public constructors can lead to issues in transformations that rely on inherited members in subclasses of ValueMetaBase.
This makes it harder to ensure correct usage and can introduce subtle bugs.
Recommendation
Change the following constructors from public to protected:
Expected Outcome
Additional Context
The ValueMetaFactory should be the preferred way to create instances, as it ensures consistent initialization and better compatibility across transformations.
Issue Priority
Priority: 3
Issue Component
Component: API