-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIR-32120: removed redundant throws declarations and fixed some warni…
…ngs (#415)
- Loading branch information
Alexander Radzin
authored
May 26, 2024
1 parent
38312cd
commit e409bee
Showing
17 changed files
with
462 additions
and
575 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.firebolt.jdbc; | ||
|
||
import java.sql.SQLException; | ||
import java.sql.Wrapper; | ||
|
||
public interface GenericWrapper extends Wrapper { | ||
@Override | ||
default <T> T unwrap(@SuppressWarnings("SpellCheckingInspection") Class<T> iface) throws SQLException { | ||
if (iface.isAssignableFrom(getClass())) { | ||
return iface.cast(this); | ||
} | ||
throw new SQLException("Cannot unwrap to " + iface.getName()); | ||
} | ||
|
||
@Override | ||
default boolean isWrapperFor(@SuppressWarnings("SpellCheckingInspection") Class<?> iface) { | ||
return iface.isAssignableFrom(getClass()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.