1. 12 7月, 2016 11 次提交
    • S
      Use Supplier<String> support in Assert in spring-test · 68b3bc03
      Sam Brannen 提交于
      This commit makes use of the new Supplier<String> variants of utility
      methods in org.springframework.util.Assert within the spring-test
      module.
      
      Issue: SPR-14450
      68b3bc03
    • S
      Use Supplier<String> support in Assert in spring-core · 264f5860
      Sam Brannen 提交于
      This commit makes use of the new Supplier<String> variants of utility
      methods in org.springframework.util.Assert within the spring-core
      module.
      
      Issue: SPR-14450
      264f5860
    • S
      Introduce Supplier<String> support in Assert util · 17dd5dd2
      Sam Brannen 提交于
      Prior to this commit, utility methods in
      org.springframework.util.Assert accepted String arguments for custom
      error messages. Such Strings are evaluated (e.g., concatenated)
      eagerly, and for performance reasons, it was therefore not always
      possible to make use of these utility methods. Consequently, there are
      several places in the code base that "inline" identical functionality
      in order to lazily evaluate error message concatenation and avoid an
      unnecessary performance penalty. This leads to verbose code like the
      following.
      
      if (!contextPath.startsWith("/")) {
          throw new IllegalArgumentException("contextPath '" + contextPath +
          "' must start with '/'.");
      }
      if (contextPath.endsWith("/")) {
          throw new IllegalArgumentException("contextPath '" + contextPath +
          "' must not end with '/'.");
      }
      
      This commit addresses this shortcoming by introducing Supplier<String>
      variants of all utility methods in org.springframework.util.Assert that
      allow custom error messages to be evaluated lazily via a lambda
      expression that is only evaluated if the assertion fails. This results
      in a simplification of the previous examples as follows.
      
      Assert.isTrue(contextPath.startsWith("/"), () -> "contextPath '" +
          contextPath + "' must start with '/'.");
      Assert.isTrue(!contextPath.endsWith("/"), () -> "contextPath '" +
          contextPath + "' must not end with '/'.");
      
      Issue: SPR-14450
      17dd5dd2
    • S
      Clean up warnings in spring-core · 3d4338f5
      Sam Brannen 提交于
      3d4338f5
    • B
      Polish AntPathMatcher.setTrimTokens javadoc · 147a35f4
      Brian Clozel 提交于
      Issue: SPR-14247
      147a35f4
    • B
      Update link to Spring CLA in CONTRIBUTING doc · 3ce49819
      Brian Clozel 提交于
      3ce49819
    • S
      Polish · c425e774
      Stephane Nicoll 提交于
      c425e774
    • S
      Merge pull request #1105 from fisache:master · 2ee42192
      Stephane Nicoll 提交于
      * pr/1105:
        Polish doc
      2ee42192
    • F
      Polish doc · 55ad5a44
      fisache 提交于
      Closes gh-1105
      55ad5a44
    • S
      Merge pull request #1107 from nkjackzhang:patch-5 · 825a5ec0
      Stephane Nicoll 提交于
      * pr/1107:
        Polish doc
      825a5ec0
    • N
      Polish doc · 1fb93044
      nkjackzhang 提交于
      Closes gh-1107
      1fb93044
  2. 11 7月, 2016 9 次提交
  3. 10 7月, 2016 1 次提交
  4. 09 7月, 2016 1 次提交
  5. 08 7月, 2016 12 次提交
  6. 07 7月, 2016 6 次提交