From 3f7e86eaddddc4b33e2ec4b36e4eac30a5641937 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Fri, 12 Jun 2020 09:49:47 +0200 Subject: [PATCH 1/2] Update Javadoc for Assert regarding Guava Preconditions --- .../main/java/org/springframework/util/Assert.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/util/Assert.java b/spring-core/src/main/java/org/springframework/util/Assert.java index 8d4fc74e2ff..48789a7e87c 100644 --- a/spring-core/src/main/java/org/springframework/util/Assert.java +++ b/spring-core/src/main/java/org/springframework/util/Assert.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,9 +45,12 @@ import org.springframework.lang.Nullable; * Assert.notNull(clazz, "The class must not be null"); * Assert.isTrue(i > 0, "The value must be greater than zero"); * - *

Mainly for internal use within the framework; consider - * Apache's Commons Lang - * for a more comprehensive suite of {@code String} utilities. + *

Mainly for internal use within the framework; for a more comprehensive suite + * of assertion utilities consider {@code org.apache.commons.lang3.Validate} from + * Apache Commons Lang, + * Google Guava's + * Preconditions, + * or similar third-party libraries. * * @author Keith Donald * @author Juergen Hoeller From 94d7462891be35566cedced2cee57d9551422dd5 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sat, 13 Jun 2020 14:36:27 +0200 Subject: [PATCH 2/2] Ensure spring-core JAR is reproducible Prior to this commit, a change to Javadoc in any class in spring-core would result in ALL tests in the entire test suite being re-run via the Gradle build. Thanks to a tip from @melix, this commit aims to ensure that the spring-core JAR is "reproducible". --- spring-core/spring-core.gradle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-core/spring-core.gradle b/spring-core/spring-core.gradle index d88536a3fe4..d7bb33a5d5c 100644 --- a/spring-core/spring-core.gradle +++ b/spring-core/spring-core.gradle @@ -72,6 +72,9 @@ dependencies { } jar { + reproducibleFileOrder = true + preserveFileTimestamps = false // maybe not necessary here, but good for reproducibility + // Inline repackaged cglib classes directly into spring-core jar dependsOn cglibRepackJar from(zipTree(cglibRepackJar.archivePath)) {