Skip to content

PowerMock Release 1.7.0

Compare
Choose a tag to compare
@thekingn0thing thekingn0thing released this 16 Jun 07:32
· 167 commits to release/2.x since this release

Majority changes

  • Added support for non beta versions of Mockito 2. Thanks to everyone that helped out and provided pull requests.
  • Added ability to set global @PowerMockIgnore.

Improvements

  • Implement #793 PowerMockMaker for Mockito 2: A new version of PowerMockMaker implemented. It does not conflict with Mockito MockMaker any more.
  • Added supporting Mockito 2.x (thanks to Gregor Stamac @gstamac for pull request)
  • Added supporting global ignore via configuration (issue # #801)
  • Added supporting org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker via PowerMock configuration (issues #793, #774)

Bug fixes

  • Fixed issue #722 IllegalArgumentException is output to standard error (thanks to Kotaro Nanri @k-nanri for pull request)
  • Fixed issue #717 Regression: MethodNotFoundException
  • Fixed issue #731 No methods matching the name(s) get were found in the class hierarchy for interfaces
  • Fixed issue #753 fix to upgrade code to be compatible with later versions of Mockito (thanks to emmaLP @emmaLP for pull request)
  • Fixed issue #763 whenNew not matching constructor when null is passed as first or last argument. (thanks to @podarsmarty podarsmarty for pull request)
  • Fixed issue #781 Call mocked equals static method instead of real (thanks to @Ilya-Gh Ilya Ghirici for pull request)
  • Fixed issue #772: PowerMockIgnorePackagesExtractorImpl should visit interfaces. (thanks to François Jacques @hypnoce for pull request)
  • Fixed issue with javax.xml and org.w3c. Previously when PowerMock was used with class which works with XML adding @PowerMockIgnore({"org.w3c.*", "javax.xml.*"}) was required. See example

Other changes:

  • Optimizations in powermock-reflect (thanks to Roman Leventov @leventov for pull request) (#724)
  • Migrated from Maven to Gradle (#728)
  • Fix for #701 partially does not work any more, because ByteBuddy implementation of MockMaker always intercept calls to equals and return true only in case if passed object is the same instance of mocked object.