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

Migrate code to Java 17 #130

Merged
merged 2 commits into from
Oct 27, 2024
Merged

Migrate code to Java 17 #130

merged 2 commits into from
Oct 27, 2024

Conversation

uhafner
Copy link
Member

@uhafner uhafner commented Oct 27, 2024

Refactor code to use some Java 17 enhancements.

@uhafner uhafner added the breaking Breaking Changes label Oct 27, 2024
Copy link

Partial score: 0/0

🚧 The grading has been aborted due to an error.

Exception

edu.hm.hafner.analysis.ParsingException: Input stream is not a PMD file.
	at edu.hm.hafner.analysis.parser.pmd.PmdParser.parseIssues(PmdParser.java:58)
	at edu.hm.hafner.analysis.parser.pmd.PmdParser.parse(PmdParser.java:32)
	at edu.hm.hafner.analysis.IssueParser.parseFile(IssueParser.java:69)
	at edu.hm.hafner.grading.FileSystemAnalysisReportFactory.create(FileSystemAnalysisReportFactory.java:32)
	at edu.hm.hafner.grading.AggregatedScore.gradeAnalysis(AggregatedScore.java:392)
	at edu.hm.hafner.grading.AutoGradingRunner.run(AutoGradingRunner.java:95)
	at edu.hm.hafner.grading.github.QualityMonitor.main(QualityMonitor.java:42)

Error Messages

Quality Monitor Errors:
An error occurred while grading
edu.hm.hafner.analysis.ParsingException: Input stream is not a PMD file.
	at edu.hm.hafner.analysis.parser.pmd.PmdParser.parseIssues(PmdParser.java:58)
	at edu.hm.hafner.analysis.parser.pmd.PmdParser.parse(PmdParser.java:32)
	at edu.hm.hafner.analysis.IssueParser.parseFile(IssueParser.java:69)
	at edu.hm.hafner.grading.FileSystemAnalysisReportFactory.create(FileSystemAnalysisReportFactory.java:32)
	at edu.hm.hafner.grading.AggregatedScore.gradeAnalysis(AggregatedScore.java:392)
	at edu.hm.hafner.grading.AutoGradingRunner.run(AutoGradingRunner.java:95)
	at edu.hm.hafner.grading.github.QualityMonitor.main(QualityMonitor.java:42)

Information Messages

--------------------------------------------------------------------------------
                    Start Quality Monitor 1.11.0 (#99404b7)                     
--------------------------------------------------------------------------------
Obtaining configuration from environment variable CONFIG
================================================================================
Processing 1 test configuration(s)
Tests Configuration:
{
  "id" : "tests",
  "name" : "Tests",
  "icon" : "",
  "maxScore" : 0,
  "tools" : [ {
    "id" : "test",
    "name" : "Tests",
    "pattern" : "**/target/*-reports/TEST*.xml",
    "sourcePath" : "",
    "metric" : "",
    "displayName" : "Tests"
  } ],
  "failureImpact" : 0,
  "passedImpact" : 0,
  "skippedImpact" : 0
}
Searching for Tests results matching file name pattern **/target/*-reports/TEST*.xml
- target/surefire-reports/TEST-edu.hm.hafner.ArchitectureTest.xml: TESTS: 9
- target/surefire-reports/TEST-edu.hm.hafner.PackageArchitectureTest.xml: TESTS: 1
- target/surefire-reports/TEST-edu.hm.hafner.coverage.ClassNodeTest.xml: TESTS: 7
- target/surefire-reports/TEST-edu.hm.hafner.coverage.ContainerNodeTest.xml: TESTS: 5
- target/surefire-reports/TEST-edu.hm.hafner.coverage.CoverageParserTest.xml: TESTS: 1
- target/surefire-reports/TEST-edu.hm.hafner.coverage.CoverageTest.xml: TESTS: 33
- target/surefire-reports/TEST-edu.hm.hafner.coverage.FileNodeTest.xml: TESTS: 20
- target/surefire-reports/TEST-edu.hm.hafner.coverage.FractionValueTest.xml: TESTS: 3
- target/surefire-reports/TEST-edu.hm.hafner.coverage.MethodNodeTest.xml: TESTS: 11
- target/surefire-reports/TEST-edu.hm.hafner.coverage.MetricTest.xml: TESTS: 30
- target/surefire-reports/TEST-edu.hm.hafner.coverage.ModuleNodeTest.xml: TESTS: 9
- target/surefire-reports/TEST-edu.hm.hafner.coverage.MutationTest.xml: TESTS: 3
- target/surefire-reports/TEST-edu.hm.hafner.coverage.NodeTest.xml: TESTS: 43
- target/surefire-reports/TEST-edu.hm.hafner.coverage.PackageNodeTest.xml: TESTS: 9
- target/surefire-reports/TEST-edu.hm.hafner.coverage.PercentageTest.xml: TESTS: 7
- target/surefire-reports/TEST-edu.hm.hafner.coverage.SafeFractionTest.xml: TESTS: 6
- target/surefire-reports/TEST-edu.hm.hafner.coverage.TestCaseTest.xml: TESTS: 1
- target/surefire-reports/TEST-edu.hm.hafner.coverage.ValueTest.xml: TESTS: 6
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.CoberturaParserTest.xml: TESTS: 21
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.JacocoParserTest.xml: TESTS: 12
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.JunitParserTest.xml: TESTS: 13
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.MetricsParserTest.xml: TESTS: 3
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.NunitParserTest.xml: TESTS: 7
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.OpenCoverParserTest.xml: TESTS: 12
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.PitestParserTest.xml: TESTS: 7
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.TestCaseMappingTest.xml: TESTS: 1
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.VectorCastParserTest.xml: TESTS: 5
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.XunitParserTest.xml: TESTS: 6
- target/surefire-reports/TEST-edu.hm.hafner.coverage.registry.ParserRegistryTest.xml: TESTS: 2
-> Tests Total: TESTS: 293
-> Tests Total: TESTS: 293 tests
=> Tests: 293 tests passed
=> Tests: 293 tests passed
================================================================================
Processing 2 coverage configuration(s)
Code Coverage Configuration:
{
  "id" : "coverage",
  "name" : "Code Coverage",
  "icon" : "",
  "maxScore" : 0,
  "tools" : [ {
    "id" : "jacoco",
    "name" : "Line Coverage",
    "pattern" : "**/target/site/jacoco/jacoco.xml",
    "sourcePath" : "src/main/java",
    "metric" : "line",
    "displayName" : "Line Coverage"
  }, {
    "id" : "jacoco",
    "name" : "Branch Coverage",
    "pattern" : "**/target/site/jacoco/jacoco.xml",
    "sourcePath" : "src/main/java",
    "metric" : "branch",
    "displayName" : "Branch Coverage"
  } ],
  "coveredPercentageImpact" : 0,
  "missedPercentageImpact" : 0,
  "mutationCoverage" : false
}
Searching for Line Coverage results matching file name pattern **/target/site/jacoco/jacoco.xml
- target/site/jacoco/jacoco.xml: LINE: 96.26% (2215/2301)
-> Line Coverage Total: LINE: 96.26% (2215/2301)
=> Line Coverage: 96% (86 missed lines)
Searching for Branch Coverage results matching file name pattern **/target/site/jacoco/jacoco.xml
- target/site/jacoco/jacoco.xml: BRANCH: 91.96% (904/983)
-> Branch Coverage Total: BRANCH: 91.96% (904/983)
=> Branch Coverage: 92% (79 missed branches)
=> Code Coverage: 94% (165 missed items)
Mutation Coverage Configuration:
{
  "id" : "coverage",
  "name" : "Mutation Coverage",
  "icon" : "",
  "maxScore" : 0,
  "tools" : [ {
    "id" : "pit",
    "name" : "Mutation Coverage",
    "pattern" : "**/target/pit-reports/mutations.xml",
    "sourcePath" : "src/main/java",
    "metric" : "mutation",
    "displayName" : "Mutation Coverage"
  } ],
  "coveredPercentageImpact" : 0,
  "missedPercentageImpact" : 0,
  "mutationCoverage" : true
}
Searching for Mutation Coverage results matching file name pattern **/target/pit-reports/mutations.xml
- target/pit-reports/mutations.xml: MUTATION: 89.96% (1022/1136)
-> Mutation Coverage Total: MUTATION: 89.96% (1022/1136)
=> Mutation Coverage: 90% (114 survived mutations)
=> Mutation Coverage: 90% (114 survived mutations)
================================================================================
Processing 3 static analysis configuration(s)
Style Configuration:
{
  "id" : "style",
  "name" : "Style",
  "icon" : "",
  "maxScore" : 0,
  "tools" : [ {
    "id" : "checkstyle",
    "name" : "",
    "pattern" : "**/target/**checkstyle-result.xml",
    "sourcePath" : "",
    "metric" : "",
    "displayName" : "checkstyle"
  }, {
    "id" : "pmd",
    "name" : "",
    "pattern" : "**/target/**pmd.xml",
    "sourcePath" : "",
    "metric" : "",
    "displayName" : "pmd"
  } ],
  "errorImpact" : 0,
  "highImpact" : 0,
  "normalImpact" : 0,
  "lowImpact" : 0
}
Searching for CheckStyle results matching file name pattern **/target/**checkstyle-result.xml
- target/checkstyle-java/checkstyle-result.xml: 0 warnings
- target/checkstyle-tests/checkstyle-result.xml: 0 warnings
-> CheckStyle Total: 0 warnings
=> CheckStyle: No warnings
Searching for PMD results matching file name pattern **/target/**pmd.xml
================================================================================
================================================================================

Created by Quality Monitor v1.11.0 (#99404b7). More details are shown in the GitHub Checks Result.

Copy link

codecov bot commented Oct 27, 2024

Codecov Report

Attention: Patch coverage is 96.96970% with 1 line in your changes missing coverage. Please review.

Project coverage is 93.08%. Comparing base (0bcc7e9) to head (dfff943).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/main/java/edu/hm/hafner/coverage/Metric.java 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #130      +/-   ##
============================================
+ Coverage     93.04%   93.08%   +0.04%     
  Complexity      840      840              
============================================
  Files            28       28              
  Lines          2302     2301       -1     
  Branches        340      340              
============================================
  Hits           2142     2142              
  Misses           86       86              
+ Partials         74       73       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Partial score: 0/0

🚧 The grading has been aborted due to an error.

Exception

edu.hm.hafner.analysis.ParsingException: Input stream is not a PMD file.
	at edu.hm.hafner.analysis.parser.pmd.PmdParser.parseIssues(PmdParser.java:58)
	at edu.hm.hafner.analysis.parser.pmd.PmdParser.parse(PmdParser.java:32)
	at edu.hm.hafner.analysis.IssueParser.parseFile(IssueParser.java:69)
	at edu.hm.hafner.grading.FileSystemAnalysisReportFactory.create(FileSystemAnalysisReportFactory.java:32)
	at edu.hm.hafner.grading.AggregatedScore.gradeAnalysis(AggregatedScore.java:392)
	at edu.hm.hafner.grading.AutoGradingRunner.run(AutoGradingRunner.java:95)
	at edu.hm.hafner.grading.github.QualityMonitor.main(QualityMonitor.java:42)

Error Messages

Quality Monitor Errors:
An error occurred while grading
edu.hm.hafner.analysis.ParsingException: Input stream is not a PMD file.
	at edu.hm.hafner.analysis.parser.pmd.PmdParser.parseIssues(PmdParser.java:58)
	at edu.hm.hafner.analysis.parser.pmd.PmdParser.parse(PmdParser.java:32)
	at edu.hm.hafner.analysis.IssueParser.parseFile(IssueParser.java:69)
	at edu.hm.hafner.grading.FileSystemAnalysisReportFactory.create(FileSystemAnalysisReportFactory.java:32)
	at edu.hm.hafner.grading.AggregatedScore.gradeAnalysis(AggregatedScore.java:392)
	at edu.hm.hafner.grading.AutoGradingRunner.run(AutoGradingRunner.java:95)
	at edu.hm.hafner.grading.github.QualityMonitor.main(QualityMonitor.java:42)

Information Messages

--------------------------------------------------------------------------------
                    Start Quality Monitor 1.11.0 (#99404b7)                     
--------------------------------------------------------------------------------
Obtaining configuration from environment variable CONFIG
================================================================================
Processing 1 test configuration(s)
Tests Configuration:
{
  "id" : "tests",
  "name" : "Tests",
  "icon" : "",
  "maxScore" : 0,
  "tools" : [ {
    "id" : "test",
    "name" : "Tests",
    "pattern" : "**/target/*-reports/TEST*.xml",
    "sourcePath" : "",
    "metric" : "",
    "displayName" : "Tests"
  } ],
  "failureImpact" : 0,
  "passedImpact" : 0,
  "skippedImpact" : 0
}
Searching for Tests results matching file name pattern **/target/*-reports/TEST*.xml
- target/surefire-reports/TEST-edu.hm.hafner.ArchitectureTest.xml: TESTS: 9
- target/surefire-reports/TEST-edu.hm.hafner.PackageArchitectureTest.xml: TESTS: 1
- target/surefire-reports/TEST-edu.hm.hafner.coverage.ClassNodeTest.xml: TESTS: 7
- target/surefire-reports/TEST-edu.hm.hafner.coverage.ContainerNodeTest.xml: TESTS: 5
- target/surefire-reports/TEST-edu.hm.hafner.coverage.CoverageParserTest.xml: TESTS: 1
- target/surefire-reports/TEST-edu.hm.hafner.coverage.CoverageTest.xml: TESTS: 33
- target/surefire-reports/TEST-edu.hm.hafner.coverage.FileNodeTest.xml: TESTS: 20
- target/surefire-reports/TEST-edu.hm.hafner.coverage.FractionValueTest.xml: TESTS: 3
- target/surefire-reports/TEST-edu.hm.hafner.coverage.MethodNodeTest.xml: TESTS: 11
- target/surefire-reports/TEST-edu.hm.hafner.coverage.MetricTest.xml: TESTS: 30
- target/surefire-reports/TEST-edu.hm.hafner.coverage.ModuleNodeTest.xml: TESTS: 9
- target/surefire-reports/TEST-edu.hm.hafner.coverage.MutationTest.xml: TESTS: 3
- target/surefire-reports/TEST-edu.hm.hafner.coverage.NodeTest.xml: TESTS: 43
- target/surefire-reports/TEST-edu.hm.hafner.coverage.PackageNodeTest.xml: TESTS: 9
- target/surefire-reports/TEST-edu.hm.hafner.coverage.PercentageTest.xml: TESTS: 7
- target/surefire-reports/TEST-edu.hm.hafner.coverage.SafeFractionTest.xml: TESTS: 6
- target/surefire-reports/TEST-edu.hm.hafner.coverage.TestCaseTest.xml: TESTS: 1
- target/surefire-reports/TEST-edu.hm.hafner.coverage.ValueTest.xml: TESTS: 6
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.CoberturaParserTest.xml: TESTS: 21
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.JacocoParserTest.xml: TESTS: 12
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.JunitParserTest.xml: TESTS: 13
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.MetricsParserTest.xml: TESTS: 3
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.NunitParserTest.xml: TESTS: 7
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.OpenCoverParserTest.xml: TESTS: 12
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.PitestParserTest.xml: TESTS: 7
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.TestCaseMappingTest.xml: TESTS: 1
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.VectorCastParserTest.xml: TESTS: 5
- target/surefire-reports/TEST-edu.hm.hafner.coverage.parser.XunitParserTest.xml: TESTS: 6
- target/surefire-reports/TEST-edu.hm.hafner.coverage.registry.ParserRegistryTest.xml: TESTS: 2
-> Tests Total: TESTS: 293
-> Tests Total: TESTS: 293 tests
=> Tests: 293 tests passed
=> Tests: 293 tests passed
================================================================================
Processing 2 coverage configuration(s)
Code Coverage Configuration:
{
  "id" : "coverage",
  "name" : "Code Coverage",
  "icon" : "",
  "maxScore" : 0,
  "tools" : [ {
    "id" : "jacoco",
    "name" : "Line Coverage",
    "pattern" : "**/target/site/jacoco/jacoco.xml",
    "sourcePath" : "src/main/java",
    "metric" : "line",
    "displayName" : "Line Coverage"
  }, {
    "id" : "jacoco",
    "name" : "Branch Coverage",
    "pattern" : "**/target/site/jacoco/jacoco.xml",
    "sourcePath" : "src/main/java",
    "metric" : "branch",
    "displayName" : "Branch Coverage"
  } ],
  "coveredPercentageImpact" : 0,
  "missedPercentageImpact" : 0,
  "mutationCoverage" : false
}
Searching for Line Coverage results matching file name pattern **/target/site/jacoco/jacoco.xml
- target/site/jacoco/jacoco.xml: LINE: 96.26% (2215/2301)
-> Line Coverage Total: LINE: 96.26% (2215/2301)
=> Line Coverage: 96% (86 missed lines)
Searching for Branch Coverage results matching file name pattern **/target/site/jacoco/jacoco.xml
- target/site/jacoco/jacoco.xml: BRANCH: 91.96% (904/983)
-> Branch Coverage Total: BRANCH: 91.96% (904/983)
=> Branch Coverage: 92% (79 missed branches)
=> Code Coverage: 94% (165 missed items)
Mutation Coverage Configuration:
{
  "id" : "coverage",
  "name" : "Mutation Coverage",
  "icon" : "",
  "maxScore" : 0,
  "tools" : [ {
    "id" : "pit",
    "name" : "Mutation Coverage",
    "pattern" : "**/target/pit-reports/mutations.xml",
    "sourcePath" : "src/main/java",
    "metric" : "mutation",
    "displayName" : "Mutation Coverage"
  } ],
  "coveredPercentageImpact" : 0,
  "missedPercentageImpact" : 0,
  "mutationCoverage" : true
}
Searching for Mutation Coverage results matching file name pattern **/target/pit-reports/mutations.xml
- target/pit-reports/mutations.xml: MUTATION: 89.96% (1022/1136)
-> Mutation Coverage Total: MUTATION: 89.96% (1022/1136)
=> Mutation Coverage: 90% (114 survived mutations)
=> Mutation Coverage: 90% (114 survived mutations)
================================================================================
Processing 3 static analysis configuration(s)
Style Configuration:
{
  "id" : "style",
  "name" : "Style",
  "icon" : "",
  "maxScore" : 0,
  "tools" : [ {
    "id" : "checkstyle",
    "name" : "",
    "pattern" : "**/target/**checkstyle-result.xml",
    "sourcePath" : "",
    "metric" : "",
    "displayName" : "checkstyle"
  }, {
    "id" : "pmd",
    "name" : "",
    "pattern" : "**/target/**pmd.xml",
    "sourcePath" : "",
    "metric" : "",
    "displayName" : "pmd"
  } ],
  "errorImpact" : 0,
  "highImpact" : 0,
  "normalImpact" : 0,
  "lowImpact" : 0
}
Searching for CheckStyle results matching file name pattern **/target/**checkstyle-result.xml
- target/checkstyle-java/checkstyle-result.xml: 0 warnings
- target/checkstyle-tests/checkstyle-result.xml: 0 warnings
-> CheckStyle Total: 0 warnings
=> CheckStyle: No warnings
Searching for PMD results matching file name pattern **/target/**pmd.xml
================================================================================
================================================================================

Created by Quality Monitor v1.11.0 (#99404b7). More details are shown in the GitHub Checks Result.

@uhafner uhafner merged commit 07c3a30 into main Oct 27, 2024
33 checks passed
@uhafner uhafner deleted the java17 branch October 27, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking Changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant