alex-plekhanov commented on code in PR #10230:
URL: https://github.com/apache/ignite/pull/10230#discussion_r964617045
##########
modules/core/src/main/java/org/apache/ignite/configuration/ThinClientConfiguration.java:
##########
@@ -103,22 +112,45 @@ public ThinClientConfiguration
setMaxActiveComputeTasksPerConnection(int maxActi
/**
* @return If {@code true} sends a server exception stack to the client
side.
+ * @deprecated please now use new method
getServerExceptionStackTraceToClient().
Review Comment:
`@deprecated Use {@link #getServerExceptionStackTraceToClient} instead.`
##########
modules/core/src/main/java/org/apache/ignite/configuration/ThinClientConfiguration.java:
##########
@@ -103,22 +112,45 @@ public ThinClientConfiguration
setMaxActiveComputeTasksPerConnection(int maxActi
/**
* @return If {@code true} sends a server exception stack to the client
side.
+ * @deprecated please now use new method
getServerExceptionStackTraceToClient().
*/
+ @Deprecated
public boolean sendServerExceptionStackTraceToClient() {
return sendServerExcStackTraceToClient;
}
/**
* @param sendServerExcStackTraceToClient If {@code true} sends a server
exception stack to the client side.
* @return {@code this} for chaining.
+ * @deprecated please now use new method
setServerExceptionStackTraceToClient().
*/
+ @Deprecated
public ThinClientConfiguration
sendServerExceptionStackTraceToClient(boolean sendServerExcStackTraceToClient) {
this.sendServerExcStackTraceToClient = sendServerExcStackTraceToClient;
return this;
}
- /** {@inheritDoc} */
+ /**
+ * @return If {@code true} gets a server exception stack that is to be
sent to the client side.
+ */
+ public boolean getServerExceptionStackTraceToClient() {
+ return serverExcStackTraceToClient;
+ }
+
+ /**
+ * @param serverExcStackTraceToClient if {@code true} sets a server
exception stack that is to be sent to the client side.
+ * @return {@code this} for chaining.
+ */
+ public ThinClientConfiguration
setServerExceptionStackTraceToClient(boolean serverExcStackTraceToClient) {
Review Comment:
Is not clear from the method's name what exactly this method set (javadoc
also confusing). How about `setServerToClientExceptionStackTraceSending(boolean
sendStackTrace)`?
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/ClientListenerProcessor.java:
##########
@@ -571,7 +571,7 @@ public boolean sendServerExceptionStackTraceToClient() {
Boolean send = distrThinCfg.sendServerExceptionStackTraceToClient();
return send == null ?
-
ctx.config().getClientConnectorConfiguration().getThinClientConfiguration().sendServerExceptionStackTraceToClient()
: send;
+
ctx.config().getClientConnectorConfiguration().getThinClientConfiguration().sendServerExceptionStackTraceToClient()
: send;
Review Comment:
Looks like redundant change
##########
modules/core/src/main/java/org/apache/ignite/configuration/ThinClientConfiguration.java:
##########
@@ -103,22 +112,45 @@ public ThinClientConfiguration
setMaxActiveComputeTasksPerConnection(int maxActi
/**
* @return If {@code true} sends a server exception stack to the client
side.
+ * @deprecated please now use new method
getServerExceptionStackTraceToClient().
*/
+ @Deprecated
public boolean sendServerExceptionStackTraceToClient() {
return sendServerExcStackTraceToClient;
}
/**
* @param sendServerExcStackTraceToClient If {@code true} sends a server
exception stack to the client side.
* @return {@code this} for chaining.
+ * @deprecated please now use new method
setServerExceptionStackTraceToClient().
Review Comment:
`@deprecated Use {@link #setServerExceptionStackTraceToClient} instead.`
##########
modules/core/src/main/java/org/apache/ignite/configuration/ThinClientConfiguration.java:
##########
@@ -103,22 +112,45 @@ public ThinClientConfiguration
setMaxActiveComputeTasksPerConnection(int maxActi
/**
* @return If {@code true} sends a server exception stack to the client
side.
+ * @deprecated please now use new method
getServerExceptionStackTraceToClient().
*/
+ @Deprecated
public boolean sendServerExceptionStackTraceToClient() {
return sendServerExcStackTraceToClient;
}
/**
* @param sendServerExcStackTraceToClient If {@code true} sends a server
exception stack to the client side.
* @return {@code this} for chaining.
+ * @deprecated please now use new method
setServerExceptionStackTraceToClient().
*/
+ @Deprecated
public ThinClientConfiguration
sendServerExceptionStackTraceToClient(boolean sendServerExcStackTraceToClient) {
this.sendServerExcStackTraceToClient = sendServerExcStackTraceToClient;
return this;
}
- /** {@inheritDoc} */
+ /**
+ * @return If {@code true} gets a server exception stack that is to be
sent to the client side.
+ */
+ public boolean getServerExceptionStackTraceToClient() {
+ return serverExcStackTraceToClient;
+ }
+
+ /**
+ * @param serverExcStackTraceToClient if {@code true} sets a server
exception stack that is to be sent to the client side.
+ * @return {@code this} for chaining.
+ */
+ public ThinClientConfiguration
setServerExceptionStackTraceToClient(boolean serverExcStackTraceToClient) {
+ this.serverExcStackTraceToClient = serverExcStackTraceToClient;
+
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
Review Comment:
Redundant change, let's keep one-line javadoc.
##########
modules/core/src/main/java/org/apache/ignite/configuration/ThinClientConfiguration.java:
##########
@@ -37,9 +37,17 @@ public class ThinClientConfiguration {
/** Active compute tasks per connection limit. */
private int maxActiveComputeTasksPerConn =
DFLT_MAX_ACTIVE_COMPUTE_TASKS_PER_CONNECTION;
- /** If {@code true} sends a server exception stack trace to the client
side. */
+ /**
+ * @see new field serverExcStackTraceToClient.
+ * If {@code true} sends a server exception stack trace to the client side.
+ * @deprecated please now use new field serverExcStackTraceToClientbecause.
+ */
+ @Deprecated
private boolean sendServerExcStackTraceToClient;
+ /** If {@code true} a server exception stack trace is sent to the client
side. */
+ private boolean serverExcStackTraceToClient;
Review Comment:
Why do we need the new field? Why can't we create setter and getter over the
old one? Currently this new field is not used inside Ignite, except getter and
setter, which are also not used. So pull-request is effectively no-op. There
should be some tests added to avoid such errors.
##########
modules/core/src/main/java/org/apache/ignite/configuration/ThinClientConfiguration.java:
##########
@@ -48,10 +56,11 @@ public ThinClientConfiguration() {
}
/**
- * Creates thin-client configuration by copying all properties from given
configuration.
- *
* @param cfg Configuration to copy.
+ * Creates thin-client configuration by copying all properties from given
configuration.
+ * @deprecated
*/
+ @Deprecated
Review Comment:
Why this constructor was deprecated?
--
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]