An expressive Mock Object library for Test Driven Development

Related tags

JSON jmock-library
Overview

JMock Library

Build Status Maven Central

Maven

  <dependency>
    <groupId>org.jmock</groupId>
    <artifactId>jmock-junit5</artifactId>
    <version>2.12.0</version>
    <scope>test</scope>
  </dependency>

Gradle

testCompile(
    "junit:junit5:5.3.1",
    "org.jmock:jmock-junit5:2.12.0"
)

Recent Changes

2.10.0

JUnit 5 Support

  • Swap @Rule JUnit4Mockery for @RegisterExtension JMock5Mockery
  • Assign to a non-private JMock5Mockery or JUnit5 won't use it
import org.jmock.Expectations;
import org.jmock.junit5.JUnit5Mockery;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

public class JUnit5TestThatDoesSatisfyExpectations {
    @RegisterExtension
    JUnit5Mockery context = new JUnit5Mockery();
    private Runnable runnable = context.mock(Runnable.class);
    
    @Test
    public void doesSatisfyExpectations() {
        context.checking(new Expectations() {{
            oneOf (runnable).run();
        }});
        
        runnable.run();
    }
}

JUnit 4 moved to provided scope in org.jmock:jmock

  • This allows dependents to use other versions of junit or other test frameworks (e.g. junit 5)

Java7 Support will be dropped next release

2.9.0

  • Dropped JDK 6 compliance.
  • Exposed the InvocationDispatcher so that ThreadingPolicies

Upgrading to 2.8.X

Are you seeing NPEs?

We have had to make a breaking change to with(). Tests using with(any(matcher)) for method signatures that require native types will throw NullPointerException.

You should change

oneOf(mock).methodWithIntParams(with(any(Integer.class)));

to the following

oneOf(mock).methodWithIntParams(with.intIs(anything());

This is due to a compiler change in Java 1.7. The 2.6.0 release was compiled with Java 1.6 so it did not suffer this problem.

Advantages of jMock 2 over jMock 1

  • Uses real method calls, not strings, so you can refactor more easily and autocomplete in the IDE.
  • Customisation by delegation, not by inheritance.
  • Many more plugin-points for customisation.
  • Independent of any testing framework: compatability with the testing framework is a plugin-point.
  • Can mock concrete classes without calling their constructors (if you really want to).
  • Uses Hamcrest matchers, so can use a large and ever-growing library of matchers in expectations.
  • Expectations match in first-in, first-out order, so tests are easier to understand.

Package Structure

jMock 2 is organised into published and internal packages. We guarantee backwards compatability of types in published packages within the same major version of jMock. There are no guarantees about backward compatability for types in internal packages.

Types defined in published packages may themselves define public methods that accept or return types from internal packages or inherit methods from types in internal packages. Such methods have no compatability guarantees and should not be considered as part of the published interface.

Published packages

org.jmock

DSL-style API

org.jmock.api

org.jmock.lib

Convenient classes that implement the APIs in the core, are used by the DSL-style API, and can be used in user-defined APIs

org.jmock.integration

Classes integrating jMock with different testing APIs, such as JUnit 3.x, JUnit 4.x and TestNG.

Packages of example code

org.jmock.lib.nonstd

Lib classes that rely on clever hacks or otherwise cannot be guaranteed to always work in all JVMs. There are no compatability guarantees with these classes. Use at your own risk.

Internal packages

org.jmock.internal

Internal implementation details

org.jmock.test

Tests for jMock itself

Plug-in Points

Matcher

Controls the matching of invocations to expectations

Action

Performs an action in response to an invocation

Imposteriser

Wraps mock objects in an adapter of the correct type

Expectation

Matches an invocation and fakes its behaviour

ExpectationErrorTranslator

Translates expectation errors into error type used by a specific testing framework.

MockObjectNamingScheme

Creates names for mock objects based on the mocked type.

Contributing

If you'd like to contribute, then do the following:

  1. clone this repository (git clone …)
  2. install Maven (brew install mvn on Mac OS, for example)
  3. $ mvn package in order to generate a signed JAR. This will run all the tests. ($ mvn test appears not to suffice.)
Comments
  • Mocks being finalized report

    Mocks being finalized report "the Mockery is not thread-safe: use a Synchroniser to ensure thread safety" (JMOCK-256)

    from John Stoneham http://jira.codehaus.org/browse/JMOCK-256

    In using JMock to test Grails classes, I'm using the 'grails interactive' mode which can repeatedly invoke test cases without shutting down the JVM. My tests all extend a common superclass that uses reflection to introspect and clear out instance variables, including my Mockery instances, so all of these instances are available for garbage collection. We're using ClassImposteriser as well.

    The finalizer comes along and runs finalize() on the mocks. That invocation comes along into the proxy's callback within ClassImposteriser which gets into SingleThreadedPolicy's checkRunningOnTestThread method, but you're on the finalizer thread, not the test thread, so you get the thread-safety message.

    threads 
    opened by sf105 17
  • [GitHub Migration] Release Proces : Move to OSS Sonatype for deployment

    [GitHub Migration] Release Proces : Move to OSS Sonatype for deployment

    Currently we publish to Codehaus (via Wagon, using WebDAV). Yuk.

    Let's move to OSS Sonatype, it'll mean setting up a deployment PGP key for a more seamless experience. Not sure how to manage that (sharing the secret key between us).

    Here's some tips (taken from another project, so take with a pinch of salt).

    Links

    Publishing to Sonatype Summary

    As an abbreviated reminder, follow these steps.

    1. Having added the Sonatype parent to your POM.
        <parent>
            <groupId>org.sonatype.oss</groupId>
            <artifactId>oss-parent</artifactId>
        </parent>
    
    1. Having previously generated your PGP key, you may need to install it on the box you intend to deploy from. You will have to export it from the original keyring (where you first created the key pair) and install it along with the public key into the keyring on the machine you want to publish from.

      If you followed the steps in [Setting up PGP](https://docs.sonatype.org/displa y/Repository/How+To+Generate+PGP+Signatures+With+Maven) above, you will have published your public key to, lets say, hkp://pool.sks-keyservers.net.

    2. You should just be able to publish via Maven

      mvn clean deploy

    If you add the Maven PGP plugin to the pom.xml, it'll automatically sign the artifacts before publishing. You'll just need to enter your pass phrase as part of the build or install the keys into SSH.

    Releasing

    1. Having prepared a release (tagging etc) with the mvn release plugin.

      mvn release:clean mvn release:prepare

    2. you firstly, have to stage the artifacts with Sonatype.

      mvn release:perform

    3. This will upload to Sonatype's staging area where you can promote it through to a release via their GUI at https://oss.sonatype.org. Pick up the instructions for the GUI from the [User Guide](https://docs.sonaty pe.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-8.ReleaseIt).

    build 
    opened by tobyweston 11
  • Mocking some Java classes with ClassImposteriser in Java 8 causes IllegalArgumentException

    Mocking some Java classes with ClassImposteriser in Java 8 causes IllegalArgumentException

    If I try to mock a java.io.File using the ClassImposteriser, I get the following stack trace:

    java.lang.IllegalArgumentException: null
            at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
            at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
            at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
            at net.sf.cglib.proxy.BridgeMethodResolver.resolveAll(BridgeMethodResolver.java:61)
            at net.sf.cglib.proxy.Enhancer.emitMethods(Enhancer.java:911)
            at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:498)
            at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
            at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
            at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
            at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
            at org.jmock.lib.legacy.ClassImposteriser.proxyClass(ClassImposteriser.java:121)
            at org.jmock.lib.legacy.ClassImposteriser.imposterise(ClassImposteriser.java:66)
            at org.jmock.Mockery.mock(Mockery.java:148)
            at org.jmock.Mockery.mock(Mockery.java:124)
            at MockTest.testMock(MockTest.java:21)
    

    I'm using: Java 1.8.0_40 JUnit 4.12 JMock 2.8.1

    Trying to mock a java.util.Date does the same. If I use Java 1.7, it is OK. If I use JMock 2.6.0, it is OK.

    My test is:

    import java.io.File;
    
    import org.jmock.integration.junit4.JUnitRuleMockery;
    import org.jmock.lib.legacy.ClassImposteriser;
    import org.junit.Rule;
    import org.junit.Test;
    
    public class MockTest
    {
        @Rule
        public final JUnitRuleMockery _context = new JUnitRuleMockery()
        {
            {
                setImposteriser(ClassImposteriser.INSTANCE);
            }
        };
    
        @Test
        public void testMock()
        {
            _context.mock(File.class);
        }
    }
    

    My pom.xml is:

    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
    
        <version>1.00-SNAPSHOT</version>
        <groupId>test</groupId>
        <artifactId>my-project</artifactId>
        <packaging>jar</packaging>
    
        <build>
            <pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>3.3</version>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.18.1</version>
                    </plugin>
                </plugins>
            </pluginManagement>
    
            <plugins>
    
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
    
            </plugins> 
    
        </build>
    
        <dependencyManagement>
            <dependencies>
                <dependency>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                    <version>4.12</version>
                </dependency>
                <dependency>
                    <groupId>org.jmock</groupId>
                    <artifactId>jmock</artifactId>
                    <version>2.8.1</version>
                </dependency>
                <dependency>
                    <groupId>org.jmock</groupId>
                    <artifactId>jmock-junit4</artifactId>
                    <version>2.8.1</version>
                </dependency>
                <dependency>
                    <groupId>org.jmock</groupId>
                    <artifactId>jmock-legacy</artifactId>
                    <version>2.8.1</version>
                </dependency>
                <dependency>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                    <version>1.3</version>
                </dependency>
            </dependencies>
        </dependencyManagement>
    
        <dependencies>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jmock</groupId>
                <artifactId>jmock</artifactId>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jmock</groupId>
                <artifactId>jmock-junit4</artifactId>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jmock</groupId>
                <artifactId>jmock-legacy</artifactId>
                <scope>test</scope>
            </dependency>
        </dependencies>
    
    
    </project>
    
    compatibility 
    opened by jflecomte 9
  • Upgrade Beanshell to address CVE-2016-2510

    Upgrade Beanshell to address CVE-2016-2510

    update bsh:bsh 1.3.0 to org.apache-extras.beanshell:bsh v2.0b6 (or later)

    Note change of GroupID

    All versions of beanshell prior to 2.0b6 are vulnerable to CVE-2016-2510

    BeanShell (bsh) before 2.0b6, when included on the classpath by an application that uses Java serialization or XStream, allows remote attackers to execute arbitrary code via crafted serialized data, related to XThis.Handler.

    See also beanshell on github for 2016-02-18 Security update

    Additional reasons for update is that beanshell 1.3.0 has no license info, whereas 2.0b6 is Apache 2.0

    opened by msymons 8
  • Unable to use JMock 2.6.0 with Java 8

    Unable to use JMock 2.6.0 with Java 8

    Out of curiosity, tried to build an existing project (which uses 7) with Java 8 (source = 1.8, target=1.8) but I see many of these errors emitted by the Java 8 Compiler.

    error: reference to with is ambiguous  both method with(Matcher<Float>) in Expectations and method with(Matcher<Double>) in Expectations match
    
    opened by muminc 7
  • Support for partial mocking

    Support for partial mocking

    With the latest reanimation of JMock are there any plans to add new features to JMock like partial mocking, mocking of static methods or mocking of private methods??

    Especially partial mocking would be a great thing to have!

    opened by dpeger 6
  • Test failure with Java 11 caused by the removal of JAX-WS

    Test failure with Java 11 caused by the removal of JAX-WS

    Hi,

    JAX-WS is no longer part of Java 11 and this causes an error in ReturnDefaultCollectionTests:

    Tests run: 8, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.084 sec <<< FAILURE! - in org.jmock.test.unit.internal.ReturnDefaultCollectionTests
    imposterisesUnsupportedMapTypes(org.jmock.test.unit.internal.ReturnDefaultCollectionTests)  Time elapsed: 0.002 sec  <<< ERROR!
    java.lang.NoClassDefFoundError: javax/xml/ws/handler/LogicalMessageContext
            at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
            at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
            at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
            at org.jmock.test.unit.internal.ReturnDefaultCollectionTests.imposterisesUnsupportedMapTypes(ReturnDefaultCollectionTests.java:72)
    

    Adding an explicit test dependency on jaxws-api fixes this.

    opened by ebourg 6
  • jmock.org points to 2.6.1

    jmock.org points to 2.6.1

    Hi Jmock fits our usecase very well, and works like we want to.. But I am having a hard time convincing collegues to use a framework that seemingly are stale.. When I go to jmock.org it points at release 2.6.1 which are from 2013, however I can see that releases have been made 2017.. Mailing lists does not work either..

    So what can I do to help getting the website up to date and mailinglist up and working again?

    regards Nino

    opened by nmwael 6
  • Improvement for Expectations.ignoring

    Improvement for Expectations.ignoring

    Hi,

    considering mock objects, which are ignored via Expectations.ignoring(...):

    While methods, which return an array, will return an empty array when called, methods, which return a Collection or Map, will not return an empty Collection or Map, but an ignored Collection or Map. This leads to an inconsistent Colletion/Map which returns 0 on size() but false on isEmpty().

    I know, this is a special case, but I think the collection classes in java.util are so fundamental and used nearly everywhere, that it makes sense to return a consistent empty Collection/Map if a method of an ignored mock object has an according return type.

    stubs 
    opened by MichaelTamm 6
  • Return -1 as delay for removed elements in DeltaQueue

    Return -1 as delay for removed elements in DeltaQueue

    Guava's TimeoutFuture now always checks the delay of the ScheduledFuture before cancelling the task, which means that when we use it with DeterministicExecutor, it will always throw an exception before cancelling the task.

    opened by adambalogh 5
  • Mockery bleed over between tests.

    Mockery bleed over between tests.

    Before 2.6.x you could define your Mockery in the @Before method of a unit test, so that you had a new Mockery for every test and there was no chance of bleed over between the tests. The code might look something like:

    @RunWith(JMock.class)
    public class SomeTestClass {
    
        private Mockery context;
    
        @Before
        public void setUp() {
            context = new Mockery();
        }
    }
    

    Starting with 2.6.x, you need to define you Mockery before the @Before as a result of this change (https://github.com/jmock-developers/jmock-library/commit/27a0bd7e50a3cd82b26fc8ea947a65fd203088b7). So now you often have code that looks like:

    @RunWith(JMock.class)
    public class SomeTestClass {
    
        public static Mockery context;
    
        @BeforeClass
        public static void globalSetUp() {
            context = new Mockery();
        }
    }
    

    However, this causes mocked objects to persist between runs of the unit test, potentially resulting in errors like:

    a mock with name fullScreenFrame already exists
    java.lang.IllegalArgumentException: a mock with name fullScreenFrame already exists
        at org.jmock.Mockery.mock(Mockery.java:128)
        at org.jmock.Mockery.mock(Mockery.java:120)
    

    Wouldn't it be better to hook the JMock.mockeryOf(Test) code after the test has been setup (after @Before has been called)?

    As a work around, creating the Mockery in test's constructor avoids the bleed over. For example:

    @RunWith(JMock.class)
    public class SomeTestClass {
    
        private Mockery context;
    
        public SomeTestClass() {
             context = new Mockery();
        }
    }
    

    This was tested with JMock 2.8.3 and JUnit 4.11.

    opened by smccants 5
  • Guarantee reproducible builds

    Guarantee reproducible builds

    As suggested as in https://maven.apache.org/guides/mini/guide-configuring-plugins.html specify the version in the elements for each build plugins.

    Signed-off-by: Niels Cölle [email protected]

    opened by coelle 0
  • Bump maven-enforcer-plugin from 3.0.0-M2 to 3.0.0

    Bump maven-enforcer-plugin from 3.0.0-M2 to 3.0.0

    Bumps maven-enforcer-plugin from 3.0.0-M2 to 3.0.0.

    Commits
    • b1b2282 [maven-release-plugin] prepare release enforcer-3.0.0
    • 70de3ad Lock maven-jxr-plugin
    • da3f888 Fix JavaDoc and lock sisu-maven-plugin
    • 014253f update CI url
    • 5409be8 [MENFORCER-211] wildcard ignore in requireReleaseDeps
    • 335f26e [MENFORCER-364] requireFilesExist rule should be case sensitive
    • faaf5c1 [MENFORCER-280] Enforcer dependency convergence stumbles on selenium-java
    • ab53fd9 [MENFORCER-357] RequirePluginVersions not recognizing versions-from-properties
    • 1b8ca8f [MENFORCER-388] Extends RequirePluginVersions with banMavenDefaults
    • ca73329 [MENFORCER-359] RequirePluginVersions fails when versions are inherited
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 0
  • Bump byte-buddy from 1.10.9 to 1.11.9

    Bump byte-buddy from 1.10.9 to 1.11.9

    Bumps byte-buddy from 1.10.9 to 1.11.9.

    Release notes

    Sourced from byte-buddy's releases.

    Byte Buddy 1.11.9

    • Include jdk.reflect package in default ignore matcher.
    • Retain parameter names for constructor of Java record as it is done by javac.
    • Throw NoSuchTypeException on non-resolved types rather then IllegalStateException.
    • Weaken visibility checks for fields set by MethodCall.

    Byte Buddy 1.11.8

    • Fix package exposure for JavaDispatcher class when Byte Buddy is used as a module.

    Byte Buddy 1.11.7

    • Introduce a more complex error handler for Gradle builds in favor of strict mode.
    • Include method for reading all loaded Class values of a loaded dynamic type.
    • Include Byte Buddy version in module-info.
    • Fix package list in module-info.

    Byte Buddy 1.11.6

    • Add fallback for JavaDispatcher that works on Android and other platforms that do not support dynamic class definitions.
    • Make Gradle task dependency resolution more robust and configurable.
    • Update ASM and support Java 18 without experimental configuration.

    Byte Buddy 1.11.5

    • Remove AccessController API to replace with weaved access control via AccessControllerPlugin.

    Byte Buddy 1.11.4

    • Add constant for Java 18
    • Improve constructor resolution for Plugins.
    • Add convenience method for translating TypeDescription.Generic to a builder.
    • Add convenience method for resolving an annotation property from a property name.

    Byte Buddy 1.11.3

    • Introduce AccessControllerPlugin to weave use of AccessController only if available.
    • Fix use of incorrect type when chaining InvokeDynamic.
    • Better emulate visitation order of ASM when creating types.
    • Avoid writing duplicate entries for submitted subtypes in sealed types.
    • Better encapsulate JavaDispatcher utility.
    • Add frame padding to initialization handler when redefining or rebasing a class.
    • Do not assume that TypeVariables are AnnotatedElements to support Java 7 and earlier.

    Byte Buddy 1.11.2

    • Fixes resolution of array types for Java descriptors of JavaConstant.
    • Properly process Android's version string and avoid relying on the version string where possible.
    • Allow for self-calls when creating a MethodCall and identifying a method via a matcher.

    Byte Buddy 1.11.1

    • Add JNA based ClassInjector for use if JNA is already available.
    • Allow HashCodeEqualsPlugin to derive hash code from instrumented type rather then lowest type in hierarchy.
    • Retain this variable name for index 0 when using advice with remapped locals.
    • Rework AnnotationDescription for TypePool to mirror JVM behavior if annotation properties are changed inconsistently.
    • Add several StackManipulations for common operations.
    • Remove unwanted dependency to Instrumentation API from JavaModule type.

    ... (truncated)

    Changelog

    Sourced from byte-buddy's changelog.

    27. July 2021: version 1.11.9

    • Include jdk.reflect package in default ignore matcher.
    • Retain parameter names for constructor of Java record as it is done by javac.
    • Throw NoSuchTypeException on non-resolved types rather then IllegalStateException.
    • Weaken visibility checks for fields set by MethodCall.

    15. July 2021: version 1.11.8

    • Fix package exposure for JavaDispatcher class when Byte Buddy is used as a module.

    14. July 2021: version 1.11.7

    • Introduce a more complex error handler for Gradle builds in favor of strict mode.
    • Include method for reading all loaded Class values of a loaded dynamic type.
    • Include Byte Buddy version in module-info.
    • Fix package list in module-info.

    2. July 2021: version 1.11.6

    • Add fallback for JavaDispatcher that works on Android and other platforms that do not support dynamic class definitions.
    • Make Gradle task dependency resolution more robust and configurable.
    • Update ASM and support Java 18 without experimental configuration.

    19. June 2021: version 1.11.5

    • Remove AccessController API to replace with weaved access control via AccessControllerPlugin.

    19. June 2021: version 1.11.4

    • Add constant for Java 18
    • Improve constructor resolution for Plugins.
    • Add convenience method for translating TypeDescription.Generic to a builder.
    • Add convenience method for resolving an annotation property from a property name.

    18. June 2021: version 1.11.3

    • Introduce AccessControllerPlugin to weave use of AccessController only if available.
    • Fix use of incorrect type when chaining InvokeDynamic.
    • Better emulate visitation order of ASM when creating types.
    • Avoid writing duplicate entries for submitted subtypes in sealed types.
    • Better encapsulate JavaDispatcher utility.
    • Add frame padding to initialization handler when redefining or rebasing a class.
    • Do not assume that TypeVariables are AnnotatedElements to support Java 7 and earlier.

    11. June 2021: version 1.11.2

    • Fixes resolution of array types for Java descriptors of JavaConstant.
    • Properly process Android's version string and avoid relying on the version string where possible.
    • Allow for self-calls when creating a MethodCall and identifying a method via a matcher.

    ... (truncated)

    Commits
    • 52bfa03 [maven-release-plugin] prepare release byte-buddy-1.11.9
    • 033221c [release] Release new version
    • 9a3e7e2 Restrict constraint for field setting since field is always set on own instance.
    • 520339d Add specific exception type to indicate unresolved type to allow easier catch...
    • f82339e Remove bad comment refactoring and add description for use of internal name o...
    • da712db Retain parameter name for records to mimic OpenJDK behaviour.
    • d67c7f3 Include 'jdk.reflect' package in default ignore matcher.
    • b2ae24f Add release notes.
    • 1f45b78 [maven-release-plugin] prepare for next development iteration
    • ff69a57 [maven-release-plugin] prepare release byte-buddy-1.11.8
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 0
  • Will there ever be a new release?

    Will there ever be a new release?

    It's (again) more than 2 years since the latest release. Important issues are already fixed on master (e.g. commit https://github.com/jmock-developers/jmock-library/commit/dad8d62e1f10464ce0d36f3bcb011a1dfe86d58f).

    I'm wondering if this project is now finally retired after having returned from the dead already once or if we will see some updates at some point in time? Or at least a new release with the existing changes...

    @jmock-developers (@olibye, @tobyweston, @npryce, @sf105, @PASimmons)

    opened by dpeger 0
Releases(2.12.0)
dOOv (Domain Object Oriented Validation) a fluent API for type-safe bean validation and mapping

dOOv (Domain Object Oriented Validation) dOOv is a fluent API for typesafe domain model validation and mapping. It uses annotations, code generation a

dOOv 77 Nov 20, 2022
A simple java JSON deserializer that can convert a JSON into a java object in an easy way

JSavON A simple java JSON deserializer that can convert a JSON into a java object in an easy way. This library also provide a strong object convertion

null 0 Mar 18, 2022
High performance JVM JSON library

DSL-JSON library Fastest JVM (Java/Android/Scala/Kotlin) JSON library with advanced compile-time databinding support. Compatible with DSL Platform. Ja

New Generation Software Ltd 835 Jan 2, 2023
A Java serialization/deserialization library to convert Java Objects into JSON and back

Gson Gson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to a

Google 21.7k Jan 8, 2023
Screaming fast JSON parsing and serialization library for Android.

#LoganSquare The fastest JSON parsing and serializing library available for Android. Based on Jackson's streaming API, LoganSquare is able to consiste

BlueLine Labs 3.2k Dec 18, 2022
A modern JSON library for Kotlin and Java.

Moshi Moshi is a modern JSON library for Android and Java. It makes it easy to parse JSON into Java objects: String json = ...; Moshi moshi = new Mos

Square 8.7k Dec 31, 2022
JSON to JSON transformation library written in Java.

Jolt JSON to JSON transformation library written in Java where the "specification" for the transform is itself a JSON document. Useful For Transformin

Bazaarvoice 1.3k Dec 30, 2022
Sawmill is a JSON transformation Java library

Update: June 25, 2020 The 2.0 release of Sawmill introduces a breaking change to the GeoIpProcessor to comply with the updated license of the MaxMind

Logz.io 100 Jan 1, 2023
MapNeat is a JVM library written in Kotlin that provides an easy to use DSL (Domain Specific Language) for transforming JSON to JSON, XML to JSON, POJO to JSON in a declarative way.

MapNeat is a JVM library written in Kotlin that provides an easy to use DSL (Domain Specific Language) for transforming JSON to JSON, XML to JSON, POJ

Andrei Ciobanu 59 Sep 17, 2022
Genson a fast & modular Java <> Json library

Genson Genson is a complete json <-> java conversion library, providing full databinding, streaming and much more. Gensons main strengths? Easy to use

null 212 Jan 3, 2023
Lean JSON Library for Java, with a compact, elegant API.

mJson is an extremely lightweight Java JSON library with a very concise API. The source code is a single Java file. The license is Apache 2.0. Because

Borislav Iordanov 77 Dec 25, 2022
Open NFCSense Library

OpenNFCSense API Open-source API of NFCSense for the Processing programming environment (http://processing.org/). Please refer to the following workfl

Rong-Hao Liang 13 Jul 25, 2022
Android processing and secured library for managing SharedPreferences as key-value elements efficiently and structurally.

Memo Android processing and secured library for managing SharedPreferences as key-value elements efficiently and structurally. 1. Depend on our librar

ZeoFlow 18 Jun 30, 2022
A modern and lightweight library for working with email addresses in Java

JMail A modern, fast, zero-dependency library for working with email addresses and performing email address validation in Java. Built for Java 8 and u

Rohan Nagar 67 Dec 22, 2022
A wayfast raycast java library.

NOTE: Rayfast is still in development and is not completely stable api-wise. GridCasting likely will not change, however Area3d's may have some improv

EmortalMC 19 Dec 20, 2022
A JSON Transmission Protocol and an ORM Library for automatically providing APIs and Docs.

?? 零代码、热更新、全自动 ORM 库,后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构。 ?? A JSON Transmission Protocol and an ORM Library for automatically providing APIs and Docs.

Tencent 14.4k Dec 31, 2022
Configuration library based on annotation processing

net.cactusthorn.config The Java library with the goal of minimizing the code required to handle application configuration. Motivation The inspiring id

Alexei Khatskevich 7 Jan 8, 2023
A universal types-preserving Java serialization library that can convert arbitrary Java Objects into JSON and back

A universal types-preserving Java serialization library that can convert arbitrary Java Objects into JSON and back, with a transparent support of any kind of self-references and with a full Java 9 compatibility.

Andrey Mogilev 9 Dec 30, 2021
Simple, efficient Excel to POJO library for Java

ZeroCell ZeroCell provides a simple API for loading data from Excel sheets into Plain Old Java Objects (POJOs) using annotations to map columns from a

Credit Data CRB 68 Dec 8, 2022