Skip to content

Conversation

@RalphSteinhagen
Copy link
Member

Three little commits (the suggestions is not to squash them):

  • bump dependencies for fastutil, jmh and oshi-core
    N.B the last being used in unit-tests only

  • refactored ClassFieldDescription and reflection Field handling

  • added command-line, property, and config-file compatible interface

The latter generically allows the default parameters/settings (i.e. stored as fields in domain-object classes) to be updated based other parameters based on a config-file (lowest priority), the VM environment variables, or the program's command-line arguments. The field parameter may be 'final' and/or 'static' with the exception of 'static final' primitives since these (especially Strings) are likely to be inlined by the JVM. However, unique Strings maybe changed also during run-time (e.g. blanking String that may contain plain-text passwords before behing hashed).

Comments, proposals and improvements are welcome.

N.B the last being used in unit-tests only
replaced most of the reflection handler and grouped relevant functions in one unit-tested class
@RalphSteinhagen
Copy link
Member Author

@wirew0rm sorry for force-pushing this ... JDK11/15 CI gave some JavaDoc warnings/errors in the second commit that I wanted to fix locally. Also fixed another time-out optimisation in one of the unit-tests that made the test unnecessary flaky. The core stayed the same though.

@wirew0rm wirew0rm temporarily deployed to configure coverage May 7, 2021 16:10 Inactive
Copy link
Member

@wirew0rm wirew0rm left a comment

Choose a reason for hiding this comment

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

Looks good +1.
I also removed the remaining getProperty() instances in the server-rest module, please have a look at these and merge if these are ok.

@RalphSteinhagen RalphSteinhagen marked this pull request as ready for review May 7, 2021 16:18
@wirew0rm wirew0rm force-pushed the addCommandLineInterface branch from 0c6c303 to f86fdcf Compare May 7, 2021 16:26
@wirew0rm wirew0rm had a problem deploying to configure coverage May 7, 2021 16:26 Failure
@wirew0rm wirew0rm had a problem deploying to configure coverage May 7, 2021 16:26 Failure
@wirew0rm wirew0rm force-pushed the addCommandLineInterface branch from f86fdcf to ec87a99 Compare May 7, 2021 16:40
@wirew0rm wirew0rm had a problem deploying to configure coverage May 7, 2021 16:40 Failure
@wirew0rm wirew0rm had a problem deploying to configure coverage May 7, 2021 16:40 Failure
Replaces the getProperty calls by a RestServerSettings class.
Also change the port used by the tests not to be the default port.
@wirew0rm wirew0rm force-pushed the addCommandLineInterface branch from ec87a99 to 5aafd09 Compare May 7, 2021 16:49
@wirew0rm wirew0rm had a problem deploying to configure coverage May 7, 2021 16:49 Failure
@wirew0rm wirew0rm had a problem deploying to configure coverage May 7, 2021 16:49 Failure
@wirew0rm wirew0rm merged commit 701ec35 into main May 7, 2021
@wirew0rm wirew0rm deleted the addCommandLineInterface branch May 7, 2021 16:55
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