Skip to content

Commit

Permalink
Allow larger numbers for file descriptor names
Browse files Browse the repository at this point in the history
  • Loading branch information
vanitasvitae committed Nov 14, 2022
1 parent 1a381be commit 00ab68b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public interface EnvironmentVariableResolver {
public static final Date BEGINNING_OF_TIME = new Date(0);
public static final Date END_OF_TIME = new Date(8640000000000000L);

public static final Pattern PATTERN_FD = Pattern.compile("^\\d{1,3}$");
public static final Pattern PATTERN_FD = Pattern.compile("^\\d{1,20}$");

protected final ResourceBundle messages;
protected EnvironmentVariableResolver envResolver = System::getenv;
Expand Down Expand Up @@ -219,7 +219,7 @@ public File fileDescriptorFromString(String fdString) {
}
String fdNumber = fdString.substring(PRFX_FD.length());
if (!PATTERN_FD.matcher(fdNumber).matches()) {
throw new IllegalArgumentException("File descriptor must be a 1-3 digit, positive number.");
throw new IllegalArgumentException("File descriptor must be a positive number.");
}
File descriptor = new File(fdDir, fdNumber);
return descriptor;
Expand Down

0 comments on commit 00ab68b

Please sign in to comment.