File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
org.springframework.core/src/main/java/org/springframework/core/io Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2010 the original author or authors.
2
+ * Copyright 2002-2011 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -100,9 +100,13 @@ public boolean exists() {
100
100
(con instanceof HttpURLConnection ? (HttpURLConnection ) con : null );
101
101
if (httpCon != null ) {
102
102
httpCon .setRequestMethod ("HEAD" );
103
- if (httpCon .getResponseCode () == HttpURLConnection .HTTP_OK ) {
103
+ int code = httpCon .getResponseCode ();
104
+ if (code == HttpURLConnection .HTTP_OK ) {
104
105
return true ;
105
106
}
107
+ else if (code == HttpURLConnection .HTTP_NOT_FOUND ) {
108
+ return false ;
109
+ }
106
110
}
107
111
if (con .getContentLength () >= 0 ) {
108
112
return true ;
You can’t perform that action at this time.
0 commit comments