selenium icon indicating copy to clipboard operation
selenium copied to clipboard

[java] Point made as immutable

Open mk868 opened this issue 11 months ago • 2 comments

User description

Motivation and Context

Immutable objects help prevent unintended side effects - for example, using a mutable Point as a key in a HashMap<Point, Object> can lead to unexpected behavior if the point is modified after insertion.

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [x] I have read the contributing document.
  • [ ] My change requires a change to the documentation.
  • [x] I have updated the documentation accordingly.
  • [ ] I have added tests to cover my changes.
  • [ ] All new and existing tests passed.

PR Type

Enhancement


Description

  • Made the Point class immutable by declaring fields x and y as final.

  • Updated the class-level Javadoc to better describe its purpose.


Changes walkthrough 📝

Relevant files
Enhancement
Point.java
Made `Point` class immutable and updated documentation     

java/src/org/openqa/selenium/Point.java

  • Changed x and y fields to final for immutability.
  • Updated Javadoc to clarify the purpose of the Point class.
  • +3/-3     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • mk868 avatar Mar 25 '25 19:03 mk868

    Hello @greekcntr

    For dumping tables, DBeaver uses default mysqldump and all these collations were added by its Here is an example of SQL dump

    --
    -- Table structure for table `table1`
    --
    
    DROP TABLE IF EXISTS `table1`;
    /*!40101 SET @saved_cs_client     = @@character_set_client */;
    /*!50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE `table1` (
      `Column1` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
      `Column2` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
    /*!40101 SET character_set_client = @saved_cs_client */;
    

    IvanGorshechnikov avatar Apr 07 '25 21:04 IvanGorshechnikov

    It does not add the COLLATE statement to each column if the default COLLATE (utf8mb4_0900_ai_ci) is accepted when the table is created in dbeaver. So that does not explain it. It only does it it it is changed to something else.

    greekcntr avatar Apr 07 '25 23:04 greekcntr

    I create a table via the console, and after that do a dump. The behaviour is the same. As I said earlier DBeaver doesn't add any specific information

    IvanGorshechnikov avatar Jun 12 '25 13:06 IvanGorshechnikov

    It's been a while since there has been an update here. Please let me know if the issue is still present and provide additional information.

    arhayka avatar Jul 14 '25 17:07 arhayka