We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78840c6 commit b9d08a1Copy full SHA for b9d08a1
1 file changed
src/main/java/org/unicitylabs/sdk/api/NetworkId.java
@@ -31,6 +31,10 @@ private NetworkId(short id) {
31
* @return NetworkId for the given identifier
32
*/
33
public static NetworkId fromId(short id) {
34
+ if (id <= 0) {
35
+ throw new IllegalArgumentException(
36
+ "Network identifier out of allowed 16-bit unsigned range: " + id + ".");
37
+ }
38
if (id == MAINNET.id) {
39
return MAINNET;
40
}
0 commit comments