-
Notifications
You must be signed in to change notification settings - Fork 1.2k
chore(deps): update commons-cli version #556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the commons-cli dependency from version 1.4 to 1.9.0 and makes the accompanying code changes required by the new dependency version.
- Updated dependency version in pom.xml
- Modified the calls to cl.getOptionValue() in multiple modules by explicitly casting the default null value to (String) null
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 14 comments.
Show a summary per file
File | Description |
---|---|
src/main/java/io/confluent/examples/streams/microservices/util/ProducePayments.java | Added explicit cast to null for config file option |
src/main/java/io/confluent/examples/streams/microservices/util/ProduceOrders.java | Added explicit cast to null for config file option |
src/main/java/io/confluent/examples/streams/microservices/util/ProduceCustomers.java | Added explicit cast to null for config file option |
src/main/java/io/confluent/examples/streams/microservices/util/ConsumePayments.java | Added explicit cast to null for config file option |
src/main/java/io/confluent/examples/streams/microservices/util/ConsumeOrders.java | Added explicit cast to null for config file option |
src/main/java/io/confluent/examples/streams/microservices/util/ConsumeCustomers.java | Added explicit cast to null for config file option |
src/main/java/io/confluent/examples/streams/microservices/ValidationsAggregatorService.java | Added explicit cast to null for config file option |
src/main/java/io/confluent/examples/streams/microservices/PostOrdersAndPayments.java | Added explicit cast to null for config file option |
src/main/java/io/confluent/examples/streams/microservices/OrdersService.java | Added explicit cast to null for config file option |
src/main/java/io/confluent/examples/streams/microservices/OrderDetailsService.java | Added explicit cast to null for config file option |
src/main/java/io/confluent/examples/streams/microservices/InventoryService.java | Added explicit cast to null for config file option |
src/main/java/io/confluent/examples/streams/microservices/FraudService.java | Added explicit cast to null for config file option |
src/main/java/io/confluent/examples/streams/microservices/EmailService.java | Added explicit cast to null for config file option |
src/main/java/io/confluent/examples/streams/microservices/AddInventory.java | Added explicit cast to null for config file option |
pom.xml | Upgraded the commons-cli dependency version to 1.9.0 |
Comments suppressed due to low confidence (1)
pom.xml:119
- Ensure that upgrading commons-cli to version 1.9.0 does not introduce breaking API changes and that compatibility with existing code is maintained.
<version>1.9.0</version>
@@ -37,7 +37,7 @@ public static void main(final String[] args) throws Exception { | |||
|
|||
final CommandLine cl = new DefaultParser().parse(opts, args); | |||
|
|||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", null)) | |||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", (String) null)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The configuration loading code appears in multiple services. Consider extracting this repeated pattern into a helper method to reduce duplication.
Copilot uses AI. Check for mistakes.
@@ -39,7 +39,7 @@ public static void main(final String[] args) throws Exception { | |||
|
|||
final CommandLine cl = new DefaultParser().parse(opts, args); | |||
|
|||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", null)) | |||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", (String) null)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The configuration loading logic is repeated here. Consider centralizing this logic in a shared utility method to avoid redundancy.
Copilot uses AI. Check for mistakes.
@@ -45,7 +45,7 @@ public static void main(final String[] args) throws Exception { | |||
Collections.singletonMap(AbstractKafkaSchemaSerDeConfig.SCHEMA_REGISTRY_URL_CONFIG, schemaRegistryUrl), | |||
isKeySerde); | |||
|
|||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", null)) | |||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", (String) null)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The same configuration loading pattern is used repeatedly. Extracting this pattern into a helper method could improve maintainability.
Copilot uses AI. Check for mistakes.
@@ -38,7 +38,7 @@ public static void main(final String[] args) throws Exception { | |||
final String bootstrapServers = cl.getOptionValue("b", DEFAULT_BOOTSTRAP_SERVERS); | |||
final String schemaRegistryUrl = cl.getOptionValue("schema-registry", DEFAULT_SCHEMA_REGISTRY_URL); | |||
|
|||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", null)) | |||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", (String) null)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The configuration loading logic is duplicated. Consider creating a common utility method to handle this pattern.
Copilot uses AI. Check for mistakes.
@@ -39,7 +39,7 @@ public static void main(final String[] args) throws Exception { | |||
final String bootstrapServers = cl.getOptionValue("b", DEFAULT_BOOTSTRAP_SERVERS); | |||
final String schemaRegistryUrl = cl.getOptionValue("schema-registry", DEFAULT_SCHEMA_REGISTRY_URL); | |||
|
|||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", null)) | |||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", (String) null)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The configuration file loading code is repeated; consider centralizing this logic to improve maintainability.
Copilot uses AI. Check for mistakes.
@@ -217,7 +217,7 @@ public static void main(final String[] args) throws Exception { | |||
formatter.printHelp("Order Details Service", opts); | |||
return; | |||
} | |||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", null)) | |||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", (String) null)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The configuration loading pattern is repeated; abstracting this logic into a utility method could help reduce redundancy.
Copilot uses AI. Check for mistakes.
@@ -200,7 +200,7 @@ public static void main(final String[] args) throws Exception { | |||
return; | |||
} | |||
|
|||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", null)) | |||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", (String) null)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The configuration loading code is reused in multiple locations; consider extracting it to a helper method to improve maintainability.
Copilot uses AI. Check for mistakes.
@@ -166,7 +166,7 @@ public static void main(final String[] args) throws Exception { | |||
return; | |||
} | |||
final FraudService service = new FraudService(); | |||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", null)) | |||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", (String) null)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The repeated configuration file loading code could be refactored into a common utility method for better maintainability.
Copilot uses AI. Check for mistakes.
@@ -152,7 +152,7 @@ public static void main(final String[] args) throws Exception { | |||
} | |||
final EmailService service = new EmailService(new LoggingEmailer()); | |||
|
|||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", null)) | |||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", (String) null)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider extracting the configuration loading logic into a shared helper to avoid duplication across modules.
Copilot uses AI. Check for mistakes.
@@ -77,7 +77,7 @@ public static void main(final String[] args) throws Exception { | |||
|
|||
final String bootstrapServers = cl.getOptionValue("b", DEFAULT_BOOTSTRAP_SERVERS); | |||
|
|||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", null)) | |||
final Properties defaultConfig = Optional.ofNullable(cl.getOptionValue("config-file", (String) null)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The configuration loading code is duplicated; consider refactoring it into a utility function to reduce repetition.
Copilot uses AI. Check for mistakes.
Splitting out one version bump from #541 to apply required code changes.