You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/05/06 14:02:04 UTC
[GitHub] [shardingsphere] yx9o opened a new pull request, #17397: Rename SchemaRequiredBackendHandler to DatabaseRequiredBackendHandler.
yx9o opened a new pull request, #17397:
URL: https://github.com/apache/shardingsphere/pull/17397
Rename `SchemaRequiredBackendHandler` to `DatabaseRequiredBackendHandler`.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] RaigorJiang merged pull request #17397: Rename SchemaRequiredBackendHandler to DatabaseRequiredBackendHandler.
Posted by GitBox <gi...@apache.org>.
RaigorJiang merged PR #17397:
URL: https://github.com/apache/shardingsphere/pull/17397
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] RaigorJiang commented on a diff in pull request #17397: Rename SchemaRequiredBackendHandler to DatabaseRequiredBackendHandler.
Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on code in PR #17397:
URL: https://github.com/apache/shardingsphere/pull/17397#discussion_r866874828
##########
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/DatabaseRequiredBackendHandler.java:
##########
@@ -58,8 +59,8 @@ private String getDatabaseName(final ConnectionSession connectionSession, final
return schemaFromSQL.isPresent() ? schemaFromSQL.get().getIdentifier().getValue() : connectionSession.getDatabaseName();
}
- private void checkDatabase(final String databaseName) {
- if (null == databaseName) {
+ private void checkDatabaseName(final String databaseName) {
+ if (Strings.isNullOrEmpty(databaseName)) {
Review Comment:
Hi @yx9o
Will `databaseName` be an empty string?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] RaigorJiang commented on pull request #17397: Rename SchemaRequiredBackendHandler to DatabaseRequiredBackendHandler.
Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on PR #17397:
URL: https://github.com/apache/shardingsphere/pull/17397#issuecomment-1119695000
Thank you @yx9o .
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] yx9o commented on a diff in pull request #17397: Rename SchemaRequiredBackendHandler to DatabaseRequiredBackendHandler.
Posted by GitBox <gi...@apache.org>.
yx9o commented on code in PR #17397:
URL: https://github.com/apache/shardingsphere/pull/17397#discussion_r866892113
##########
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/DatabaseRequiredBackendHandler.java:
##########
@@ -58,8 +59,8 @@ private String getDatabaseName(final ConnectionSession connectionSession, final
return schemaFromSQL.isPresent() ? schemaFromSQL.get().getIdentifier().getValue() : connectionSession.getDatabaseName();
}
- private void checkDatabase(final String databaseName) {
- if (null == databaseName) {
+ private void checkDatabaseName(final String databaseName) {
+ if (Strings.isNullOrEmpty(databaseName)) {
Review Comment:
ok
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] RaigorJiang commented on a diff in pull request #17397: Rename SchemaRequiredBackendHandler to DatabaseRequiredBackendHandler.
Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on code in PR #17397:
URL: https://github.com/apache/shardingsphere/pull/17397#discussion_r866889513
##########
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/DatabaseRequiredBackendHandler.java:
##########
@@ -58,8 +59,8 @@ private String getDatabaseName(final ConnectionSession connectionSession, final
return schemaFromSQL.isPresent() ? schemaFromSQL.get().getIdentifier().getValue() : connectionSession.getDatabaseName();
}
- private void checkDatabase(final String databaseName) {
- if (null == databaseName) {
+ private void checkDatabaseName(final String databaseName) {
+ if (Strings.isNullOrEmpty(databaseName)) {
Review Comment:
If there is no empty string, just checking for null is enough, why introduce strings?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] yx9o commented on a diff in pull request #17397: Rename SchemaRequiredBackendHandler to DatabaseRequiredBackendHandler.
Posted by GitBox <gi...@apache.org>.
yx9o commented on code in PR #17397:
URL: https://github.com/apache/shardingsphere/pull/17397#discussion_r866887192
##########
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/DatabaseRequiredBackendHandler.java:
##########
@@ -58,8 +59,8 @@ private String getDatabaseName(final ConnectionSession connectionSession, final
return schemaFromSQL.isPresent() ? schemaFromSQL.get().getIdentifier().getValue() : connectionSession.getDatabaseName();
}
- private void checkDatabase(final String databaseName) {
- if (null == databaseName) {
+ private void checkDatabaseName(final String databaseName) {
+ if (Strings.isNullOrEmpty(databaseName)) {
Review Comment:
From the point of view of assignment, there will be no empty string, there is `null`.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org