Skip to content

Conversation

omursahin
Copy link
Collaborator

No description provided.

@omursahin omursahin requested a review from arcuri82 July 8, 2025 21:49
@@ -201,7 +201,7 @@ class RestTestCaseWriter : HttpWsTestCaseWriter {
override fun handleVerbEndpoint(baseUrlOfSut: String, _call: HttpWsAction, lines: Lines) {

val call = _call as RestCallAction
val verb = call.verb.name.lowercase(Locale.getDefault())
val verb = call.verb.name.lowercase(Locale.ENGLISH)
Copy link
Collaborator

Choose a reason for hiding this comment

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

looks like several places use Locale.getDefault(). can you fix all of the occurrencies in this PR? also, might be good to specify a setDefault in the main entry point (ie Main) to avoid possible issues in future

@omursahin omursahin requested a review from arcuri82 July 10, 2025 18:58
Copy link
Collaborator

@arcuri82 arcuri82 left a comment

Choose a reason for hiding this comment

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

hi @omursahin i think we should make sure we use Locale.ENGLISH and not getDefault() for a few reasons:

  1. setting locale as you did now in the core would not apply to driver (eg SutController)
  2. changing default locale on driver might impact the SUT
  3. future unit test cases might fail if main is not called first

we can still have a Locale.setDefault(Locale.ENGLISH) in Main as safety net, but I think all other cases should be explicit in Locale.ENGLISH

@omursahin omursahin requested a review from arcuri82 July 22, 2025 22:11
@@ -746,7 +746,7 @@ public final boolean extractSqlDbSchemaAndConstraints(){
fkMap.putIfAbsent(t.name, new ArrayList<>());
if (t.foreignKeys!=null && !t.foreignKeys.isEmpty()){
t.foreignKeys.forEach(f->{
fkMap.get(t.name).add(f.targetTable.toUpperCase(Locale.ENGLISH));
fkMap.get(t.name).add(f.targetTable.toUpperCase(Locale.getDefault()));
Copy link
Collaborator

Choose a reason for hiding this comment

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

can just remove the Locale.getDefault() in all these cases. ie, calling with no input is the same as calling with Locale.getDefault(). ie, simply remove all the Locale.ENGLISH, eg f.targetTable.toUpperCase()

@omursahin omursahin requested a review from arcuri82 July 24, 2025 08:49
@arcuri82 arcuri82 merged commit 2d82dc7 into master Jul 25, 2025
14 checks passed
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