Skip to content

some cleanup #840

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

winfriedgerlach
Copy link

fixed lots of small but minor issues, hope you find this helpful!

@@ -124,7 +124,6 @@ local.properties
.factorypath
.project
.settings
.springBeans
Copy link
Author

Choose a reason for hiding this comment

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

duplicate of line 121

@robogary
Copy link

This Pull Request has failed the formatting check

Please run mvn spotless:apply or mvn clean install -DskipTests to fix the formatting issues.

You can automate this auto-formatting process to execute on the git pre-push hook, by installing pre-commit and then calling pre-commit install --hook-type pre-push. This will cause formatting to run automatically whenever you push.

@jkiddo
Copy link
Collaborator

jkiddo commented Jul 10, 2025

@winfriedgerlach - please run mvn spotless:apply to fix the formatting violations.

@jkiddo
Copy link
Collaborator

jkiddo commented Jul 10, 2025

Besides that, LGTM

@winfriedgerlach
Copy link
Author

winfriedgerlach commented Jul 11, 2025

hey @jkiddo , sorry, fixed now! I ran mvn spotless:apply and pushed the changes

@robogary
Copy link

Formatting check succeeded!

@jkiddo
Copy link
Collaborator

jkiddo commented Aug 1, 2025

Looks good to me - I'd like a second set of 👀 on it as well

Copy link
Contributor

@Copilot Copilot AI left a 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 focuses on cleaning up code quality issues across the codebase by standardizing syntax, fixing spelling errors, and applying modern Java patterns. The changes improve maintainability and consistency without altering functionality.

  • Updated variable declarations from var to let in JavaScript and deprecated Java patterns to modern alternatives
  • Corrected numerous spelling and grammatical errors in comments, documentation, and configuration files
  • Applied modern Java language features like pattern matching with instanceof and text blocks

Reviewed Changes

Copilot reviewed 32 out of 33 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/test/smoketest/plain_server.http Updated variable declarations from var to let
src/test/smoketest/SMOKE_TEST.md Fixed spelling errors in documentation
src/test/resources/application.yaml Corrected comment syntax and spelling errors
src/test/java/some/custom/pkg1/CustomInterceptorPojo.java Applied pattern matching with instanceof
src/test/java/some/custom/pkg1/CustomInterceptorBean.java Applied pattern matching with instanceof
src/test/java/ca/uhn/fhir/jpa/starter/SocketImplementation.java Removed printStackTrace call and improved logging
src/test/java/ca/uhn/fhir/jpa/starter/ParallelUpdatesVersionConflictTest.java Modernized lambda expressions and removed unused imports
src/test/java/ca/uhn/fhir/jpa/starter/MeasureEvaluationConfig.java Removed unused imports
src/test/java/ca/uhn/fhir/jpa/starter/IServerSupport.java Replaced deprecated Charsets with StandardCharsets
src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerR4IT.java Replaced string concatenation with text blocks and improved assertions
src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerR4BIT.java Replaced string concatenation with text blocks
src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerDstu3IT.java Removed unnecessary blank lines
src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerDbpmR5IT.java Changed class visibility modifier
src/test/java/ca/uhn/fhir/jpa/starter/ElasticsearchLastNR4IT.java Removed unused imports and changed class visibility
src/test/java/ca/uhn/fhir/jpa/starter/CdsHooksServletIT.java Replaced string concatenation with text blocks and fixed spelling
src/main/webapp/WEB-INF/templates/about.html Updated variable declarations and fixed punctuation
src/main/resources/cds.application.yaml Fixed spelling errors and comment syntax
src/main/resources/application.yaml Fixed spelling errors and comment syntax
src/main/java/ca/uhn/fhir/jpa/starter/util/EnvironmentHelper.java Applied pattern matching with instanceof
src/main/java/ca/uhn/fhir/jpa/starter/cr/PostInitProviderRegisterer.java Made inner class static
src/main/java/ca/uhn/fhir/jpa/starter/common/validation/RepositoryValidationInterceptorFactoryR5.java Fixed variable naming consistency
src/main/java/ca/uhn/fhir/jpa/starter/common/validation/RepositoryValidationInterceptorFactoryR4B.java Fixed variable naming consistency
src/main/java/ca/uhn/fhir/jpa/starter/common/validation/RepositoryValidationInterceptorFactoryR4.java Fixed variable naming consistency
src/main/java/ca/uhn/fhir/jpa/starter/common/StarterJpaConfig.java Improved logging and simplified Optional usage
src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java Modernized logging with parameterized messages
src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/ModuleConfigurationPrefetchSvc.java Simplified collection size check
src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/CdsHooksServlet.java Added @serial annotation
src/main/java/ca/uhn/fhir/jpa/starter/Application.java Fixed spelling in comment
pom.xml Fixed comment punctuation
charts/hapi-fhir-jpaserver/README.md.gotmpl Fixed spelling error
charts/hapi-fhir-jpaserver/README.md Fixed table formatting and spelling error
README.md Fixed spelling errors throughout documentation

@@ -31,7 +31,7 @@ spring:
allow-bean-definition-overriding: true
flyway:
enabled: false
check-location: false
fail-on-missing-locations: false
Copy link
Preview

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

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

The property name change from check-location to fail-on-missing-locations appears to be changing the Spring Flyway configuration property. Verify that this property name is correct for the version of Spring Boot being used, as this could cause configuration to be ignored.

Suggested change
fail-on-missing-locations: false
check-location: false

Copilot uses AI. Check for mistakes.

Copy link
Author

Choose a reason for hiding this comment

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

AFAIU this is the non-deprecated replacement of "check-location"

Comment on lines 255 to 260
# or will be instantiated via reflection using a no-arg contructor; then registered with the server
#custom-interceptor-classes:

# comma-separated list of fully qualified provider classes.
# classes listed here will be fetched from the Spring context when combined with 'custom-bean-packages',
# or will be instantiated via reflection using an no-arg contructor; then registered with the server
# or will be instantiated via reflection using a no-arg contructor; then registered with the server
Copy link
Preview

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

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

The word 'contructor' should be spelled 'constructor'.

Copilot uses AI. Check for mistakes.

Copy link
Author

Choose a reason for hiding this comment

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

fixed

#custom-interceptor-classes:

# comma-separated list of fully qualified provider classes.
# classes listed here will be fetched from the Spring context when combined with 'custom-bean-packages',
# or will be instantiated via reflection using an no-arg contructor; then registered with the server
# or will be instantiated via reflection using a no-arg contructor; then registered with the server
Copy link
Preview

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

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

The word 'contructor' should be spelled 'constructor'.

Copilot uses AI. Check for mistakes.

Copy link
Author

Choose a reason for hiding this comment

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

fixed

@@ -269,12 +269,12 @@ hapi:

# comma-separated list of fully qualified interceptor classes.
# classes listed here will be fetched from the Spring context when combined with 'custom-bean-packages',
# or will be instantiated via reflection using an no-arg contructor; then registered with the server
# or will be instantiated via reflection using a no-arg contructor; then registered with the server
Copy link
Preview

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

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

The word 'contructor' should be spelled 'constructor'.

Suggested change
# or will be instantiated via reflection using a no-arg contructor; then registered with the server
# or will be instantiated via reflection using a no-arg constructor; then registered with the server

Copilot uses AI. Check for mistakes.

Copy link
Author

Choose a reason for hiding this comment

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

fixed

#custom-interceptor-classes:

# comma-separated list of fully qualified provider classes.
# classes listed here will be fetched from the Spring context when combined with 'custom-bean-packages',
# or will be instantiated via reflection using an no-arg contructor; then registered with the server
# or will be instantiated via reflection using a no-arg contructor; then registered with the server
Copy link
Preview

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

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

The word 'contructor' should be spelled 'constructor'.

Copilot uses AI. Check for mistakes.

Copy link
Author

Choose a reason for hiding this comment

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

fixed

@winfriedgerlach
Copy link
Author

@jkiddo @patrick-werner fixed spelling mistakes found by CoPilot

@robogary
Copy link

Formatting check succeeded!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants