-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix kotlin warnings in CDK core #37477
fix kotlin warnings in CDK core #37477
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @stephane-airbyte and the rest of your teammates on Graphite |
2b42c18
to
f703678
Compare
@@ -332,8 +332,10 @@ abstract class AbstractJdbcCompatibleSourceOperations<Datatype> : | |||
} | |||
} | |||
|
|||
// Note: I'm guessing this is an open function, since it doesn't do anything here, and doesn't | |||
// override anything either |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can answer that: all these methods should be open
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think they should be abstract. I really don't like optional methods. Battle for another day though
@@ -17,7 +17,7 @@ import org.slf4j.LoggerFactory | |||
/** Implementation of source operations with standard JDBC types. */ | |||
open class JdbcSourceOperations : | |||
AbstractJdbcCompatibleSourceOperations<JDBCType>(), SourceOperations<ResultSet, JDBCType> { | |||
protected fun safeGetJdbcType(columnTypeInt: Int): JDBCType { | |||
private fun safeGetJdbcType(columnTypeInt: Int): JDBCType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably needs to be open protected as well, but I'm less sure.
@@ -256,7 +251,7 @@ internal constructor( | |||
messageIterator: AutoCloseableIterator<AirbyteMessage>, | |||
recordCollector: Consumer<AirbyteMessage> | |||
) { | |||
messageIterator!!.airbyteStream.ifPresent { s: AirbyteStreamNameNamespacePair? -> | |||
messageIterator.airbyteStream.ifPresent { s: AirbyteStreamNameNamespacePair? -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s need not be nullable. Comment applies elsewhere also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will need another pass
e10a324
to
5fc346d
Compare
5fc346d
to
4d64c8f
Compare
just fixing kotlin warnings in CDK Interesting tidbit: Because of named parameters, it's important that a function override has the same parameter names as the overriden function. Hence some parameter renaming here. Also, variable name shadowing is reported as a warning
just fixing kotlin warnings in CDK
Interesting tidbit: Because of named parameters, it's important that a function override has the same parameter names as the overriden function. Hence some parameter renaming here.
Also, variable name shadowing is reported as a warning