From: Juergen H. <jho...@us...> - 2007-04-29 22:30:23
|
Update of /cvsroot/springframework/spring/src/org/springframework/core/io/support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25853/src/org/springframework/core/io/support Modified Files: ResourcePatternUtils.java Log Message: polishing Index: ResourcePatternUtils.java =================================================================== RCS file: /cvsroot/springframework/spring/src/org/springframework/core/io/support/ResourcePatternUtils.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ResourcePatternUtils.java 5 Jul 2006 16:22:43 -0000 1.2 --- ResourcePatternUtils.java 29 Apr 2007 22:30:19 -0000 1.3 *************** *** 1,4 **** /* ! * Copyright 2002-2006 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); --- 1,4 ---- /* ! * Copyright 2002-2007 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); *************** *** 26,35 **** * * <p>Callers will usually assume that a location is a relative path ! * if the <code>isUrl</code> method returns <code>false</code>. * * @author Juergen Hoeller * @since 1.2.3 - * @see #isUrl(String) - * @see org.springframework.util.ResourceUtils#isUrl(String) */ public abstract class ResourcePatternUtils { --- 26,33 ---- * * <p>Callers will usually assume that a location is a relative path ! * if the {@link #isUrl(String)} method returns <code>false</code>. * * @author Juergen Hoeller * @since 1.2.3 */ public abstract class ResourcePatternUtils { *************** *** 38,42 **** * Return whether the given resource location is a URL: either a * special "classpath" or "classpath*" pseudo URL or a standard URL. ! * @see ResourcePatternResolver#CLASSPATH_URL_PREFIX * @see org.springframework.util.ResourceUtils#CLASSPATH_URL_PREFIX * @see org.springframework.util.ResourceUtils#isUrl(String) --- 36,42 ---- * Return whether the given resource location is a URL: either a * special "classpath" or "classpath*" pseudo URL or a standard URL. ! * @param resourceLocation the location String to check ! * @return whether the location qualifies as a URL ! * @see ResourcePatternResolver#CLASSPATH_ALL_URL_PREFIX * @see org.springframework.util.ResourceUtils#CLASSPATH_URL_PREFIX * @see org.springframework.util.ResourceUtils#isUrl(String) *************** *** 44,51 **** */ public static boolean isUrl(String resourceLocation) { ! if (resourceLocation.startsWith(ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX)) { ! return true; ! } ! return ResourceUtils.isUrl(resourceLocation); } --- 44,50 ---- */ public static boolean isUrl(String resourceLocation) { ! return (resourceLocation != null && ! (resourceLocation.startsWith(ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX) || ! ResourceUtils.isUrl(resourceLocation))); } |