feedback-to-code/mozzarella huggingface dataset:
Repository: mockito/mockito
Issue: Add BDD version of verifyNoMoreInteractions()
Labels: BDD

Current state:

``` java
then(file).should().moveTo(directory);
verifyNoMoreInteractions(file);
```

Would be great to have BDD replacement for `verifyNoMoreInteractions()`. Then the test would be even nicer:

``` java
then(file).should().moveTo(directory);
then(file).shouldHaveNoMoreInteractions();
```

If you agree, I will submit a PR.


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/src/main/java/org/mockito/BDDMockito.java b/src/main/java/org/mockito/BDDMockito.java
index 560cdf8bd7..7bb8f4679f 100644
--- a/src/main/java/org/mockito/BDDMockito.java
+++ b/src/main/java/org/mockito/BDDMockito.java
@@ -57,6 +57,7 @@
  *   person.ride(bike);
  *
  *   then(person).should(times(2)).ride(bike);
+ *   then(person).shouldHaveNoMoreInteractions();
  *   then(police).shouldHaveZeroInteractions();
  * </code></pre>
  * <p>
@@ -256,6 +257,12 @@ public interface Then<T> {
          * @since 2.0
          */
         void shouldHaveZeroInteractions();
+
+        /**
+         * @see #verifyNoMoreInteractions(Object...)
+         * @since 2.0
+         */
+        void shouldHaveNoMoreInteractions();
     }
 
     /**
@@ -309,6 +316,14 @@ public T should(InOrder inOrder, VerificationMode mode) {
         public void shouldHaveZeroInteractions() {
             verifyZeroInteractions(mock);
         }
+
+        /**
+         * @see #verifyNoMoreInteractions(Object...)
+         * @since 2.0
+         */
+        public void shouldHaveNoMoreInteractions() {
+            verifyNoMoreInteractions(mock);
+        }
     }
 
     /**


Test patch:
diff --git a/src/test/java/org/mockitousage/customization/BDDMockitoTest.java b/src/test/java/org/mockitousage/customization/BDDMockitoTest.java
index c207361c9d..b74487ef04 100644
--- a/src/test/java/org/mockitousage/customization/BDDMockitoTest.java
+++ b/src/test/java/org/mockitousage/customization/BDDMockitoTest.java
@@ -246,6 +246,7 @@ public void should_pass_for_expected_behavior_that_happened() {
         mock.booleanObjectReturningMethod();
 
         then(mock).should().booleanObjectReturningMethod();
+        then(mock).shouldHaveNoMoreInteractions();
     }
 
     @Test
@@ -263,6 +264,18 @@ public void should_fail_when_mock_had_unwanted_interactions() {
         } catch (NoInteractionsWanted expected) { }
     }
 
+    @Test
+    public void should_fail_when_mock_had_more_interactions_than_expected() {
+        mock.booleanObjectReturningMethod();
+        mock.byteObjectReturningMethod();
+
+        then(mock).should().booleanObjectReturningMethod();
+        try {
+            then(mock).shouldHaveNoMoreInteractions();
+            fail("should have reported that no more interactions were wanted");
+        } catch (NoInteractionsWanted expected) { }
+    }
+
     @Test
     public void should_pass_for_interactions_that_happened_in_correct_order() {
         mock.booleanObjectReturningMethod();
Repository: mockito/mockito
Issue: Delivery drone breaks codecov

Since the commits of the delivery drone have `[ci skip]`, there is no coverage report for that specific commit. As a result, when a pull request has as base such a commit, CodeCov reports that it could not generate a coverage report.

Maybe we can depend executing `gradle release` if the commit is from a user other than the delivery drone, to not break codecov.


Issue comments:

Pull request review comments:
This can be a _oneliner_ I believe 

```
if [[ $(git log --format=%B -n 1) != *"[ci skip-release]"* ]] ; then ./gradlew release; fi
```

The git log command was from a travis issue as there is an intent to add the new environment variable. The command is kinda magic, so naming the variable makes it imo easier to comprehend.


Patch that resolved the issue:
diff --git a/.travis.yml b/.travis.yml
index 20b34b70df..e1b7d261d7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -39,7 +39,9 @@ branches:
 install:
  - true
 script:
-  - ./gradlew ciBuild release
+  - TRAVIS_MESSAGE="$(git log --format=%B -n 1)"
+  - ./gradlew ciBuild
+  - if [[ $TRAVIS_MESSAGE != *"[ci skip-release]"* ]] ; then ./gradlew release; fi
 after_success:
   - ./gradlew --stacktrace coverageReport && cp build/reports/jacoco/mockitoCoverage/mockitoCoverage.xml jacoco.xml || echo "Code coverage failed"
   - bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
diff --git a/dummy-commit.txt b/dummy-commit.txt
index 39b0928f91..7ca32a7a2e 100644
--- a/dummy-commit.txt
+++ b/dummy-commit.txt
@@ -1,1 +1,1 @@
-Change this if you need a dummy commit. Push build.
+Change this if you need a dummy commit. Push build
diff --git a/gradle/release.gradle b/gradle/release.gradle
index a748bc1cd1..461d849c38 100644
--- a/gradle/release.gradle
+++ b/gradle/release.gradle
@@ -86,7 +86,7 @@ release {
 
 releaseSteps {
     String currentVersion = project.version //the version loaded when Gradle build has started
-    String buildInfo = "by Travis CI build $System.env.TRAVIS_BUILD_NUMBER [ci skip]"
+    String buildInfo = "by Travis CI build $System.env.TRAVIS_BUILD_NUMBER [ci skip-release]"
     MaskedArg pushTarget = new MaskedArg(value: "https://szczepiq:${System.env.GH_TOKEN}@github.com/mockito/mockito.git")
 
     step("ensure good chunk of recent commits is pulled for release notes automation") {
@@ -197,4 +197,4 @@ TODO:
   -new commits removal (git reset --hard) on all affected branches
 -clean up after release:
  -?
- */
\ No newline at end of file
+ */


Test patch:
Repository: mockito/mockito
Issue: Checks.checkNotNull should emit IllegalArgumentException instead of NPE
Labels: enhancement

Checks.checkNotNull emits NPE. I think it is better to emit IAE, because:
- IAE is more specific whereas NPE is more generic. Specific exception is easier to test.
- Specific exception gives better experience for users, NPE is often assumed to be developer error.

This change is not backwards compatible.

@bric3, thoughts?


Issue comments:
Definitely! Personally I hate throwing NPEs. NPE can be thrown because you've forgotten to inject sth and your test (if you test for an NPE exception to be thrown) will pass.

Agreed 


Pull request review comments:

Patch that resolved the issue:
diff --git a/src/main/java/org/mockito/internal/util/Checks.java b/src/main/java/org/mockito/internal/util/Checks.java
index 00ed8a8f22..acb8e914b0 100644
--- a/src/main/java/org/mockito/internal/util/Checks.java
+++ b/src/main/java/org/mockito/internal/util/Checks.java
@@ -12,7 +12,7 @@ public class Checks {
 
     public static <T> T checkNotNull(T value, String checkedValue) {
         if(value == null) {
-            throw new NullPointerException(checkedValue + " should not be null");
+            throw new IllegalArgumentException(checkedValue + " should not be null");
         }
         return value;
     }


Test patch:
diff --git a/src/test/java/org/mockito/internal/configuration/MockInjectionTest.java b/src/test/java/org/mockito/internal/configuration/MockInjectionTest.java
index ed20c9ccc2..4abb528042 100644
--- a/src/test/java/org/mockito/internal/configuration/MockInjectionTest.java
+++ b/src/test/java/org/mockito/internal/configuration/MockInjectionTest.java
@@ -29,22 +29,22 @@ public void reset() throws Exception {
         withoutConstructor = null;
     }
 
-    @Test(expected = NullPointerException.class)
+    @Test(expected = IllegalArgumentException.class)
     public void should_not_allow_null_on_field() {
         MockInjection.onField((Field) null, this);
     }
 
-    @Test(expected = NullPointerException.class)
+    @Test(expected = IllegalArgumentException.class)
     public void should_not_allow_null_on_fields() {
         MockInjection.onFields((Set<Field>) null, this);
     }
 
-    @Test(expected = NullPointerException.class)
+    @Test(expected = IllegalArgumentException.class)
     public void should_not_allow_null_on_instance_owning_the_field() throws Exception {
         MockInjection.onField(field("withConstructor"), null);
     }
 
-    @Test(expected = NullPointerException.class)
+    @Test(expected = IllegalArgumentException.class)
     public void should_not_allow_null_on_mocks() throws Exception {
         MockInjection.onField(field("withConstructor"), this).withMocks(null);
     }
Repository: mockito/mockito
Issue: Tweak javadoc

- some feature indicates 2.1.0 in javadoc but it should 3.0.0


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/src/main/java/org/mockito/internal/stubbing/defaultanswers/ReturnsMoreEmptyValues.java b/src/main/java/org/mockito/internal/stubbing/defaultanswers/ReturnsMoreEmptyValues.java
index 5d37aacbfa..2c20525057 100644
--- a/src/main/java/org/mockito/internal/stubbing/defaultanswers/ReturnsMoreEmptyValues.java
+++ b/src/main/java/org/mockito/internal/stubbing/defaultanswers/ReturnsMoreEmptyValues.java
@@ -13,7 +13,7 @@
 import java.lang.reflect.Array;
 
 /**
- * It's likely this implementation will be used by default by every Mockito 2.1.0 mock.
+ * It's likely this implementation will be used by default by every Mockito 3.0.0 mock.
  * <p>
  * Currently <b>used only</b> by {@link Mockito#RETURNS_SMART_NULLS}
  * <p>


Test patch:
Repository: mockito/mockito
Issue: Javadoc CSS width issue

There is some minor problem with element width (CSS) on javadoc site.
Some elements are too wide and are causing horizontal scroll bar to show up.

I post picture to show what is going on.

https://s9.postimg.io/xlbg2e0ul/mockito_javadoc.png


Issue comments:
I don't had the problem when I tested the css the problem but that depend on the browser. 

If you know how to fix it that would be awesome!

Just saw the PR thanks!

Probably after this change there will be still horizontal scroll-bar because I saw some other elements longer then 100% (with padding, margins and borders) . Even if they are - they will not be as significant as ones solved in PR.


Pull request review comments:

Patch that resolved the issue:
diff --git a/src/javadoc/stylesheet.css b/src/javadoc/stylesheet.css
index b33442208a..f4b3dd7fd5 100644
--- a/src/javadoc/stylesheet.css
+++ b/src/javadoc/stylesheet.css
@@ -246,15 +246,16 @@ Heading styles
 ul.blockList ul.blockList li.blockList h3, ul.blockList ul.blockList li.blockList h3 {
     background:#E0E6DF;
     border:1px solid #C0C0C0;
-    width: 110%;
-    margin-left: -1em;
-    padding-left: 1em;
+    width: 100%;
+    margin-left: 0;
+    padding-left: 0;
 }
 div.summary ul.blockList ul.blockList li.blockList h3 {
     background:#E0E6DF;
-    border:0;
-    border:1px solid #C0C0C0;
-    padding-left:5px;
+    border: 0 solid #C0C0C0;
+    padding: 0;
+    margin: 0;
+    width: 100%;
 }
 div.summary ul.blockList ul.blockList ul.blockList li.blockList h3 {
     background:#E0E6DF;


Test patch:
Repository: mockito/mockito
Issue: Update AssertJ to 3

Since AssertJ 3 relies on Java 8, we can now update on master. It seems that there are very few breaking changes so hopefully this should not be a big hassle.


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/build.gradle b/build.gradle
index 33f03bff72..946fd0d943 100644
--- a/build.gradle
+++ b/build.gradle
@@ -67,7 +67,7 @@ dependencies {
 
     testCompile 'org.ow2.asm:asm:5.1'
 
-    testCompile 'org.assertj:assertj-core:1.7.1'
+    testCompile 'org.assertj:assertj-core:3.5.2'
 
     testRuntime configurations.provided
 


Test patch:
Repository: mockito/mockito
Issue: Typos in FailureDetecter
Labels: refactoring

`FailureDetecter` should be `FailureDetector`. Its method `isSussessful()` should probably be `isSuccessful()`.


Issue comments:
PR? :)

Check. See #654.


Pull request review comments:

Patch that resolved the issue:
diff --git a/src/main/java/org/mockito/internal/runners/StrictRunner.java b/src/main/java/org/mockito/internal/runners/StrictRunner.java
index 6138865488..0c4a347abd 100644
--- a/src/main/java/org/mockito/internal/runners/StrictRunner.java
+++ b/src/main/java/org/mockito/internal/runners/StrictRunner.java
@@ -6,7 +6,7 @@
 import org.junit.runner.notification.RunNotifier;
 import org.mockito.Mockito;
 import org.mockito.internal.junit.UnnecessaryStubbingsReporter;
-import org.mockito.internal.runners.util.FailureDetecter;
+import org.mockito.internal.runners.util.FailureDetector;
 
 public class StrictRunner implements RunnerImpl {
 
@@ -26,7 +26,7 @@ public StrictRunner(RunnerImpl runner, Class<?> testClass) {
     public void run(RunNotifier notifier) {
         //TODO need to be able to opt in for full stack trace instead of just relying on the stack trace filter
         UnnecessaryStubbingsReporter reporter = new UnnecessaryStubbingsReporter();
-        FailureDetecter listener = new FailureDetecter();
+        FailureDetector listener = new FailureDetector();
 
         Mockito.framework().addListener(reporter);
         try {
@@ -37,7 +37,7 @@ public void run(RunNotifier notifier) {
             Mockito.framework().removeListener(reporter);
         }
 
-        if (!filterRequested && listener.isSussessful()) {
+        if (!filterRequested && listener.isSuccessful()) {
             //only report when:
             //1. if all tests from given test have ran (filter requested is false)
             //   Otherwise we would report unnecessary stubs even if the user runs just single test from the class
diff --git a/src/main/java/org/mockito/internal/runners/util/FailureDetecter.java b/src/main/java/org/mockito/internal/runners/util/FailureDetector.java
similarity index 86%
rename from src/main/java/org/mockito/internal/runners/util/FailureDetecter.java
rename to src/main/java/org/mockito/internal/runners/util/FailureDetector.java
index 1ba6d52978..14d4eba468 100644
--- a/src/main/java/org/mockito/internal/runners/util/FailureDetecter.java
+++ b/src/main/java/org/mockito/internal/runners/util/FailureDetector.java
@@ -10,7 +10,7 @@
 /**
  * Implementation of JUnit run listener that knows when any of the tests failed
  */
-public class FailureDetecter extends RunListener {
+public class FailureDetector extends RunListener {
 
     private boolean failed;
 
@@ -20,7 +20,7 @@ public void testFailure(Failure failure) throws Exception {
         failed = true;
     }
 
-    public boolean isSussessful() {
+    public boolean isSuccessful() {
         return !failed;
     }
-}
\ No newline at end of file
+}


Test patch:
Repository: mockito/mockito
Issue: Typo in JUnitDetecter class name

`JUnitDetecter` class should be renamed to `JUnitDetector` and accordingly the variables in `FriendlyExceptionMaker` and `JUnitTool` should be renamed from detecter to detector.


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/src/main/java/org/mockito/internal/junit/FriendlyExceptionMaker.java b/src/main/java/org/mockito/internal/junit/FriendlyExceptionMaker.java
index 2900f7267b..3c122c9afe 100644
--- a/src/main/java/org/mockito/internal/junit/FriendlyExceptionMaker.java
+++ b/src/main/java/org/mockito/internal/junit/FriendlyExceptionMaker.java
@@ -8,15 +8,15 @@
  */
 class FriendlyExceptionMaker {
 
-    private final JUnitDetecter detecter;
+    private final JUnitDetector detector;
 
-    FriendlyExceptionMaker(JUnitDetecter detecter) {
-        this.detecter = detecter;
+    FriendlyExceptionMaker(JUnitDetector detector) {
+        this.detector = detector;
     }
 
     //TODO SF this can be now unit tested
     public AssertionError createArgumentsAreDifferentException(String message, String wanted, String actual)  {
-        if (!detecter.hasJUnit()) {
+        if (!detector.hasJUnit()) {
             return new ArgumentsAreDifferent(message);
         }
 
diff --git a/src/main/java/org/mockito/internal/junit/JUnitDetecter.java b/src/main/java/org/mockito/internal/junit/JUnitDetector.java
similarity index 87%
rename from src/main/java/org/mockito/internal/junit/JUnitDetecter.java
rename to src/main/java/org/mockito/internal/junit/JUnitDetector.java
index 3ccc7f0294..4aac39df8d 100644
--- a/src/main/java/org/mockito/internal/junit/JUnitDetecter.java
+++ b/src/main/java/org/mockito/internal/junit/JUnitDetector.java
@@ -1,10 +1,10 @@
 package org.mockito.internal.junit;
 
-class JUnitDetecter {
+class JUnitDetector {
 
     private boolean hasJUnit;
 
-    JUnitDetecter() {
+    JUnitDetector() {
         try {
             Class.forName("junit.framework.ComparisonFailure");
             hasJUnit = true;
diff --git a/src/main/java/org/mockito/internal/junit/JUnitTool.java b/src/main/java/org/mockito/internal/junit/JUnitTool.java
index ec98faabe7..4120acf0fb 100644
--- a/src/main/java/org/mockito/internal/junit/JUnitTool.java
+++ b/src/main/java/org/mockito/internal/junit/JUnitTool.java
@@ -6,13 +6,13 @@
 
 public class JUnitTool {
 
-    private static final JUnitDetecter detecter = new JUnitDetecter();
+    private static final JUnitDetector detector = new JUnitDetector();
 
     public static boolean hasJUnit() {
-        return detecter.hasJUnit();
+        return detector.hasJUnit();
     }
 
     public static AssertionError createArgumentsAreDifferentException(String message, String wanted, String actual)  {
-        return new FriendlyExceptionMaker(detecter).createArgumentsAreDifferentException(message, wanted, actual);
+        return new FriendlyExceptionMaker(detector).createArgumentsAreDifferentException(message, wanted, actual);
     }
 }
\ No newline at end of file


Test patch:
Repository: mockito/mockito
Issue: Update Gradle to 3.1

Keep mockito up-to-date with Gradle. 3.1 is released and it brings some performance improvements, fixes and features: https://docs.gradle.org/3.1/release-notes


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/build.gradle b/build.gradle
index 614c141c2a..bdede4725f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -123,7 +123,7 @@ apply from: 'gradle/release.gradle'
 apply from: 'gradle/pom.gradle'
 
 task wrapper(type: Wrapper) {
-    gradleVersion = '3.0'
+    gradleVersion = '3.1'
 }
 
 task ciBuild {
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 08b5db1824..741e62f45b 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Sat Sep 17 14:22:48 CEST 2016
+#Thu Sep 29 21:49:00 PDT 2016
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-bin.zip
diff --git a/gradlew b/gradlew
index 27309d9231..9aa616c273 100755
--- a/gradlew
+++ b/gradlew
@@ -161,4 +161,9 @@ function splitJvmOpts() {
 eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
 JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
 
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [[ "$(uname)" == "Darwin" ]] && [[ "$HOME" == "$PWD" ]]; then
+  cd "$(dirname "$0")"
+fi
+
 exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
index 832fdb6079..f9553162f1 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -49,7 +49,6 @@ goto fail
 @rem Get command-line arguments, handling Windows variants
 
 if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
 
 :win9xME_args
 @rem Slurp the command line arguments.
@@ -60,11 +59,6 @@ set _SKIP=2
 if "x%~1" == "x" goto execute
 
 set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
 
 :execute
 @rem Setup the command line


Test patch:
Repository: mockito/mockito
Issue: Update Jacoco to stable minor version 0.7.8 when released
Labels: java-9

See https://github.com/jacoco/jacoco/issues/467#issuecomment-264311016

The snapshot version of Jacoco are removed and could fail our CI. The version of Jacoco is required to build on JDK9

Issue comments:
Release approaching ;)
`0.7.8` has been released: https://github.com/jacoco/jacoco/issues/467#issuecomment-266305876
Fixed by #798.

Pull request review comments:

Patch that resolved the issue:
diff --git a/gradle/coverage.gradle b/gradle/coverage.gradle
index 9ad6740879..86fc3a190b 100644
--- a/gradle/coverage.gradle
+++ b/gradle/coverage.gradle
@@ -2,14 +2,8 @@ apply plugin: 'jacoco'
 
 // TODO later include subprojects, possible ideas https://gist.github.com/aalmiray/e6f54aa4b3803be0bcac
 
-repositories {
-    // TODO go back to the latest release of Jacoco. We need this snapshot
-    // because of https://github.com/jacoco/jacoco/pull/434 on JDK 9
-    maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
-}
-
 jacoco {
-    toolVersion = "0.7.8-20161102.122531-23"
+    toolVersion = "0.7.8"
 }
 
 task mockitoCoverage(type: JacocoReport, dependsOn: "test") {


Test patch:
Repository: mockito/mockito
Issue: Grammar issue in ArgumentMatchers' javadoc.

[`ArgumentMatchers`' javadoc](https://static.javadoc.io/org.mockito/mockito-core/2.6.1/org/mockito/ArgumentMatchers.html) states that:

> This implementation is due static type safety imposed by java compiler. 

There's a word missing there. It should read:

> This implementation is due **to** static type safety imposed by java compiler. 

Version info:
- First noticed this on 2.5.5
- Confirmed it still existed in 2.5.6, 2.5.7 and 2.6.1
- Probably also existed in previous versions.

Issue comments:
@TimvdLippe should this issue be closed now that the PR is merged, or should this fix be backported to the 2.x branch too?
@mureinik Oh right it was to the wrong branch 😭 That's my mistake. I will backport it manually

Pull request review comments:

Patch that resolved the issue:
diff --git a/src/main/java/org/mockito/ArgumentMatchers.java b/src/main/java/org/mockito/ArgumentMatchers.java
index 56ff53311f..a28eaafe36 100644
--- a/src/main/java/org/mockito/ArgumentMatchers.java
+++ b/src/main/java/org/mockito/ArgumentMatchers.java
@@ -91,7 +91,7 @@
  * <p>
  * Matcher methods like <code>anyObject()</code>, <code>eq()</code> <b>do not</b> return matchers.
  * Internally, they record a matcher on a stack and return a dummy value (usually null).
- * This implementation is due static type safety imposed by java compiler.
+ * This implementation is due to static type safety imposed by java compiler.
  * The consequence is that you cannot use <code>anyObject()</code>, <code>eq()</code> methods outside of verified/stubbed method.
  * </p>
  *


Test patch:
Repository: mockito/mockito
Issue: Upgrading to Objenesis 2.5
Labels: java-9

Mockito already uses Objenesis 2.4.
However Objenesis 2.5 was just released and supports the latest [JDK 9 build 151 jigsaw](http://objenesis.org/notes.html)

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/build.gradle b/build.gradle
index f363fd2557..72a2e65524 100644
--- a/build.gradle
+++ b/build.gradle
@@ -50,7 +50,7 @@ dependencies {
     compile 'net.bytebuddy:byte-buddy-agent:1.5.12'
 
     provided "junit:junit:4.12", "org.hamcrest:hamcrest-core:1.3"
-    compile "org.objenesis:objenesis:2.4"
+    compile "org.objenesis:objenesis:2.5"
 
     testCompile 'org.ow2.asm:asm:5.1'
 
@@ -94,4 +94,4 @@ buildScan {
     licenseAgree = 'yes'
 
     recipes 'git-commit', 'travis-ci'
-}
\ No newline at end of file
+}
diff --git a/gradle/mockito-core/osgi.gradle b/gradle/mockito-core/osgi.gradle
index dfed1fe321..227b116b10 100644
--- a/gradle/mockito-core/osgi.gradle
+++ b/gradle/mockito-core/osgi.gradle
@@ -20,7 +20,7 @@ afterEvaluate {
                     'junit.*;resolution:=optional',
                     'org.junit.*;resolution:=optional',
                     'org.hamcrest;resolution:=optional',
-                    'org.objenesis;version="[2.4,3.0)"',
+                    'org.objenesis;version="[2.5,3.0)"',
                     'org.mockito.*'
 
             instruction 'Private-Package',


Test patch: