Gyeongtae Park created ZEPPELIN-6240:
----------------------------------------
Summary: Use generics in CommandArgs constructor to improve type
safety
Key: ZEPPELIN-6240
URL: https://issues.apache.org/jira/browse/ZEPPELIN-6240
Project: Zeppelin
Issue Type: Improvement
Reporter: Gyeongtae Park
Fix For: 1.0.0, 0.12.1, 0.13.0
The {{CommandArgs}} class in {{FileInterpreter}} currently initializes {{args}}
and {{flags}} using raw types:
{code:java}
args = new ArrayList();
flags = new HashSet(); {code}
This can lead to unchecked conversion warnings and potential type-safety
issues. To address this, we propose replacing these with parameterized types
using the diamond operator:
{code:java}
args = new ArrayList<>();
flags = new HashSet<>(); {code}
This change improves code clarity, eliminates compiler warnings, and ensures
proper type checking at compile time without altering runtime behavior. No
functional change is expected from this improvement.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)