Skip to content

Commit

Permalink
Edit comments and release notes added in #3084
Browse files Browse the repository at this point in the history
  • Loading branch information
juliette-derancourt committed Dec 16, 2022
1 parent 16de26f commit d7a52e3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ repository on GitHub.

==== New Features and Improvements

* All utility methods from `ReflectionSupport` now have counterparts returning `Stream` instead of `List`
* All utility methods from `ReflectionSupport` now have counterparts returning `Stream`
instead of `List`.

[[release-notes-5.10.0-M1-junit-jupiter]]
=== JUnit Jupiter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ public static List<Class<?>> findAllClassesInClasspathRoot(URI root, Predicate<C
* @return a stream of all such classes found; never {@code null}
* but potentially empty
* @since 1.10
* @see #findAllClassesInPackage(String, Predicate, Predicate)
* @see #findAllClassesInModule(String, Predicate, Predicate)
* @see #streamAllClassesInPackage(String, Predicate, Predicate)
* @see #streamAllClassesInModule(String, Predicate, Predicate)
*/
@API(status = MAINTAINED, since = "1.10")
public static Stream<Class<?>> streamAllClassesInClasspathRoot(URI root, Predicate<Class<?>> classFilter,
Expand Down Expand Up @@ -180,8 +180,8 @@ public static List<Class<?>> findAllClassesInPackage(String basePackageName, Pre
* @return a stream of all such classes found; never {@code null}
* but potentially empty
* @since 1.10
* @see #findAllClassesInClasspathRoot(URI, Predicate, Predicate)
* @see #findAllClassesInModule(String, Predicate, Predicate)
* @see #streamAllClassesInClasspathRoot(URI, Predicate, Predicate)
* @see #streamAllClassesInModule(String, Predicate, Predicate)
*/
@API(status = MAINTAINED, since = "1.10")
public static Stream<Class<?>> streamAllClassesInPackage(String basePackageName, Predicate<Class<?>> classFilter,
Expand Down Expand Up @@ -229,8 +229,8 @@ public static List<Class<?>> findAllClassesInModule(String moduleName, Predicate
* @return a stream of all such classes found; never {@code null}
* but potentially empty
* @since 1.10
* @see #findAllClassesInClasspathRoot(URI, Predicate, Predicate)
* @see #findAllClassesInPackage(String, Predicate, Predicate)
* @see #streamAllClassesInClasspathRoot(URI, Predicate, Predicate)
* @see #streamAllClassesInPackage(String, Predicate, Predicate)
*/
@API(status = MAINTAINED, since = "1.10")
public static Stream<Class<?>> streamAllClassesInModule(String moduleName, Predicate<Class<?>> classFilter,
Expand Down Expand Up @@ -322,7 +322,9 @@ public static List<Field> findFields(Class<?> clazz, Predicate<Field> predicate,
@API(status = MAINTAINED, since = "1.10")
public static Stream<Field> streamFields(Class<?> clazz, Predicate<Field> predicate,
HierarchyTraversalMode traversalMode) {

Preconditions.notNull(traversalMode, "HierarchyTraversalMode must not be null");

return ReflectionUtils.streamFields(clazz, predicate,
ReflectionUtils.HierarchyTraversalMode.valueOf(traversalMode.name()));
}
Expand Down Expand Up @@ -390,7 +392,7 @@ public static Optional<Method> findMethod(Class<?> clazz, String methodName, Cla
* <p>The results will not contain instance methods that are <em>overridden</em>
* or {@code static} methods that are <em>hidden</em>.
*
* <p>If you're are looking for methods annotated with a certain annotation
* <p>If you are looking for methods annotated with a certain annotation
* type, consider using
* {@link AnnotationSupport#findAnnotatedMethods(Class, Class, HierarchyTraversalMode)}.
*
Expand All @@ -416,16 +418,16 @@ public static List<Method> findMethods(Class<?> clazz, Predicate<Method> predica
* <p>The results will not contain instance methods that are <em>overridden</em>
* or {@code static} methods that are <em>hidden</em>.
*
* <p>If you're are looking for methods annotated with a certain annotation
* <p>If you are looking for methods annotated with a certain annotation
* type, consider using
* {@link AnnotationSupport#findAnnotatedMethods(Class, Class, HierarchyTraversalMode)}.
*
* @param clazz the class or interface in which to find the methods; never {@code null}
* @param predicate the method filter; never {@code null}
* @param traversalMode the hierarchy traversal mode; never {@code null}
* @return a stream of all such methods found; never {@code null}
* @since 1.10
* but potentially empty
* @since 1.10
*/
@API(status = MAINTAINED, since = "1.10")
public static Stream<Method> streamMethods(Class<?> clazz, Predicate<Method> predicate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,6 @@ public static List<Class<?>> findNestedClasses(Class<?> clazz, Predicate<Class<?

/**
* since 1.10
* @see org.junit.platform.commons.support.ReflectionSupport#findNestedClasses(Class, Predicate)
* @see org.junit.platform.commons.support.ReflectionSupport#streamNestedClasses(Class, Predicate)
*/
public static Stream<Class<?>> streamNestedClasses(Class<?> clazz, Predicate<Class<?>> predicate) {
Expand Down Expand Up @@ -1236,7 +1235,6 @@ public static List<Constructor<?>> findConstructors(Class<?> clazz, Predicate<Co

/**
* @see org.junit.platform.commons.support.ReflectionSupport#findFields(Class, Predicate, org.junit.platform.commons.support.HierarchyTraversalMode)
* @see org.junit.platform.commons.support.ReflectionSupport#streamFields(Class, Predicate, org.junit.platform.commons.support.HierarchyTraversalMode)
*/
public static List<Field> findFields(Class<?> clazz, Predicate<Field> predicate,
HierarchyTraversalMode traversalMode) {
Expand Down Expand Up @@ -1470,7 +1468,6 @@ public static List<Method> findMethods(Class<?> clazz, Predicate<Method> predica

/**
* @see org.junit.platform.commons.support.ReflectionSupport#findMethods(Class, Predicate, org.junit.platform.commons.support.HierarchyTraversalMode)
* @see org.junit.platform.commons.support.ReflectionSupport#streamMethods(Class, Predicate, org.junit.platform.commons.support.HierarchyTraversalMode)
*/
public static List<Method> findMethods(Class<?> clazz, Predicate<Method> predicate,
HierarchyTraversalMode traversalMode) {
Expand Down

0 comments on commit d7a52e3

Please sign in to comment.