Objenesis is a library dedicated to bypass the constructor when creating an object. On any JVM there is.

Related tags

Testing objenesis
Overview

Objenesis

Objenesis is a library dedicated to bypass the constructor when creating an object. On any JVM there is.

You can find the website and user documentation at objenesis.org.

Developer information

Project status

Build Status Maven Central

Environment setup

I'm using:

  • Maven 3.6.3
  • IntelliJ Ultimate 2021.1 (thanks to JetBrains for the license) (it should also work with Eclipse)

To configure your local workspace:

  • Import the Maven parent project to Eclipse or IntelliJ
  • Import the Eclipse formatting file objenesis-formatting.xml (usable in Eclipse or IntelliJ)

To build with Maven

There are two different levels of build.

Build without any active profile

It is a basic compilation of the application.

mvn install

Full build

This build will create the source and javadoc jars and run spotbugs.

mvn install -Pfull

To run special builds

Run the Android TCK

  • Install the Android SDK (brew cask install android-sdk)
  • Install platform-tools and build-tools using the sdkmanager (sdkmanager "platform-tools" "build-tools")
  • Add an ANDROID_HOME to target the Android SDK (export ANDROID_HOME=$(realpath $(echo "$(dirname $(readlink $(which sdkmanager)))/../..")))
  • Configure a device (real or simulated) and launch it (use API 26, after that it asks for a signature, that isn't supported yet)
  • Activate the debug mode if it's a real device
  • mvn package -Pandroid

Run the benchmarks

mvn package -Pbenchmark
cd benchmark
./launch.sh

Generate the website

mvn package -Pwebsite

To update the versions

  • mvn versions:set -DnewVersion=X.Y -Pall
  • mvn versions:commit -Pall if everything is ok, mvn versions:revert -Pall otherwise

Configure to deploy to the Sonatype maven repository

  • You will first need to add something like this to your settings.xml
<servers>
   <server>
      <id>ossrhid>
      <username>sonatypeuserusername>
      <password>sonatypepasswordpassword>
   server>
servers>
  • Then follow the instructions from the site below to create your key to sign the deployed items

To check dependencies and plugins versions

mvn versions:display-dependency-updates versions:display-plugin-updates -Pall

To upgrade the Maven wrapper

mvn -N io.takari:maven:wrapper -Dmaven=3.6.3

To update the license

mvn validate license:format -Pall

To release

  • Add the release notes in website/site/content/notes.html You use this code to generate it
Version $version ($(date '+%Y-%m-%d'))" echo echo "
    " curl -s "https://api.github.com/repos/easymock/objenesis/issues?milestone=${milestone}&state=all" | jq -r '.[] | "
  • " + .title + " (#" + (.number|tostring) + ")
  • "' echo "
"">
# Get the milestone matching the version
version=(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | cut -d'-' -f1)
milestone=$(curl -s "https://api.github.com/repos/easymock/objenesis/milestones" | jq ".[] | select(.title==\"$version\") | .number")
echo "

Version $version ($(date '+%Y-%m-%d'))

"
echo echo "
    " curl -s "https://api.github.com/repos/easymock/objenesis/issues?milestone=${milestone}&state=all" | jq -r '.[] | "
  • " + .title + " (#" + (.number|tostring) + ")
  • "'
    echo "
"
  • Launch an Android device (virtual or physical)
  • Launch ./deploy.sh
  • Answer the questions (normally, just acknowledge the proposed default)
  • Follow the instructions

If something fails, and you need to rollback a bit, the following commands might help:

mvn release:rollback -Pall
git tag -d $version
git push origin :refs/tags/$version
git reset --hard HEAD~2

If you find something went wrong you can drop the staging repository with mvn nexus-staging:drop.

Deploy the website

  • Make sure the pom is at the version you want to release
  • Launch ./deploy-website.sh
Comments
  • another possible and portable way to instantiate a class

    another possible and portable way to instantiate a class

    Original issue 20 created by henri-tremblay on 2013-08-16T08:01:07.000Z:

    If the original class is not final you can create a class that extends it, creating direct JVM byte-code, and loading the created class. Then creating an instance of the extended class will invoke the constructor of the extending class, but since the JVM code is generated calling the superconstructor can be skipped (simply not generating the code into the constructor that invokes super).

    You may perhaps even create the extending class if the original class is final accessing the original class object already loaded and altering the "final" modifier using reflection.

    opened by henri-tremblay 15
  • App Engine Java 8 Runtime and Objenesis

    App Engine Java 8 Runtime and Objenesis

    I'm part of Google Cloud engineering team, and I'm looking into making sure that libraries relying on SpringBoot and Objenesis could run seamlessly on Google App Engine Java 8 runtime - our new runtime which is in Alpha at the moment.

    We noticed that the reason that GAE is only partially supported by Objenesis is due to security restrictions. In Java8 runtime the security restrictions are lifted off. Thus, it should be possible for Objenesis do what needs to be done when running within this new runtime.

    As an example, we recently noticed that Springboot relies on ability to create Proxy objects for classes with no default constructor via Objenesis. However, Objenesis will detect GAE environment, and will use an instantiator that expects a default constructor. In GAE Java8 the use of this instantiator should no longer be necessary.

    enhancement 
    opened by ifigotin 12
  • Add Dalvik VM support

    Add Dalvik VM support

    Original issue 13 created by henri-tremblay on 2010-11-01T07:21:24.000Z:

    Objenesis should support Android's VM, Dalvik.

    Instantiating objects in it can be done with the technique described here: http://stackoverflow.com/questions/3121515/is-it-possible-to-bypass-constructors-when-instantiating-objects-in-android which in fact is already quite similar to what objenesis uses in other VMs.

    I'm willing to try to implement it if you agree.

    Thanks

    Type-Enhancement Milestone-1.3 
    opened by henri-tremblay 11
  • Objenesis source does not build correctly

    Objenesis source does not build correctly

    Original issue 16 created by henri-tremblay on 2012-09-24T21:55:34.000Z:

    What steps will reproduce the problem?

    1. Check out source using "svn checkout http://objenesis.googlecode.com/svn/trunk/ objenesis-read-only"
    2. Using Terminal, issue this command at the top of objenesis-read-only> mvn clean install

    What is the expected output? What do you see instead? I expect the project to build successfully and install the artifacts in my local maven repo.

    Instead, I get a bunch of errors. See below for output.

    What version of the product are you using? On what operating system? Maven 3.0.3, JDK 1.6.0_35, Mac OS X 10.8.2

    Please provide any additional information below.

    EP-ML-0235:objenesis-read-only mbishop$ mvn clean install [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for org.objenesis:objenesis:jar:1.2 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ org.objenesis:objenesis-parent:1.2, /Users/mbishop/Projects/objenesis-read-only/pom.xml, line 138, column 15 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ org.objenesis:objenesis-parent:1.2, /Users/mbishop/Projects/objenesis-read-only/pom.xml, line 105, column 15 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-site-plugin is missing. @ org.objenesis:objenesis-parent:1.2, /Users/mbishop/Projects/objenesis-read-only/pom.xml, line 150, column 15 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ org.objenesis:objenesis-parent:1.2, /Users/mbishop/Projects/objenesis-read-only/pom.xml, line 124, column 15 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ org.objenesis:objenesis-parent:1.2, /Users/mbishop/Projects/objenesis-read-only/pom.xml, line 112, column 15 [WARNING] [WARNING] Some problems were encountered while building the effective model for org.objenesis:objenesis-tck:jar:1.2 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ line 141, column 15 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ org.objenesis:objenesis-parent:1.2, /Users/mbishop/Projects/objenesis-read-only/pom.xml, line 105, column 15 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-site-plugin is missing. @ org.objenesis:objenesis-parent:1.2, /Users/mbishop/Projects/objenesis-read-only/pom.xml, line 150, column 15 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 117, column 15 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ org.objenesis:objenesis-parent:1.2, /Users/mbishop/Projects/objenesis-read-only/pom.xml, line 112, column 15 [WARNING] [WARNING] Some problems were encountered while building the effective model for org.objenesis:objenesis-parent:pom:1.2 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ line 138, column 15 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 105, column 15 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-site-plugin is missing. @ line 150, column 15 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 124, column 15 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ line 112, column 15 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] Objenesis parent project [INFO] Objenesis [INFO] Objenesis TCK [INFO]
    [INFO] ------------------------------------------------------------------------ [INFO] Building Objenesis parent project 1.2 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ objenesis-parent --- [INFO] [INFO] >>> maven-source-plugin:2.2:jar (attach-sources) @ objenesis-parent >>> [INFO] [INFO] <<< maven-source-plugin:2.2:jar (attach-sources) @ objenesis-parent <<< [INFO] [INFO] --- maven-source-plugin:2.2:jar (attach-sources) @ objenesis-parent --- [INFO] [INFO] --- maven-javadoc-plugin:2.9:jar (attach-javadocs) @ objenesis-parent --- [INFO] Not executing Javadoc as the project is not a Java classpath-capable package [INFO] [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ objenesis-parent --- [INFO] Installing /Users/mbishop/Projects/objenesis-read-only/pom.xml to /Users/mbishop/.m2/repository/org/objenesis/objenesis-parent/1.2/objenesis-parent-1.2.pom [INFO]
    [INFO] ------------------------------------------------------------------------ [INFO] Building Objenesis 1.2 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ objenesis --- [INFO] Deleting /Users/mbishop/Projects/objenesis-read-only/main/target [INFO] [INFO] --- maven-timestamp-plugin:1.0:create (year) @ objenesis --- [INFO] [INFO] --- maven-remote-resources-plugin:1.0:process (default) @ objenesis --- [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. [INFO] Setting property: velocimacro.messages.on => 'false'. [INFO] Setting property: resource.loader => 'classpath'. [INFO] Setting property: resource.manager.logwhenfound => 'false'. [INFO] [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ objenesis --- [WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] Copying 2 resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ objenesis --- [WARNING] File encoding has not been set, using platform encoding MacRoman, i.e. build is platform dependent! [INFO] Compiling 30 source files to /Users/mbishop/Projects/objenesis-read-only/main/target/classes [INFO] [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ objenesis --- [WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] Copying 2 resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ objenesis --- [WARNING] File encoding has not been set, using platform encoding MacRoman, i.e. build is platform dependent! [INFO] Compiling 3 source files to /Users/mbishop/Projects/objenesis-read-only/main/target/test-classes [INFO] [INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ objenesis --- [INFO] Surefire report directory: /Users/mbishop/Projects/objenesis-read-only/main/target/surefire-reports


    T E S T S

    Running org.objenesis.ObjenesisExceptionTest Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.014 sec Running org.objenesis.ObjenesisTest Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 sec Running org.objenesis.SerializingInstantiatorTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec

    Results :

    Tests run: 9, Failures: 0, Errors: 0, Skipped: 0

    [INFO] [INFO] --- maven-bundle-plugin:2.3.7:manifest (bundle-manifest) @ objenesis --- [INFO] [INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ objenesis --- [INFO] Adding existing MANIFEST to archive. Found under: /Users/mbishop/Projects/objenesis-read-only/main/target/classes/META-INF/MANIFEST.MF [INFO] Building jar: /Users/mbishop/Projects/objenesis-read-only/main/target/objenesis-1.2.jar [INFO] [INFO] >>> maven-source-plugin:2.2:jar (attach-sources) @ objenesis >>> [INFO] [INFO] --- maven-timestamp-plugin:1.0:create (year) @ objenesis --- [INFO] [INFO] <<< maven-source-plugin:2.2:jar (attach-sources) @ objenesis <<< [INFO] [INFO] --- maven-source-plugin:2.2:jar (attach-sources) @ objenesis --- [INFO] Building jar: /Users/mbishop/Projects/objenesis-read-only/main/target/objenesis-1.2-sources.jar [INFO] [INFO] --- maven-javadoc-plugin:2.9:jar (attach-javadocs) @ objenesis --- [WARNING] Source files encoding has not been set, using platform encoding MacRoman, i.e. build is platform dependent! [INFO] Loading source files for package org.objenesis.instantiator.basic... Loading source files for package org.objenesis.instantiator.gcj... Loading source files for package org.objenesis.instantiator.jrockit... Loading source files for package org.objenesis.instantiator... Loading source files for package org.objenesis.instantiator.perc... Loading source files for package org.objenesis.instantiator.sun... Loading source files for package org.objenesis... Loading source files for package org.objenesis.strategy... Constructing Javadoc information... Standard Doclet version 1.6.0_35 Building tree for all the packages and classes... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/basic//AccessibleInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/basic//ConstructorInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/basic//NewInstanceInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/basic//ObjectInputStreamInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/basic//ObjectStreamClassInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/gcj//GCJInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/gcj//GCJInstantiatorBase.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/gcj//GCJSerializationInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/jrockit//JRockit131Instantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/jrockit//JRockitLegacyInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator//NullInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator//ObjectInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator//SerializationInstantiatorHelper.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/perc//PercInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/perc//PercSerializationInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/sun//Sun13Instantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/sun//Sun13InstantiatorBase.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/sun//Sun13SerializationInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/sun//SunReflectionFactoryInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/sun//SunReflectionFactorySerializationInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis//Objenesis.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis//ObjenesisBase.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis//ObjenesisException.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis//ObjenesisHelper.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis//ObjenesisSerializer.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis//ObjenesisStd.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/strategy//BaseInstantiatorStrategy.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/strategy//InstantiatorStrategy.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/strategy//SerializingInstantiatorStrategy.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/strategy//StdInstantiatorStrategy.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/overview-frame.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis//package-frame.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis//package-summary.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis//package-tree.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator//package-frame.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator//package-summary.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator//package-tree.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/basic//package-frame.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/basic//package-summary.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/basic//package-tree.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/gcj//package-frame.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/gcj//package-summary.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/gcj//package-tree.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/jrockit//package-frame.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/jrockit//package-summary.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/jrockit//package-tree.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/perc//package-frame.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/perc//package-summary.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/perc//package-tree.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/sun//package-frame.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/sun//package-summary.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/sun//package-tree.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/strategy//package-frame.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/strategy//package-summary.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/strategy//package-tree.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/constant-values.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/serialized-form.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/basic//class-use/ObjectStreamClassInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/basic//class-use/ObjectInputStreamInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/basic//class-use/NewInstanceInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/basic//class-use/ConstructorInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/basic//class-use/AccessibleInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/gcj//class-use/GCJSerializationInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/gcj//class-use/GCJInstantiatorBase.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/gcj//class-use/GCJInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/jrockit//class-use/JRockitLegacyInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/jrockit//class-use/JRockit131Instantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator//class-use/SerializationInstantiatorHelper.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator//class-use/ObjectInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator//class-use/NullInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/perc//class-use/PercSerializationInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/perc//class-use/PercInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/sun//class-use/SunReflectionFactorySerializationInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/sun//class-use/SunReflectionFactoryInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/sun//class-use/Sun13SerializationInstantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/sun//class-use/Sun13InstantiatorBase.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/sun//class-use/Sun13Instantiator.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis//class-use/ObjenesisStd.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis//class-use/ObjenesisSerializer.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis//class-use/ObjenesisHelper.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis//class-use/ObjenesisException.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis//class-use/ObjenesisBase.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis//class-use/Objenesis.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/strategy//class-use/StdInstantiatorStrategy.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/strategy//class-use/SerializingInstantiatorStrategy.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/strategy//class-use/InstantiatorStrategy.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/strategy//class-use/BaseInstantiatorStrategy.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis//package-use.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator//package-use.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/basic//package-use.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/gcj//package-use.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/jrockit//package-use.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/perc//package-use.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/instantiator/sun//package-use.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/org/objenesis/strategy//package-use.html... Building index for all the packages and classes... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/overview-tree.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/index-all.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/deprecated-list.html... Building index for all classes... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/allclasses-frame.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/allclasses-noframe.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/index.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/overview-summary.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/help-doc.html... Generating /Users/mbishop/Projects/objenesis-read-only/main/target/apidocs/stylesheet.css... [INFO] Building jar: /Users/mbishop/Projects/objenesis-read-only/main/target/objenesis-1.2-javadoc.jar [INFO] [INFO] --- maven-license-plugin:1.4.0:check (check) @ objenesis --- [INFO] Checking licenses... [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/assembly.xml [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/instantiator/basic/AccessibleInstantiator.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/instantiator/basic/ConstructorInstantiator.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/instantiator/basic/NewInstanceInstantiator.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/instantiator/basic/ObjectInputStreamInstantiator.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/instantiator/basic/ObjectStreamClassInstantiator.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/instantiator/gcj/GCJInstantiator.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/instantiator/gcj/GCJInstantiatorBase.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/instantiator/gcj/GCJSerializationInstantiator.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/instantiator/NullInstantiator.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/instantiator/ObjectInstantiator.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/instantiator/perc/PercInstantiator.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/instantiator/perc/PercSerializationInstantiator.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/instantiator/SerializationInstantiatorHelper.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/instantiator/sun/Sun13Instantiator.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/instantiator/sun/Sun13InstantiatorBase.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/instantiator/sun/Sun13SerializationInstantiator.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/instantiator/sun/SunReflectionFactoryInstantiator.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/instantiator/sun/SunReflectionFactorySerializationInstantiator.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/Objenesis.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/ObjenesisBase.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/ObjenesisException.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/ObjenesisHelper.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/ObjenesisSerializer.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/ObjenesisStd.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/strategy/BaseInstantiatorStrategy.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/strategy/InstantiatorStrategy.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/strategy/SerializingInstantiatorStrategy.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/src/org/objenesis/strategy/StdInstantiatorStrategy.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/test/org/objenesis/ObjenesisExceptionTest.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/test/org/objenesis/ObjenesisTest.java [INFO] Missing header in: /Users/mbishop/Projects/objenesis-read-only/main/test/org/objenesis/SerializingInstantiatorTest.java [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Objenesis parent project .......................... SUCCESS [1.695s] [INFO] Objenesis ......................................... FAILURE [7.398s] [INFO] Objenesis TCK ..................................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 10.015s [INFO] Finished at: Mon Sep 24 14:55:13 PDT 2012 [INFO] Final Memory: 19M/81M [INFO] ------------------------------------------------------------------------ [WARNING] The requested profile "ep-defaults" could not be activated because it does not exist. [WARNING] The requested profile "tomcat-developer" could not be activated because it does not exist. [WARNING] The requested profile "ep-developer" could not be activated because it does not exist. [ERROR] Failed to execute goal com.google.code.maven-license-plugin:maven-license-plugin:1.4.0:check (check) on project objenesis: Some files do not have the expected license header -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :objenesis

    Type-Defect Milestone-1.3 
    opened by henri-tremblay 10
  • Unnecessary lock contention issues in ObjectInstantiator caching

    Unnecessary lock contention issues in ObjectInstantiator caching

    Original issue 14 created by henri-tremblay on 2010-11-04T14:18:34.000Z:

    What steps will reproduce the problem?

    1. Profile an application that calls ObjenesisBase#getInstantiatorOf(Class clazz) several times across threads and observe high degree of lock contention on that call.

    What is the expected output? What do you see instead? Expected behavior is, once cached, the act of getting the instantiator should be lock-less.

    What version of the product are you using? On what operating system? 1.2 (the patch is for master)

    Please provide any additional information below. The patch attached fixes this problem on trunk(it also cleanly applies on the 1.2 tag). Its a git format-patch generated patch file, if working directly with svn, 'patch -p1 -i <file-patch>' can be used to apply it.

    Type-Defect Milestone-1.4 
    opened by henri-tremblay 10
  • Please OSGi-ify the objenesis jar.

    Please OSGi-ify the objenesis jar.

    Original issue 7 created by henri-tremblay on 2009-03-29T14:31:04.000Z:

    What steps will reproduce the problem?

    1. looking at the jar manifest

    What is the expected output? What do you see instead? I expect to see OSGi manifest entries.

    Please provide any additional information below.

    Please OSGi-ify the objenesis jar. This would eliminate the need for 3rd-party objenesis bundles.

    An example of the objenesis jar with OSGi manifest entries can be seen here: http://www.springsource.com/repository/app/bundle/version/detail?name=com.springsource.org.objenesis&version=1.0.0

    Also, I see that objenesis relies on JUnit for testing. Please consider voting/commenting: http://sourceforge.net/tracker/?func=detail&aid=2720888&group_id=15278&atid=365278

    Type-Enhancement Priority-Medium Milestone-1.2 
    opened by henri-tremblay 9
  • Please remove the hidden .mvn directory from the source tarball

    Please remove the hidden .mvn directory from the source tarball

    Hi,

    please consider to remove the hidden .mvn/wrapper directory and the included jar file from the source releases. It is actually not needed to build objenesis and comes without source and thus has to be removed when it is distributed by Debian or other distributions.

    bug 
    opened by apoleon 7
  • Objenesis needs to import sun.reflect package in OSGi Manifest

    Objenesis needs to import sun.reflect package in OSGi Manifest

    Original issue 15 created by henri-tremblay on 2012-09-24T21:10:37.000Z:

    The SunReflectionFactorySerializationInstantiator class directly uses sun.reflect.ReflectionFactory, which is fine. However the bundle manifest headers should explicitly import this package.

    It may have to do with how the maven plugin is generating the headers. The version used (2.0.0) is quite old now. I will try a newer version and see if it generates better headers.

    Type-Defect Milestone-1.3 
    opened by henri-tremblay 7
  • Objenesis can't work on the Google Apps Engine

    Objenesis can't work on the Google Apps Engine

    Original issue 12 created by henri-tremblay on 2010-10-09T10:34:41.000Z:

    Trying to use objenesis on GAE the following exception is thrown

    java.lang.NoClassDefFoundError: sun.reflect.ReflectionFactory is a restricted class. Please see the Google App Engine developer's guide for more details. at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51) at org.objenesis.instantiator.sun.SunReflectionFactoryInstantiator.<init>(SunReflectionFactoryInstantiator.java:40) at org.objenesis.strategy.StdInstantiatorStrategy.newInstantiatorOf(StdInstantiatorStrategy.java:85) at org.objenesis.ObjenesisBase.getInstantiatorOf(ObjenesisBase.java:90) at org.objenesis.ObjenesisBase.newInstance(ObjenesisBase.java:73)

    Type-Enhancement 
    opened by henri-tremblay 7
  • Support Apache Harmony

    Support Apache Harmony

    Original issue 11 created by henri-tremblay on 2010-07-29T21:51:15.000Z:

    What steps will reproduce the problem?

    1. Use Objenesis in Apache Harmony, e.g. using Easymock.

    What is the expected output? What do you see instead? Expect to be able to create mocks. Instead, the following stacktrace is provided: java.lang.NoClassDefFoundError: sun/reflect/ReflectionFactory at org.objenesis.instantiator.sun.SunReflectionFactoryInstantiator.<init>(SunReflectionFactoryInstantiator.java:40) at org.objenesis.strategy.StdInstantiatorStrategy.newInstantiatorOf(StdInstantiatorStrategy.java:85) at org.objenesis.ObjenesisBase.getInstantiatorOf(ObjenesisBase.java:90) at org.objenesis.ObjenesisBase.newInstance(ObjenesisBase.java:73) at org.objenesis.ObjenesisHelper.newInstance(ObjenesisHelper.java:43) at org.easymock.internal.ObjenesisClassInstantiator.newInstance(ObjenesisClassInstantiator.java:27) at org.easymock.internal.ClassProxyFactory.createProxy(ClassProxyFactory.java:233) at org.easymock.internal.MocksControl.createMock(MocksControl.java:60)

    What version of the product are you using? On what operating system? Objenesis 1.2 Harmony rev 713673 Easymock 3.0

    Please provide any additional information below. Looking at StdInstantiatorStrategy, using Harmony it would fall back on SunReflectionFactoryInstantiator which will not be supported as Harmony does not contain any com.sun classes.

    Type-Enhancement Milestone-1.3 
    opened by henri-tremblay 7
  • Android18Instantiator Fails On Android O

    Android18Instantiator Fails On Android O

    It seems that Android18Instantiator does not work on Android O beta (SDK level 25). Looks like Android dropped support for ObjectStreamClass.getConstructorId

    Caused by java.lang.UnsupportedOperationException: ObjectStreamClass.getConstructorId(Class<?>) is not supported on SDK 25
           at java.io.ObjectStreamClass.getConstructorId(ObjectStreamClass.java:2294)
           at java.lang.reflect.Method.invoke(Method.java)
           at org.objenesis.instantiator.android.Android18Instantiator.findConstructorIdForJavaLangObjectConstructor(Android18Instantiator.java:72)
           at org.objenesis.instantiator.android.Android18Instantiator.(Android18Instantiator.java:39)
           at org.objenesis.strategy.StdInstantiatorStrategy.newInstantiatorOf(StdInstantiatorStrategy.java:96)
    ...
    
    enhancement 
    opened by erandagan 6
  • Class not found error when using Objenesis in a Java 9 module

    Class not found error when using Objenesis in a Java 9 module

    This issue came up while investigating https://github.com/jqno/equalsverifier/issues/746.

    To summarise, using Objenesis in a Java 9 module results in ClassNotFoundException: sun.reflect.ReflectionFactory

    Reproducible sample: https://github.com/armandino/objenesis-java9-module-bug

    opened by armandino 0
  • Bump logback-classic from 1.3.1 to 1.4.5

    Bump logback-classic from 1.3.1 to 1.4.5

    Bumps logback-classic from 1.3.1 to 1.4.5.

    Commits
    • 34a6efc preparfe release 1.4.5
    • 0d3ac63 fix LOGBACK-1698, [Nested appenders are not allowed] warning using SiftingApp...
    • a64b8d4 make jakarta.servlet-api as both provided and optional
    • 114b3de bump slf4j version
    • 1df6662 fix LOGBACK-1706
    • ea165fb fix LOGBACK-1703
    • 9e07bd0 fix LOGBACK-1703
    • a871e9f minor edits in README.md
    • 7dc0ce5 Merge pull request #605 from Zardoz89/patch-1
    • 7130dfe README.md MUST inform about Java & Jackarta EE support
    • 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)
    dependencies java 
    opened by dependabot[bot] 0
  • Can't create Lambdas

    Can't create Lambdas

    Hi. It seems Objenesis can't create instances of lambda classes.

    Objenesis 3.2, JDK 1.8 (64)

    @Test
    public void testObjenesisLambdaField() throws NoSuchFieldException {
        Predicate lambda = (Object o) -> false;
        Class clazz = lambda.getClass();
        Object newLambda = new ObjenesisStd().newInstance(clazz);
    }
    

    java.lang.NoClassDefFoundError: reflection/TestReflectiveDeepCopy$$Lambda$239/1990451863

    at sun.reflect.GeneratedSerializationConstructorAccessor1.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.objenesis.instantiator.sun.SunReflectionFactoryInstantiator.newInstance(SunReflectionFactoryInstantiator.java:48)
    at org.objenesis.ObjenesisBase.newInstance(ObjenesisBase.java:73)
    at trademonkey.reflection.TestReflectiveDeepCopy.testObjenesisLambdaField(TestReflectiveDeepCopy.java:97)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:628)
    at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:117)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:184)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:180)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:127)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
    at java.util.ArrayList.forEach(ArrayList.java:1257)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
    at java.util.ArrayList.forEach(ArrayList.java:1257)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:229)
    at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:197)
    at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:211)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:191)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128)
    at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:69)
    at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
    

    Caused by: java.lang.ClassNotFoundException: trademonkey.reflection.TestReflectiveDeepCopy$$Lambda$239.1990451863 at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ... 56 more

    opened by Barney-x1 1
  • Initial Gradle setup

    Initial Gradle setup

    To build and run non-android tests: ./gradlew build

    To run the Android TCK test: (addresses #78) ./gradlew connectedAndroidTest

    If you change minSdk to 21 and run ./gradlew connectedAndroidTest the build will fail. (see #79) https://github.com/yogurtearl/objenesis/blob/b6ee12c618897150d34651d28b6de479c8dcad7d/tck-android/build.gradle.kts#L29

    With error:

    D8: com.android.tools.r8.a: MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26)
    
    opened by yogurtearl 5
  • Objenesis Java 11 compatibility issues

    Objenesis Java 11 compatibility issues

    Running a jdeps scan from a JDK 11 like:

    <java_home>\bin\jdeps -jdkinternals objenesis-2.6.jar

    , shows some references to sun.misc.Unsafe:

    org.objenesis.instantiator.sun.UnsafeFactoryInstantiator -> sun.misc.Unsafe JDK internal API (jdk.unsupported) org.objenesis.instantiator.util.ClassDefinitionUtils -> sun.misc.Unsafe JDK internal API (jdk.unsupported) org.objenesis.instantiator.util.UnsafeUtils -> sun.misc.Unsafe

    Which are present even in the newest version of the library - 3.0.1. Are there any plans for these to be removed/replaced in a newer version?

    Thanks, Ivo

    enhancement 
    opened by ivo-atanasov 8
Releases(3.3)
Owner
EasyMock
EasyMock
🎉Ultimate test automation for testing any application on any platform

boyka-java Ultimate test automation for testing any application on any platform boyka-java Setup Write conventional commits 1.

Wasiq Bhamla 52 Dec 30, 2022
🔌 Simple library to manipulate HTTP requests/responses and capture network logs made by the browser using selenium tests without using any proxies

Simple library to manipulate HTTP requests and responses, capture the network logs made by the browser using selenium tests without using any proxies

Sudharsan Selvaraj 29 Oct 23, 2022
MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Rub

MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby. MockServer also includes a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding).

Mock-Server 4k Jan 4, 2023
High-level contextual steps in your tests for any reporting tool

Xteps High-level contextual steps in your tests for any reporting tool. License Maven Central Javadoc Xteps Xteps Allure Xteps ReportPortal How to use

Evgenii Plugatar 8 Dec 11, 2022
Initial example of Object Oriented Programming, with Java

Programación - Alumnos Clase Ejemplo inicial de Programación Orientada a Objetos, con Java. Nuestra primeras clases, con usos, abusos, y algunos tests

José Luis González Sánchez 13 Dec 27, 2022
An e-commerce automation project of Selenium TestNG using Page Object Model

Selenium-POM-TestNG Prerequisites Install jdk 8 or any LTS version Configure JAVA_HOME and GRADLE_HOME Download Allure 2.17.2 and configure environmen

Asif Shahriar 2 Aug 4, 2022
Selenium Webdriver: Page Object Model (POM) With Page Factory

Prepare Web Testing Instance or Environment Selenium Webdriver: Page Object Model (POM) With Page Factory Prerequisite software Download & Install JDK

Hiro Mia 14 Oct 18, 2022
Cucumber for the JVM

Cucumber JVM Cucumber-JVM is a pure Java implementation of Cucumber. You can run it with the tool of your choice. Cucumber-JVM also integrates with al

Cucumber 2.5k Jan 5, 2023
JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.

pact-jvm JVM implementation of the consumer driven contract library pact. From the Ruby Pact website: Define a pact between service consumers and prov

Pact Foundation 962 Dec 31, 2022
Extensions/Plugins for JVM test frameworks

Jexter Extensions/Plugins for JVM test frameworks (JUnit 4, JUnit 5, ...) Get Jexter Binaries are available from Maven Central. Group Artifact Latest

Thundra 20 Jul 26, 2022
JVM version of Pact Enables consumer driven contract testing

JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.

Pact Foundation 961 Dec 30, 2022
State of the art mutation testing system for the JVM

Pitest (aka PIT) is a state of the art mutation testing system for Java and the JVM. Read all about it at http://pitest.org Releases 1.7.3 #952 Mutate

Henry Coles 1.5k Dec 26, 2022
This repository includes selenium tests examples using cucumber-jvm framework.

Cucumber Selenium Tests This repository includes cucumber selenium tests examples using wikipedia.org. Run tests To run tests on your local machine, y

Denys Vozniuk 3 Nov 27, 2022
Library that allows tests written in Java to follow the BDD style introduced by RSpec and Jasmine.

J8Spec J8Spec is a library that allows tests written in Java to follow the BDD style introduced by RSpec and Jasmine. More details here: j8spec.github

J8Spec 45 Feb 17, 2022
Serenity BDD is a test automation library designed to make writing automated acceptance tests easier, and more fun.

That feeling you get when you know you can trust your tests Serenity BDD is a library designed to make writing automated acceptance tests easier, and

Serenity BDD 654 Dec 28, 2022
A library for setting up Java objects as test data.

Beanmother Beanmother helps to create various objects, simple and complex, super easily with fixtures for testing. It encourages developers to write m

Jaehyun Shin 113 Nov 7, 2022
A Java architecture test library, to specify and assert architecture rules in plain Java

ArchUnit is a free, simple and extensible library for checking the architecture of your Java code. That is, ArchUnit can check dependencies between pa

TNG Technology Consulting GmbH 2.5k Jan 2, 2023
Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.

Testcontainers Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium we

null 6.7k Jan 9, 2023
AssertJ is a library providing easy to use rich typed assertions

AssertJ - Fluent assertions for java AssertJ provides a rich and intuitive set of strongly-typed assertions to use for unit testing (with JUnit, TestN

AssertJ 2.3k Dec 30, 2022