Repository: mockito/mockito
Issue: Mockito Javadoc has a TODO about hamcrest
Labels: docs

``` java
 * TODO rework the documentation, write about hamcrest.
 *
 */
@SuppressWarnings("unchecked")
public class Mockito extends ArgumentMatchers {
```

https://github.com/bric3/mockito/blob/18133aa0cb5b51c0472fb8b33ab0a22aa9f0fbf3/src/main/java/org/mockito/Mockito.java#L1207-L1207

Let's remove it or fix it.


Issue comments:
On it. Thanks!


Pull request review comments:

Patch that resolved the issue:
diff --git a/src/main/java/org/mockito/Mockito.java b/src/main/java/org/mockito/Mockito.java
index ffcc5caa12..8ff34cada5 100644
--- a/src/main/java/org/mockito/Mockito.java
+++ b/src/main/java/org/mockito/Mockito.java
@@ -1203,9 +1203,6 @@
  *         return input1 + input2;
  *     }})).when(mock).execute(anyString(), anyString());
  * </code></pre>
- *
- * TODO rework the documentation, write about hamcrest.
- *
  */
 @SuppressWarnings("unchecked")
 public class Mockito extends ArgumentMatchers {
@@ -2579,7 +2576,8 @@ public static VerificationMode description(String description) {
     }
 
     /**
-     * TODO 543 move to MockingDetails
+     * This API will move soon to a different place.
+     * See <a href="https://github.com/mockito/mockito/issues/577">issue 577</a>.
      */
     @Deprecated
     static MockitoDebugger debug() {
diff --git a/src/main/java/org/mockito/internal/creation/util/SearchingClassLoader.java b/src/main/java/org/mockito/internal/creation/util/SearchingClassLoader.java
deleted file mode 100644
index 645acb4a97..0000000000
--- a/src/main/java/org/mockito/internal/creation/util/SearchingClassLoader.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2007 Mockito contributors
- * This program is made available under the terms of the MIT License.
- */
-package org.mockito.internal.creation.util;
-
-import static java.lang.Thread.*;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Inspired on jMock (thanks jMock guys!!!)
- */
-public class SearchingClassLoader extends ClassLoader {
-
-    //TODO SF potentially not needed
-
-    private final ClassLoader nextToSearch;
-    
-    public SearchingClassLoader(ClassLoader parent, ClassLoader nextToSearch) {
-        super(parent);
-        this.nextToSearch = nextToSearch;
-    }
-    
-    public static ClassLoader combineLoadersOf(Class<?>... classes) {
-        return combineLoadersOf(classes[0], classes);
-    }
-    
-    private static ClassLoader combineLoadersOf(Class<?> first, Class<?>... others) {
-        List<ClassLoader> loaders = new ArrayList<ClassLoader>();
-        
-        addIfNewElement(loaders, first.getClassLoader());
-        for (Class<?> c : others) {
-            addIfNewElement(loaders, c.getClassLoader());
-        }
-        
-        // To support Eclipse Plug-in tests.
-        // In an Eclipse plug-in, we will not be on the system class loader
-        // but in the class loader of the plug-in.
-        //
-        // Note: I've been unable to reproduce the error in the test suite.
-        addIfNewElement(loaders, SearchingClassLoader.class.getClassLoader());
-        
-        // To support the Maven Surefire plugin.
-        // Note: I've been unable to reproduce the error in the test suite.
-        addIfNewElement(loaders, currentThread().getContextClassLoader());
-
-        //Had to comment that out because it didn't work with in-container Spring tests
-        //addIfNewElement(loaders, ClassLoader.getSystemClassLoader());
-        
-        return combine(loaders);
-    }
-    
-    private static ClassLoader combine(List<ClassLoader> parentLoaders) {
-        ClassLoader loader = parentLoaders.get(parentLoaders.size()-1);
-        
-        for (int i = parentLoaders.size()-2; i >= 0; i--) {
-            loader = new SearchingClassLoader(parentLoaders.get(i), loader);
-        }
-        
-        return loader;
-    }
-    
-    private static void addIfNewElement(List<ClassLoader> loaders, ClassLoader c) {
-        if (c != null && !loaders.contains(c)) {
-            loaders.add(c);
-        }
-    }
-    
-    @Override
-    protected Class<?> findClass(String name) throws ClassNotFoundException {
-        if (nextToSearch != null) {
-            return nextToSearch.loadClass(name);
-        } else {
-            return super.findClass(name); // will throw ClassNotFoundException
-        }
-    }
-}
\ No newline at end of file


Test patch: