Skip to content

Commit 0a53612

Browse files
committed
add async-utils class and deprecate to removal methods from number utils
1 parent 8f57a64 commit 0a53612

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.ss.rlib.common.util;
2+
3+
import org.jetbrains.annotations.NotNull;
4+
import org.jetbrains.annotations.Nullable;
5+
6+
/**
7+
* @author JavaSaBr
8+
*/
9+
public class AsyncUtils {
10+
11+
public static <T> @Nullable T skip(@NotNull Throwable throwable) {
12+
return null;
13+
}
14+
}

rlib-common/src/main/java/com/ss/rlib/common/util/NumberUtils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public final class NumberUtils {
1717
* @param bigEndian the big endian
1818
* @return the int
1919
*/
20-
@Deprecated
20+
@Deprecated(forRemoval = true)
2121
public static int bytesToInt(@NotNull byte[] array, int offset, boolean bigEndian) {
2222

2323
if (bigEndian) {
@@ -35,7 +35,7 @@ public static int bytesToInt(@NotNull byte[] array, int offset, boolean bigEndia
3535
* @param bigEndian the big endian
3636
* @return the long
3737
*/
38-
@Deprecated
38+
@Deprecated(forRemoval = true)
3939
public static long bytesToUInt(@NotNull byte[] array, int offset, boolean bigEndian) {
4040

4141
long value = 0;
@@ -58,7 +58,7 @@ public static long bytesToUInt(@NotNull byte[] array, int offset, boolean bigEnd
5858
* @param byte4 the byte 4
5959
* @return the int
6060
*/
61-
@Deprecated
61+
@Deprecated(forRemoval = true)
6262
public static int makeInt(byte byte1, byte byte2, byte byte3, byte byte4) {
6363
return (byte4 & 0xFF) << 24 | (byte3 & 0xFF) << 16 | (byte2 & 0xFF) << 8 | byte1 & 0xFF;
6464
}
@@ -69,7 +69,7 @@ public static int makeInt(byte byte1, byte byte2, byte byte3, byte byte4) {
6969
* @param bytes the bytes
7070
* @return the long
7171
*/
72-
@Deprecated
72+
@Deprecated(forRemoval = true)
7373
public static long makeLong(@NotNull byte[] bytes) {
7474
return ((long) bytes[7] & 0xFF) << 56 | ((long) bytes[6] & 0xFF) << 48 | ((long) bytes[5] & 0xFF) << 40 |
7575
((long) bytes[4] & 0xFF) << 32 | ((long) bytes[3] & 0xFF) << 24 | ((long) bytes[2] & 0xFF) << 16 |

0 commit comments

Comments
 (0)