You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "sk0x50 (via GitHub)" <gi...@apache.org> on 2023/07/14 08:46:44 UTC
[GitHub] [ignite-3] sk0x50 commented on a diff in pull request #2300: IGNITE-19928 Change error and group codes from int to short
sk0x50 commented on code in PR #2300:
URL: https://github.com/apache/ignite-3/pull/2300#discussion_r1263473816
##########
modules/core/src/main/java/org/apache/ignite/lang/ErrorGroup.java:
##########
@@ -86,14 +87,9 @@ public int code() {
*
* @param errorCode Error code to be registered.
* @return Full error code which includes group code and specific error code.
- * @throws IllegalArgumentException If the given {@code errorCode} is already registered
- * or {@code errorCode} is greater than 0xFFFF or less than or equal to 0.
+ * @throws IllegalArgumentException If the given {@code errorCode} is already registered.
*/
- public int registerErrorCode(int errorCode) {
- if (errorCode <= 0 || errorCode > 0xFFFF) {
- throw new IllegalArgumentException("Error code should be greater than 0 and less than or equal to 0xFFFF");
- }
-
+ public int registerErrorCode(short errorCode) {
Review Comment:
You are right, the parameter names should be the same.
I decided to remove the `isRegistered` method just because it is not used anywhere.
--
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@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org