Some refactorings by thetric · Pull Request #393 · jython/jython · GitHub
Skip to content

Some refactorings#393

Open
thetric wants to merge 26 commits intojython:masterfrom
thetric:some-refactorings
Open

Some refactorings#393
thetric wants to merge 26 commits intojython:masterfrom
thetric:some-refactorings

Conversation

@thetric
Copy link
Copy Markdown
Contributor

@thetric thetric commented Aug 4, 2025

These are mostly automated refactorings, best review each commit

@Stewori
Copy link
Copy Markdown
Member

Stewori commented Aug 4, 2025

@thetric
Copy link
Copy Markdown
Contributor Author

thetric commented Aug 4, 2025

Every change should be compatible with Java 8. This can be verified by either compling with Java 8 or using the --release 8 javac flag in Java 9 or higher.

Yeah, I might have gone a bit too far 😅 I am open to drop some unnecessary commits

@Stewori
Copy link
Copy Markdown
Member

Stewori commented Aug 9, 2025

Looks like test_concat and test_random are failing unexpectedly. Ideas?

@thetric
Copy link
Copy Markdown
Contributor Author

thetric commented Aug 9, 2025

I guess the test_random is failing because of the switch vom java.util.Random to java.security.SecureRandom?

@thetric
Copy link
Copy Markdown
Contributor Author

thetric commented Aug 9, 2025

The concat test seems to fail due to a buggy refactoring

@Stewori
Copy link
Copy Markdown
Member

Stewori commented Aug 9, 2025

I guess the test_random is failing because of the switch vom java.util.Random to java.security.SecureRandom?

Please make the switch to SecureRandom a separate PR:

  • the test failure indicates it might be more than a refactoring
  • it relieves this PR (wich is already inconveniently big) by one test failure
  • the decision about that switch and handling the test failure would be disentangled from this PR

@thetric thetric force-pushed the some-refactorings branch 2 times, most recently from df1c236 to a4f4316 Compare August 10, 2025 08:14
@thetric
Copy link
Copy Markdown
Contributor Author

thetric commented Aug 10, 2025

I removed some of the more stylistic refactorings and the switch to SecureRandom. Now the diff of the changeset is about half as big

@thetric
Copy link
Copy Markdown
Contributor Author

thetric commented Aug 11, 2025

Ah, the test test_fileutil_wrap_outputstream_default_textmode fails because setting the system property line.separator in

old_linesep = System.setProperty("line.separator", "\r\n")
now has no effect

@Stewori
Copy link
Copy Markdown
Member

Stewori commented Aug 12, 2025

@thetric thetric force-pushed the some-refactorings branch from a4f4316 to 7353b2d Compare August 15, 2025 18:00
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.

2 participants