Skip to content
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

Enable and fix deprecation and unchecked warnings #70

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

orgads
Copy link
Contributor

@orgads orgads commented Mar 5, 2024

Testing done

Submitter checklist

Preview Give feedback
[WARNING] /home/audc/yaml-axis-plugin/src/main/java/org/jenkinsci/plugins/yamlaxis/YamlAxis.java:[34,43] name in hudson.matrix.Axis has been deprecated
[WARNING] /home/audc/yaml-axis-plugin/src/main/java/org/jenkinsci/plugins/yamlaxis/YamlAxis.java:[46,43] name in hudson.matrix.Axis has been deprecated
[WARNING] /home/audc/yaml-axis-plugin/src/main/java/org/jenkinsci/plugins/yamlaxis/YamlMatrixExecutionStrategy.java:[116,42] unchecked cast
  required: java.util.Map<java.lang.String,java.lang.String>
  found:    java.util.Map<java.lang.String,capture#1 of ?>
[WARNING] /home/audc/yaml-axis-plugin/src/main/java/org/jenkinsci/plugins/yamlaxis/YamlTextLoader.java:[17,14] getContent() in org.jenkinsci.plugins.yamlaxis.YamlTextLoader overrides getContent() in org.jenkinsci.plugins.yamlaxis.YamlLoader
  return type requires unchecked conversion from java.util.Map to java.util.Map<java.lang.String,java.lang.Object>
[WARNING] /home/audc/yaml-axis-plugin/src/main/java/org/jenkinsci/plugins/yamlaxis/YamlFileLoader.java:[23,14] getContent() in org.jenkinsci.plugins.yamlaxis.YamlFileLoader overrides getContent() in org.jenkinsci.plugins.yamlaxis.YamlLoader
  return type requires unchecked conversion from java.util.Map to java.util.Map<java.lang.String,java.lang.Object>

@sue445 sue445 self-requested a review March 5, 2024 08:24
Copy link
Contributor

@sue445 sue445 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orgads LGTM

If possible, could you post a log of the warnings you get when -Xlint:deprecation and -Xlint:unchecked are enabled?

[WARNING] /home/audc/yaml-axis-plugin/src/main/java/org/jenkinsci/plugins/yamlaxis/YamlAxis.java:[34,43] name in hudson.matrix.Axis has been deprecated
[WARNING] /home/audc/yaml-axis-plugin/src/main/java/org/jenkinsci/plugins/yamlaxis/YamlAxis.java:[46,43] name in hudson.matrix.Axis has been deprecated
[WARNING] /home/audc/yaml-axis-plugin/src/main/java/org/jenkinsci/plugins/yamlaxis/YamlMatrixExecutionStrategy.java:[116,42] unchecked cast
  required: java.util.Map<java.lang.String,java.lang.String>
  found:    java.util.Map<java.lang.String,capture#1 of ?>
[WARNING] /home/audc/yaml-axis-plugin/src/main/java/org/jenkinsci/plugins/yamlaxis/YamlTextLoader.java:[17,14] getContent() in org.jenkinsci.plugins.yamlaxis.YamlTextLoader overrides getContent() in org.jenkinsci.plugins.yamlaxis.YamlLoader
  return type requires unchecked conversion from java.util.Map to java.util.Map<java.lang.String,java.lang.Object>
[WARNING] /home/audc/yaml-axis-plugin/src/main/java/org/jenkinsci/plugins/yamlaxis/YamlFileLoader.java:[23,14] getContent() in org.jenkinsci.plugins.yamlaxis.YamlFileLoader overrides getContent() in org.jenkinsci.plugins.yamlaxis.YamlLoader
  return type requires unchecked conversion from java.util.Map to java.util.Map<java.lang.String,java.lang.Object>
@orgads
Copy link
Contributor Author

orgads commented Mar 5, 2024

@orgads LGTM

If possible, could you post a log of the warnings you get when -Xlint:deprecation and -Xlint:unchecked are enabled?

Sure. Added to the commit message and to the issue body.

@sue445
Copy link
Contributor

sue445 commented Mar 5, 2024

thx!

@sue445 sue445 merged commit c6ef70d into jenkinsci:master Mar 5, 2024
12 checks passed
@orgads orgads deleted the fix-warnings branch March 5, 2024 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants