IllegalArgumentException - if the port parameter is outside the specified range of valid port values.
如果端口号超出指定的有效端口值范围时抛出。
IllegalArgumentException - if some aspect of the specified element prevents it from being added to this list.
如果指定元素的某些方面不允许它加入当前列表则抛出。
IllegalArgumentException - some aspect of an element of the specified collection prevents it from being added to this collection.
如果指定集合的某个元素的某些方面不允许它加入当前集合则抛出。
Therefore, you'll need to check for upper and lower bounds, and probably include an IllegalArgumentException if an invalid value appears.
因此,您需要检测上界和下界,在出现无效值的时候,可能还要包含一个IllegalArgumentException。
If the setter for a read-write property throws an exception (such as IllegalArgumentException), JMX reports the exception back to the client.
如果读写属性的setter抛出异常(例如IllegalArgumentException),JMX就把异常报告给客户机。
You should also check the other side of the boundary, -1, to verify that you get the expected IllegalArgumentException, rather than an integer.
还应该检查边界的另一边- 1,以验证可以得到期望的IllegalArgumentException,而不是一个整数。
You should also check the other side of the boundary, -1, to verify that you get the expected IllegalArgumentException, rather than an integer.
还应该检查边界的另一边- 1,以验证可以得到期望的IllegalArgumentException,而不是一个整数。
应用推荐