org.springframework.util.StringUtils



API Populatity

18 Client projects

Project SpringSource/spring-framework in file ...ractTransactionalDataSourceSpringContextTests.java (2011-02-08)
@@ -29,7 +29,6 @@ import org.springframework.dao.DataAccessException;
 import org.springframework.dao.DataAccessResourceFailureException;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.test.jdbc.JdbcTestUtils;
-import org.springframework.util.StringUtils;
 
 /**
  * Subclass of AbstractTransactionalSpringContextTests that adds some convenience
@@ -49,6 +48,7 @@ import org.springframework.util.StringUtils;
  * ({@link org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests})
  */
 @Deprecated
+@SuppressWarnings({ "unchecked", "rawtypes" })
 public abstract class AbstractTransactionalDataSourceSpringContextTests
 	extends AbstractTransactionalSpringContextTests {
 
Project SpringSource/spring-framework in file ...ging.simp.user.DefaultUserDestinationResolver.java (2014-01-21)
@@ -22,6 +22,7 @@ import org.springframework.messaging.Message;
 import org.springframework.messaging.simp.SimpMessageHeaderAccessor;
 import org.springframework.messaging.simp.SimpMessageType;
 import org.springframework.util.Assert;
+import org.springframework.util.StringUtils;
 
 import java.security.Principal;
 import java.util.Collections;
@@ -138,6 +139,7 @@ public class DefaultUserDestinationResolver implements UserDestinationResolver {
 			int endIndex = destination.indexOf('/', startIndex);
 			Assert.isTrue(endIndex > 0, "Expected destination pattern \"/principal/{userId}/**\"");
 			targetUser = destination.substring(startIndex, endIndex);
+			targetUser = StringUtils.replace(targetUser, "%2F", "/");
 			targetDestination = destination.substring(endIndex);
 			targetSessionIds = this.userSessionRegistry.getSessionIds(targetUser);
 		}
Project spring-projects/spring-boot in file ...k.boot.cli.compiler.ExtendedGroovyClassLoader.java (2014-06-25)
@@ -38,6 +38,7 @@ import org.codehaus.groovy.control.CompilerConfiguration;
 import org.codehaus.groovy.control.SourceUnit;
 import org.springframework.util.Assert;
 import org.springframework.util.FileCopyUtils;
+import org.springframework.util.StringUtils;
 
 /**
  * Extension of the {@link GroovyClassLoader} with support for obtaining '.class' files as
@@ -222,6 +223,7 @@ public class ExtendedGroovyClassLoader extends GroovyClassLoader {
 		}
 
 		private boolean isGroovyJar(String entry) {
+			entry = StringUtils.cleanPath(entry);
 			for (String jarPrefix : GROOVY_JARS_PREFIXES) {
 				if (entry.contains("/" + jarPrefix + "-")) {
 					return true;