raveendra11 opened a new pull request, #7295: URL: https://github.com/apache/gravitino/pull/7295
[#7284] refactor: remove unneeded throws declarations ### What changes were proposed in this pull request? This PR removes unnecessary `throws` declarations from several methods where the declared exceptions cannot actually be thrown. The changes affect: 1. `JdbcTableOperations.java`: Removed `throws SQLException` from `getTablePartitioning()` as it doesn't throw SQLException 2. `BaseGVFSOperations.java`: Removed `throws FilesetPathNotFoundException` from `createFilesetLocationIfNeed()` as it doesn't throw this exception 3. `IsolatedClassLoader.java`: Removed `throws Exception` from `classLoader()` as it doesn't throw checked exceptions 4. `KerberosServerUtils.java`: Simplified exception declarations in `getDefaultRealm()` 5. `CatalogRegister.java`: Removed `throws Exception` from `generateDropCatalogCommand()` as it doesn't throw checked exceptions ### Why are the changes needed? These changes are needed because: 1. Having unnecessary `throws` declarations is misleading and affects code readability 2. It follows better coding practices to only declare exceptions that can actually be thrown 3. It makes the API contracts more accurate Fix: #7284 ### Does this PR introduce _any_ user-facing change? No, this PR only removes exception declarations that weren't being used. The actual behavior of the methods remains unchanged. ### How was this patch tested? The changes were verified by: 1. Reviewing the method implementations to confirm they don't throw the declared exceptions 3. Checking that the code compiles successfully without the removed declarations -- 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]
