Skip to content

New SystemProperties logging global changes #25569

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

Merged
merged 3 commits into from
Jun 22, 2025

Conversation

dmatej
Copy link
Contributor

@dmatej dmatej commented Jun 18, 2025

  • Also deleted unused GFSystem class
  • In several cases I have noticed that some values are set repeatedly or even to different values which can cause some fragility (ordering, race conditions, surprises, etc).
  • This solution is not global, affects just classes in this project, but even that is useful.
  • Java doesn't offer anything like this, it is just possible to print system properties using jcmd or inside JVM.

@dmatej dmatej added this to the 7.1.0 milestone Jun 18, 2025
@dmatej dmatej requested a review from a team June 18, 2025 17:09
@dmatej dmatej self-assigned this Jun 18, 2025
@dmatej dmatej added the enhancement New feature or request label Jun 18, 2025
@dmatej dmatej force-pushed the systempropertieslog branch from 342ee03 to be97644 Compare June 18, 2025 23:00
@dmatej dmatej marked this pull request as draft June 18, 2025 23:00
@dmatej dmatej force-pushed the systempropertieslog branch from be97644 to c0cf28a Compare June 20, 2025 22:04
dmatej added 3 commits June 21, 2025 00:08
- Also deleted unused GFSystem class

Signed-off-by: David Matějček <[email protected]>
@dmatej dmatej force-pushed the systempropertieslog branch 2 times, most recently from 63c02c8 to ef15edb Compare June 20, 2025 23:41
@@ -125,10 +126,10 @@ public DerbyControl(final String derbyCommand, final String derbyHost, final Str

// Do not set derby.system.home if derbyHome is empty
if (!isEmpty(derbyHome)) {
System.setProperty("derby.system.home", derbyHome);
setProperty("derby.system.home", derbyHome, true);
Copy link
Contributor

Choose a reason for hiding this comment

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

With all usages updated, could we have setProperty(String, String), that would default the 3rd parameter to true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to force decision if it should or should not overwrite existing value - which is quite important. Correctly no such events should ever happen, but it is not always true.

@dmatej dmatej marked this pull request as ready for review June 21, 2025 11:30
@dmatej dmatej requested a review from a team June 21, 2025 11:31
@arjantijms arjantijms merged commit 829926b into eclipse-ee4j:master Jun 22, 2025
5 checks passed
@arjantijms arjantijms deleted the systempropertieslog branch June 22, 2025 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants