nizhikov commented on code in PR #11507:
URL: https://github.com/apache/ignite/pull/11507#discussion_r1745226007


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcConnectionContext.java:
##########
@@ -153,17 +156,16 @@ public OdbcConnectionContext(GridKernalContext ctx, 
GridNioSession ses, GridSpin
         String user = null;
         String passwd = null;
 
-        NestedTxMode nestedTxMode = NestedTxMode.DEFAULT;
-
         if (ver.compareTo(VER_2_5_0) >= 0) {
             user = reader.readString();
             passwd = reader.readString();
         }
 
         if (ver.compareTo(VER_2_7_0) >= 0) {
-            byte nestedTxModeVal = reader.readByte();
+            byte nestedTxCode = reader.readByte();
 
-            nestedTxMode = NestedTxMode.fromByte(nestedTxModeVal);
+            if (nestedTxCode != 3)

Review Comment:
   Please, omit magic numbers and introduce self explaining constant.
   Can be minifed to 
   
   ```
   if (reader.readByte() != NESTED_TX_ERROR)
       throw new IgniteCheckedException("Nested transactions are not 
supported!");
   ```



-- 
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]

Reply via email to