+ if ("unbounded".equals(uriValue)) {
+ return null;
+ }
+
+ final int value;
+ try {
+ value = Integer.parseUnsignedInt(uriValue, 10);
+ } catch (NumberFormatException e) {
+ throw new IllegalArgumentException(
+ "The depth parameter must be \"unbounded\" or an integer between 1 and 65535. \""
+ + uriValue + "\" is not a valid integer", e);
+ }
+ try {
+ return of(value);
+ } catch (IllegalArgumentException e) {
+ throw new IllegalArgumentException(
+ "The depth parameter must be \"unbounded\" or an integer between 1 and 65535. "
+ + e.getMessage(), e);
+ }