@@ -91,8 +91,8 @@ static FileData ofRelativePath(Path relativePath, BaseDir baseDir, Mode mode) {
9191 return new RelativePathFileData (relativePath , baseDir , mode , null , false );
9292 }
9393
94- static FileData ofPathSetting (String setting , BaseDir baseDir , Mode mode , boolean ignoreUrl ) {
95- return new PathSettingFileData (setting , baseDir , mode , ignoreUrl , null , false );
94+ static FileData ofPathSetting (String setting , BaseDir baseDir , Mode mode ) {
95+ return new PathSettingFileData (setting , baseDir , mode ,null , false );
9696 }
9797
9898 /**
@@ -221,13 +221,13 @@ public FileData withPlatform(Platform platform) {
221221 }
222222 }
223223
224- private record PathSettingFileData (String setting , BaseDir baseDir , Mode mode , boolean ignoreUrl , Platform platform , boolean exclusive )
224+ private record PathSettingFileData (String setting , BaseDir baseDir , Mode mode , Platform platform , boolean exclusive )
225225 implements
226226 RelativeFileData {
227227
228228 @ Override
229229 public PathSettingFileData withExclusive (boolean exclusive ) {
230- return new PathSettingFileData (setting , baseDir , mode , ignoreUrl , platform , exclusive );
230+ return new PathSettingFileData (setting , baseDir , mode , platform , exclusive );
231231 }
232232
233233 @ Override
@@ -239,9 +239,7 @@ public Stream<Path> resolveRelativePaths(PathLookup pathLookup) {
239239 String path = pathLookup .settingResolver ().apply (setting );
240240 result = path == null ? Stream .of () : Stream .of (path );
241241 }
242- if (ignoreUrl ) {
243- result = result .filter (s -> s .toLowerCase (Locale .ROOT ).startsWith ("https://" ) == false );
244- }
242+ result = result .filter (s -> s .toLowerCase (Locale .ROOT ).startsWith ("https://" ) == false );
245243 return result .map (pathLookup .configDir ()::resolve );
246244 }
247245
@@ -250,7 +248,7 @@ public FileData withPlatform(Platform platform) {
250248 if (platform == platform ()) {
251249 return this ;
252250 }
253- return new PathSettingFileData (setting , baseDir , mode , ignoreUrl , platform , exclusive );
251+ return new PathSettingFileData (setting , baseDir , mode , platform , exclusive );
254252 }
255253 }
256254
@@ -338,8 +336,6 @@ public static FilesEntitlement build(List<Object> paths) {
338336 String settingBaseDirAsString = checkString .apply (file , "basedir_if_relative" );
339337 String modeAsString = checkString .apply (file , "mode" );
340338 String platformAsString = checkString .apply (file , "platform" );
341- Boolean ignoreUrlAsStringBoolean = checkBoolean .apply (file , "ignore_url" );
342- boolean ignoreUrlAsString = ignoreUrlAsStringBoolean != null && ignoreUrlAsStringBoolean ;
343339 Boolean exclusiveBoolean = checkBoolean .apply (file , "exclusive" );
344340 boolean exclusive = exclusiveBoolean != null && exclusiveBoolean ;
345341
@@ -366,9 +362,6 @@ public static FilesEntitlement build(List<Object> paths) {
366362 throw new PolicyValidationException ("'relative_to' may only be used with 'relative_path'" );
367363 }
368364
369- if (ignoreUrlAsStringBoolean != null && pathSetting == null ) {
370- throw new PolicyValidationException ("'ignore_url' may only be used with 'path_setting'" );
371- }
372365 if (settingBaseDirAsString != null && pathSetting == null ) {
373366 throw new PolicyValidationException ("'basedir_if_relative' may only be used with 'path_setting'" );
374367 }
@@ -395,7 +388,7 @@ public static FilesEntitlement build(List<Object> paths) {
395388 throw new PolicyValidationException ("files entitlement with a 'path_setting' must specify 'basedir_if_relative'" );
396389 }
397390 BaseDir baseDir = parseBaseDir (settingBaseDirAsString );
398- fileData = FileData .ofPathSetting (pathSetting , baseDir , mode , ignoreUrlAsString );
391+ fileData = FileData .ofPathSetting (pathSetting , baseDir , mode );
399392 } else {
400393 throw new AssertionError ("File entry validation error" );
401394 }
0 commit comments