nzw921rx opened a new pull request, #11023:
URL: https://github.com/apache/seatunnel/pull/11023

   ## Purpose of this pull request
   
   Related #11007  
   Depends on #11022
   
   1. Remove redundant `checkNotNull` in CDC ConfigFactory — already covered by 
`optionRule()` declarative validation
   2. Fix Oracle `checkNotNull(originUrl)` dead code that made `hostname+port` 
branch unreachable
   3. Fix `database-names` from `optional` to `required` in 
Oracle/Postgres/SqlServer — runtime unconditionally uses `databaseList.get(0)`, 
not providing it causes NPE
   
   ## Does this PR introduce _any_ user-facing change?
   
   Yes. Users of Oracle/Postgres/SqlServer CDC connectors who omit 
`database-names` will now receive a clear configuration validation error 
instead of a runtime NPE. This is a bug fix — there was no valid use case 
without `database-names` for these connectors.
   
   ## How was this patch tested?
   
   Unit tests in each connector's FactoryTest:
   
   - `OracleIncrementalSourceFactoryTest.testDatabaseNamesRequired` — verifies 
missing/empty rejected, valid accepted
   - `PostgresIncrementalSourceFactoryTest.testDatabaseNamesRequired` — same
   - `SqlServerIncrementalSourceFactoryTest.testDatabaseNamesRequired` — same
   
   Existing tests (numeric constraints, table-names notEmpty) continue to pass.
   
   ```bash
   ./mvnw test -pl 
seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql,seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle,seatunnel-connectors-v2/connector-cdc/connector-cdc-postgres,seatunnel-connectors-v2/connector-cdc/connector-cdc-sqlserver,seatunnel-connectors-v2/connector-cdc/connector-cdc-mongodb
 -Dtest="*FactoryTest" -DfailIfNoTests=false
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to