diff --git a/modules/core/src/main/java/org/springside/modules/mapper/JaxbMapper.java b/modules/core/src/main/java/org/springside/modules/mapper/JaxbMapper.java index 39fc27e9..3533467f 100644 --- a/modules/core/src/main/java/org/springside/modules/mapper/JaxbMapper.java +++ b/modules/core/src/main/java/org/springside/modules/mapper/JaxbMapper.java @@ -20,7 +20,7 @@ import javax.xml.bind.annotation.XmlAnyElement; import javax.xml.namespace.QName; import org.apache.commons.lang3.StringUtils; -import org.springframework.util.Assert; +import org.apache.commons.lang3.Validate; import org.springside.modules.utils.Exceptions; import org.springside.modules.utils.Reflections; @@ -140,7 +140,7 @@ public class JaxbMapper { } protected static JAXBContext getJaxbContext(Class clazz) { - Assert.notNull(clazz, "'clazz' must not be null"); + Validate.notNull(clazz, "'clazz' must not be null"); JAXBContext jaxbContext = jaxbContexts.get(clazz); if (jaxbContext == null) { try { diff --git a/modules/core/src/main/java/org/springside/modules/utils/Reflections.java b/modules/core/src/main/java/org/springside/modules/utils/Reflections.java index 71a86880..f493dc0b 100644 --- a/modules/core/src/main/java/org/springside/modules/utils/Reflections.java +++ b/modules/core/src/main/java/org/springside/modules/utils/Reflections.java @@ -16,7 +16,6 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.util.Assert; /** * 反射工具类. @@ -258,7 +257,7 @@ public class Reflections { } public static Class getUserClass(Object instance) { - Assert.notNull(instance, "Instance must not be null"); + Validate.notNull(instance, "Instance must not be null"); Class clazz = instance.getClass(); if ((clazz != null) && clazz.getName().contains(CGLIB_CLASS_SEPARATOR)) { Class superClass = clazz.getSuperclass(); diff --git a/modules/test/src/main/java/org/springside/modules/test/selenium/WebDriverFactory.java b/modules/test/src/main/java/org/springside/modules/test/selenium/WebDriverFactory.java index 0d6cf40f..7ea12155 100644 --- a/modules/test/src/main/java/org/springside/modules/test/selenium/WebDriverFactory.java +++ b/modules/test/src/main/java/org/springside/modules/test/selenium/WebDriverFactory.java @@ -8,13 +8,13 @@ package org.springside.modules.test.selenium; import java.net.MalformedURLException; import java.net.URL; +import org.apache.commons.lang3.Validate; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.ie.InternetExplorerDriver; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.RemoteWebDriver; -import org.springframework.util.Assert; /** * 创建WebDriver的工厂类. @@ -41,7 +41,7 @@ public class WebDriverFactory { driver = new ChromeDriver(); } else if (driverName.startsWith(BrowserType.remote.name())) { String[] params = driverName.split(":"); - Assert.isTrue(params.length == 4, + Validate.isTrue(params.length == 4, "Remote driver is not right, accept format is \"remote:localhost:4444:firefox\", but the input is\"" + driverName + "\""); @@ -67,7 +67,7 @@ public class WebDriverFactory { } } - Assert.notNull(driver, "Driver could be found by name:" + driverName); + Validate.notNull(driver, "Driver could be found by name:" + driverName); return driver; }