mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8290047: (fs) FileSystem.getPathMatcher does not check for ":" at last index
Reviewed-by: naoto, rriggs, alanb, lancea
This commit is contained in:
parent
8d0d9eaa9c
commit
4040927d17
8 changed files with 52 additions and 15 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -261,7 +261,7 @@ class WindowsFileSystem
|
|||
@Override
|
||||
public PathMatcher getPathMatcher(String syntaxAndInput) {
|
||||
int pos = syntaxAndInput.indexOf(':');
|
||||
if (pos <= 0 || pos == syntaxAndInput.length())
|
||||
if (pos <= 0)
|
||||
throw new IllegalArgumentException();
|
||||
String syntax = syntaxAndInput.substring(0, pos);
|
||||
String input = syntaxAndInput.substring(pos+1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue