Skip to content

Commit c5722b3

Browse files
committed
Clarified that getResource never returns null
(cherry picked from commit 49929f1)
1 parent e54a7ed commit c5722b3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spring-core/src/main/java/org/springframework/core/io/ResourceLoader.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -45,8 +45,8 @@ public interface ResourceLoader {
4545

4646

4747
/**
48-
* Return a Resource handle for the specified resource.
49-
* The handle should always be a reusable resource descriptor,
48+
* Return a Resource handle for the specified resource location.
49+
* <p>The handle should always be a reusable resource descriptor,
5050
* allowing for multiple {@link Resource#getInputStream()} calls.
5151
* <p><ul>
5252
* <li>Must support fully qualified URLs, e.g. "file:C:/test.dat".
@@ -58,10 +58,10 @@ public interface ResourceLoader {
5858
* <p>Note that a Resource handle does not imply an existing resource;
5959
* you need to invoke {@link Resource#exists} to check for existence.
6060
* @param location the resource location
61-
* @return a corresponding Resource handle
61+
* @return a corresponding Resource handle (never {@code null})
6262
* @see #CLASSPATH_URL_PREFIX
63-
* @see org.springframework.core.io.Resource#exists
64-
* @see org.springframework.core.io.Resource#getInputStream
63+
* @see Resource#exists()
64+
* @see Resource#getInputStream()
6565
*/
6666
Resource getResource(String location);
6767

0 commit comments

Comments
 (0)