Skip to content

Commit

Permalink
Migrate to FileSystemResource wherever necessary
Browse files Browse the repository at this point in the history
Closes gh-43777
  • Loading branch information
snicoll committed Jan 11, 2025
1 parent cc49b30 commit 328f670
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2024 the original author or authors.
* Copyright 2012-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -43,8 +43,8 @@
import org.springframework.core.env.EnumerablePropertySource;
import org.springframework.core.env.Environment;
import org.springframework.core.env.PropertySource;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.InputStreamSource;
import org.springframework.core.io.PathResource;
import org.springframework.core.io.Resource;
import org.springframework.util.Assert;
import org.springframework.util.FileCopyUtils;
Expand Down Expand Up @@ -176,7 +176,7 @@ private static final class PropertyFile {

private final Path path;

private final PathResource resource;
private final FileSystemResource resource;

private final Origin origin;

Expand All @@ -186,7 +186,7 @@ private static final class PropertyFile {

private PropertyFile(Path path, Set<Option> options) {
this.path = path;
this.resource = new PathResource(path);
this.resource = new FileSystemResource(path);
this.origin = new TextResourceOrigin(this.resource, START_OF_FILE);
this.autoTrimTrailingNewLine = options.contains(Option.AUTO_TRIM_TRAILING_NEW_LINE);
this.cachedContent = options.contains(Option.ALWAYS_READ) ? null
Expand Down

0 comments on commit 328f670

Please sign in to comment.