From 25c81cd8a3545d0fcae194c1766b3ece24095c3a Mon Sep 17 00:00:00 2001 From: xzl Date: Fri, 19 Apr 2024 18:36:55 +0800 Subject: [PATCH] feat: update objenesis to 3.3 Java library to instantiate a new object of a particular class Issue: https://github.com/deepin-community/sig-deepin-sysdev-team/issues/547 Log: update repo --- .gitignore | 16 ---- .idea/copyright/Objenesis.xml | 6 ++ .idea/copyright/profiles_settings.xml | 3 + .travis.yml | 8 -- README.md | 24 ++++-- SupportedJVMs.md | 4 +- benchmark/launch.sh | 2 +- benchmark/pom.xml | 12 +-- .../benchmark/ConcurrentGetInstantiator.java | 27 ++++--- .../org/objenesis/benchmark/CreateObject.java | 2 +- debian/changelog | 22 +++++ debian/control | 29 +------ debian/copyright | 4 +- debian/libobjenesis-java-doc.doc-base.api | 10 --- debian/libobjenesis-java-doc.install | 1 - debian/maven.properties | 1 + deploy.sh | 5 +- exotic/pom.xml | 4 +- .../exotic/MagicInstantiator.java | 2 +- .../exotic/ProxyingInstantiator.java | 2 +- .../exotic/util/ClassDefinitionUtils.java | 2 +- .../exotic/util/DefineClassHelper.java | 2 +- .../instantiator/exotic/ClassReader.java | 14 +++- .../exotic/test/MagicInstantiatorTest.java | 12 +-- .../exotic/test/ProxyingInstantiatorTest.java | 10 +-- .../exotic/util/ClassDefinitionUtilsTest.java | 10 +-- .../exotic/util/ClassUtilsTest.java | 14 ++-- gae/pom.xml | 6 +- .../java/org/objenesis/gae/JspReporter.java | 2 +- .../org/objenesis/gae/JspWriterListener.java | 2 +- gae/src/main/webapp/WEB-INF/appengine-web.xml | 2 +- .../main/webapp/WEB-INF/logging.properties | 2 +- gae/src/main/webapp/WEB-INF/web.xml | 2 +- gae/src/main/webapp/index.jsp | 2 +- main/pom.xml | 4 +- .../main/java/org/objenesis/Objenesis.java | 2 +- .../java/org/objenesis/ObjenesisBase.java | 2 +- .../org/objenesis/ObjenesisException.java | 2 +- .../java/org/objenesis/ObjenesisHelper.java | 2 +- .../org/objenesis/ObjenesisSerializer.java | 2 +- .../main/java/org/objenesis/ObjenesisStd.java | 2 +- .../instantiator/ObjectInstantiator.java | 2 +- .../SerializationInstantiatorHelper.java | 2 +- .../android/Android10Instantiator.java | 2 +- .../android/Android17Instantiator.java | 2 +- .../android/Android18Instantiator.java | 2 +- .../AndroidSerializationInstantiator.java | 2 +- .../annotations/Instantiator.java | 2 +- .../instantiator/annotations/Typology.java | 2 +- .../basic/AccessibleInstantiator.java | 2 +- .../basic/ConstructorInstantiator.java | 2 +- .../basic/DelegatingToExoticInstantiator.java | 2 +- .../basic/FailingInstantiator.java | 2 +- .../basic/NewInstanceInstantiator.java | 2 +- .../instantiator/basic/NullInstantiator.java | 2 +- .../basic/ObjectInputStreamInstantiator.java | 2 +- .../basic/ObjectStreamClassInstantiator.java | 2 +- .../basic/ProxyingInstantiator.java | 2 +- .../instantiator/gcj/GCJInstantiator.java | 2 +- .../instantiator/gcj/GCJInstantiatorBase.java | 2 +- .../gcj/GCJSerializationInstantiator.java | 2 +- .../instantiator/perc/PercInstantiator.java | 2 +- .../perc/PercSerializationInstantiator.java | 2 +- .../instantiator/sun/MagicInstantiator.java | 2 +- .../sun/SunReflectionFactoryHelper.java | 2 +- .../sun/SunReflectionFactoryInstantiator.java | 2 +- ...ctionFactorySerializationInstantiator.java | 2 +- .../sun/UnsafeFactoryInstantiator.java | 2 +- .../instantiator/util/ClassUtils.java | 2 +- .../instantiator/util/UnsafeUtils.java | 2 +- .../strategy/BaseInstantiatorStrategy.java | 2 +- .../strategy/InstantiatorStrategy.java | 2 +- .../strategy/PlatformDescription.java | 2 +- .../SerializingInstantiatorStrategy.java | 2 +- .../strategy/SingleInstantiatorStrategy.java | 2 +- .../strategy/StdInstantiatorStrategy.java | 2 +- main/src/test/java/android/os/Build.java | 2 +- .../org/objenesis/ExternalizableTest.java | 9 ++- .../org/objenesis/ObjenesisExceptionTest.java | 8 +- .../java/org/objenesis/ObjenesisTest.java | 8 +- .../SerializingInstantiatorTest.java | 7 +- .../strategy/PlatformDescriptionTest.java | 10 +-- pom.xml | 81 ++++++++++++------- tck-android/pom.xml | 5 +- tck-android/src/main/AndroidManifest.xml | 2 +- .../objenesis/tck/android/ObjenesisTest.java | 2 +- .../tck/android/TckInstrumentation.java | 2 +- tck/pom.xml | 20 +++-- .../org/objenesis/tck/AbstractLoader.java | 2 +- .../java/org/objenesis/tck/Candidate.java | 2 +- .../org/objenesis/tck/CandidateLoader.java | 2 +- tck/src/main/java/org/objenesis/tck/Main.java | 2 +- .../main/java/org/objenesis/tck/Reporter.java | 2 +- tck/src/main/java/org/objenesis/tck/TCK.java | 3 +- .../java/org/objenesis/tck/TextReporter.java | 2 +- .../ConstructorThrowingException.java | 2 +- .../candidates/ConstructorWithArguments.java | 2 +- .../ConstructorWithMandatoryArguments.java | 2 +- .../candidates/DefaultPackageConstructor.java | 2 +- .../candidates/DefaultPrivateConstructor.java | 2 +- .../DefaultProtectedConstructor.java | 2 +- .../candidates/DefaultPublicConstructor.java | 2 +- .../tck/candidates/NoConstructor.java | 2 +- ...ializableConstructorThrowingException.java | 2 +- .../SerializableConstructorWithArguments.java | 2 +- ...ableConstructorWithMandatoryArguments.java | 2 +- ...SerializableDefaultPackageConstructor.java | 2 +- ...SerializableDefaultPrivateConstructor.java | 2 +- ...rializableDefaultProtectedConstructor.java | 2 +- .../SerializableDefaultPublicConstructor.java | 2 +- .../candidates/SerializableNoConstructor.java | 2 +- .../tck/candidates/SerializableReplacer.java | 2 +- .../tck/candidates/SerializableResolver.java | 2 +- ...alizableWithAncestorThrowingException.java | 2 +- .../tck/features/AbstractFeature.java | 2 +- .../ExtendsNotSerializableParentClass.java | 2 +- .../features/ExtendsSerializableClass.java | 2 +- .../org/objenesis/tck/features/Feature.java | 2 +- .../tck/features/NotSerializableClass.java | 2 +- .../tck/features/ReadExternalNotCalled.java | 2 +- .../tck/features/ReadObjectNotCalled.java | 2 +- .../tck/features/SerializableClass.java | 2 +- .../objenesis/tck/search/ClassEnumerator.java | 2 +- .../tck/search/SearchWorkingInstantiator.java | 2 +- .../SearchWorkingInstantiatorListener.java | 2 +- .../tck/search/SystemOutListener.java | 2 +- .../serializable-candidates.properties | 2 +- .../candidates/standard-candidates.properties | 2 +- .../org/objenesis/tck/AbstractLoaderTest.java | 13 +-- .../java/org/objenesis/tck/ObjenesisTest.java | 9 ++- .../test/java/org/objenesis/tck/OsgiTest.java | 2 +- .../org/objenesis/tck/SerializableTest.java | 18 +++-- .../test/java/org/objenesis/tck/TCKTest.java | 6 +- .../org/objenesis/tck/TextReporterTest.java | 10 +-- tck/src/test/resources/logback-test.xml | 2 +- .../tck/CandidateLoaderTest-sample.properties | 2 +- test/pom.xml | 10 +-- .../java/org/objenesis/test/EmptyClass.java | 2 +- .../org/objenesis/test/EmptyClassBis.java | 2 +- website/.project | 35 ++++++++ .../org.eclipse.core.resources.prefs | 12 +++ website/pom.xml | 8 +- website/site/content/acknowledgements.html | 2 +- website/site/content/details.html | 2 +- website/site/content/download.html | 4 +- website/site/content/embedding.html | 2 +- website/site/content/index.html | 2 +- website/site/content/license.html | 2 +- website/site/content/notes.html | 12 ++- website/site/content/sitemap.xml | 2 +- website/site/content/source.html | 2 +- website/site/content/support.html | 2 +- website/site/content/tutorial.html | 2 +- website/site/content/who.html | 2 +- .../resources/googlefda9c590a38fa17b.html | 2 +- website/site/resources/style.css | 2 +- website/site/templates/skin.html | 2 +- 157 files changed, 425 insertions(+), 337 deletions(-) delete mode 100644 .gitignore create mode 100644 .idea/copyright/Objenesis.xml create mode 100644 .idea/copyright/profiles_settings.xml delete mode 100644 .travis.yml delete mode 100644 debian/libobjenesis-java-doc.doc-base.api delete mode 100644 debian/libobjenesis-java-doc.install create mode 100644 website/.project create mode 100644 website/.settings/org.eclipse.core.resources.prefs diff --git a/.gitignore b/.gitignore deleted file mode 100644 index bf8413f..0000000 --- a/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -target/ -eclipse_config/ -.classpath -.project -org.eclipse.m2e.core.prefs -org.eclipse.core.resources.prefs -org.eclipse.pde.core.prefs -*.iml -.idea/ -sys$command - -# maven-release-plugin -release.properties -pom.xml.next -pom.xml.releaseBackup -pom.xml.tag diff --git a/.idea/copyright/Objenesis.xml b/.idea/copyright/Objenesis.xml new file mode 100644 index 0000000..13e32c9 --- /dev/null +++ b/.idea/copyright/Objenesis.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..063cf2c --- /dev/null +++ b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0f8291f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: java -sudo: false -jdk: - - openjdk8 - - openjdk11 -branches: - only: - - master diff --git a/README.md b/README.md index 0f4d249..a368796 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,14 @@ You can find the website and user documentation at [objenesis.org](http://objene ## Project status -[![Build Status](https://travis-ci.org/easymock/objenesis.svg?branch=master)](https://travis-ci.org/easymock/objenesis) +[![Build Status](https://github.com/easymock/objenesis/actions/workflows/ci.yml/badge.svg)](https://github.com/easymock/objenesis/actions/workflows/ci.yml?query=branch%3Amaster) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.objenesis/objenesis/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.objenesis/objenesis) ## 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) +- Maven 3.8.5 +- IntelliJ Ultimate 2022.1.2 (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 @@ -41,10 +41,18 @@ This build will create the source and javadoc jars and run spotbugs. ### Run the Android TCK +####Install required tools: +##### MacOs / *nix - 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) +#### Windows +- [Install Android Studio](https://developer.android.com/studio) +- Launch studio and install SDK and emulator +- Add an `ANDROID_HOME` to environmental variables (path used to install SDK on previous step) + +####Run +- 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` @@ -85,19 +93,23 @@ cd benchmark ## To upgrade the Maven wrapper -`mvn -N io.takari:maven:wrapper -Dmaven=3.6.3` +`mvn wrapper:wrapper` ## To update the license `mvn validate license:format -Pall` +## To run modernizer + +`mvn modernizer:modernizer -Pall` + ## To release * Add the release notes in `website/site/content/notes.html` You use this code to generate it ```bash # Get the milestone matching the version -version=(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | cut -d'-' -f1) +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 diff --git a/SupportedJVMs.md b/SupportedJVMs.md index a8200c5..4786a4d 100644 --- a/SupportedJVMs.md +++ b/SupportedJVMs.md @@ -1,7 +1,7 @@ # List of currently supported JVMs -* Sun/Oracle Hotspot VM, versions 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 9 to 16 -* OpenJDK 6, 7, 8, 9 to 16 +* Sun/Oracle Hotspot VM, versions 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 9 to 18 +* OpenJDK 6, 7, 8, 9 to 18 * Android API level 8 to 30 (Serialization support starting from Honeycomb) * Azul Zulu (tested on 1.8.0_45-b14) * Azul Zing JDK 1.8 (tested on 1.8.0-zing_16.10.1.0-b2) diff --git a/benchmark/launch.sh b/benchmark/launch.sh index ca9f3b7..1fb2697 100755 --- a/benchmark/launch.sh +++ b/benchmark/launch.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright 2006-2021 the original author or authors. +# Copyright 2006-2022 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/benchmark/pom.xml b/benchmark/pom.xml index 3c967b4..8cb6442 100644 --- a/benchmark/pom.xml +++ b/benchmark/pom.xml @@ -1,7 +1,7 @@ 1.8 - 1.26 + 1.35 benchmarks @@ -56,9 +56,9 @@ - cglib - cglib-nodep - 3.3.0 + net.bytebuddy + byte-buddy + 1.12.12 diff --git a/benchmark/src/main/java/org/objenesis/benchmark/ConcurrentGetInstantiator.java b/benchmark/src/main/java/org/objenesis/benchmark/ConcurrentGetInstantiator.java index dc4e637..6633606 100644 --- a/benchmark/src/main/java/org/objenesis/benchmark/ConcurrentGetInstantiator.java +++ b/benchmark/src/main/java/org/objenesis/benchmark/ConcurrentGetInstantiator.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,8 @@ */ package org.objenesis.benchmark; -import net.sf.cglib.proxy.Enhancer; -import net.sf.cglib.proxy.NoOp; +import net.bytebuddy.ByteBuddy; +import net.bytebuddy.dynamic.loading.ClassLoadingStrategy; import org.objenesis.Objenesis; import org.objenesis.ObjenesisStd; import org.objenesis.instantiator.ObjectInstantiator; @@ -44,7 +44,7 @@ public class ConcurrentGetInstantiator { private static final int COUNT = 1000; - + public static class SunInstantiatorStrategy extends BaseInstantiatorStrategy { @Override public ObjectInstantiator newInstantiatorOf(Class type) { @@ -55,10 +55,10 @@ public ObjectInstantiator newInstantiatorOf(Class type) { InstantiatorStrategy std = new StdInstantiatorStrategy(); InstantiatorStrategy single = new SingleInstantiatorStrategy(SunReflectionFactoryInstantiator.class); InstantiatorStrategy custom = new SunInstantiatorStrategy(); - + Objenesis cachedStd = new ObjenesisStd(); Objenesis uncachedStd = new ObjenesisStd(false); - + Class[] toInstantiate = new Class[COUNT]; @State(Scope.Thread) @@ -68,11 +68,14 @@ public static class ThreadState { @Setup public void setUp() { + ClassLoadingStrategy strategy = new ClassLoadingStrategy.ForUnsafeInjection(); + for(int i = 0; i < COUNT; i++) { - Enhancer enhancer = new Enhancer(); - enhancer.setUseCache(false); // deactivate the cache to get a new instance each time - enhancer.setCallbackType(NoOp.class); - Class c = enhancer.createClass(); + Class c = new ByteBuddy() + .subclass(Object.class) + .make() + .load(ConcurrentGetInstantiator.class.getClassLoader(), strategy) + .getLoaded(); toInstantiate[i] = c; } } @@ -91,12 +94,12 @@ public ObjectInstantiator single(ThreadState state) { public ObjectInstantiator custom(ThreadState state) { return custom.newInstantiatorOf(toInstantiate[state.index++ % COUNT]); } - + @Benchmark public ObjectInstantiator cachedStd(ThreadState state) { return cachedStd.getInstantiatorOf(toInstantiate[state.index++ % COUNT]); } - + @Benchmark public ObjectInstantiator uncachedStd(ThreadState state) { return uncachedStd.getInstantiatorOf(toInstantiate[state.index++ % COUNT]); diff --git a/benchmark/src/main/java/org/objenesis/benchmark/CreateObject.java b/benchmark/src/main/java/org/objenesis/benchmark/CreateObject.java index d9ce94a..d173953 100644 --- a/benchmark/src/main/java/org/objenesis/benchmark/CreateObject.java +++ b/benchmark/src/main/java/org/objenesis/benchmark/CreateObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/debian/changelog b/debian/changelog index 05f9dbd..e7c6cd5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,25 @@ +objenesis (3.3-3) unstable; urgency=medium + + * Don't suggest the -doc package anymore. + + -- Markus Koschany Tue, 17 Jan 2023 14:18:23 +0100 + +objenesis (3.3-2) unstable; urgency=medium + + * Declare compliance with Debian Policy 4.6.2. + * Drop binary package libobjenesis-java-doc. Do not build the javadoc. + (Closes: #1028709) + + -- Markus Koschany Tue, 17 Jan 2023 14:10:36 +0100 + +objenesis (3.3-1) unstable; urgency=medium + + * New upstream version 3.3. + * Switch to debhelper-compat = 13. + * Declare compliance with Debian Policy 4.6.1. + + -- Markus Koschany Sat, 06 Aug 2022 13:57:48 +0200 + objenesis (3.2-1) unstable; urgency=medium * New upstream version 3.2. diff --git a/debian/control b/debian/control index 97154ef..f84cb60 100644 --- a/debian/control +++ b/debian/control @@ -4,15 +4,13 @@ Priority: optional Maintainer: Debian Java Maintainers Uploaders: Markus Koschany Build-Depends: - debhelper-compat (= 12), + debhelper-compat (= 13), default-jdk, - default-jdk-doc, junit4, libmaven-bundle-plugin-java, libmaven-enforcer-plugin-java, - libmaven-javadoc-plugin-java, maven-debian-helper (>= 1.4) -Standards-Version: 4.6.0 +Standards-Version: 4.6.2 Vcs-Git: https://salsa.debian.org/java-team/objenesis.git Vcs-Browser: https://salsa.debian.org/java-team/objenesis Homepage: http://www.objenesis.org/ @@ -21,7 +19,6 @@ Package: libobjenesis-java Architecture: all Depends: ${maven:Depends}, ${misc:Depends} Recommends: ${maven:OptionalDepends} -Suggests: libobjenesis-java-doc Description: Java library to instantiate a new object of a particular class Objenesis is a small Java library that serves one purpose: to instantiate a new object of a particular class. @@ -37,25 +34,3 @@ Description: Java library to instantiate a new object of a particular class Objenesis aims to overcomes these restrictions by bypassing the constructor on object instantiation. -Package: libobjenesis-java-doc -Architecture: all -Section: doc -Depends: ${maven:DocDepends}, ${misc:Depends} -Recommends: ${maven:DocOptionalDepends} -Suggests: libobjenesis-java -Description: Documentation for Objenesis - Objenesis is a small Java library that serves one purpose: to instantiate a - new object of a particular class. - Java already supports this dynamic instantiation of classes using - Class.newInstance(). However, this only works if the class has an appropriate - constructor. There are many times when a class cannot be instantiated this - way, such as when the class contains: - * Constructors that require arguments. - * Constructors that have side effects. - * Constructors that throw exceptions. - As a result, it is common to see restrictions in libraries stating that - classes must require a default constructor. - Objenesis aims to overcomes these restrictions by bypassing the constructor - on object instantiation. - . - This is the API documentation for Objenesis diff --git a/debian/copyright b/debian/copyright index 44c0148..a2ad438 100644 --- a/debian/copyright +++ b/debian/copyright @@ -4,12 +4,12 @@ Upstream-Contact: Objenesis Team Source: https://github.com/easymock/objenesis Files: * -Copyright: 2006-2021 Joe Walnes, Henri Tremblay, Leonardo Mesquita +Copyright: 2006-2022 Joe Walnes, Henri Tremblay, Leonardo Mesquita License: Apache-2.0 Files: debian/* Copyright: 2010, Gabriele Giacone <1o5g4r8o@gmail.com> - 2014-2021, Markus Koschany + 2014-2022, Markus Koschany License: Apache-2.0 License: Apache-2.0 diff --git a/debian/libobjenesis-java-doc.doc-base.api b/debian/libobjenesis-java-doc.doc-base.api deleted file mode 100644 index aac7492..0000000 --- a/debian/libobjenesis-java-doc.doc-base.api +++ /dev/null @@ -1,10 +0,0 @@ -Document: libobjenesis-java -Title: API Javadoc for Objenesis parent project -Author: Joe Walnes, Henri Tremblay, Leonardo Mesquita developers -Abstract: This is the API Javadoc provided for the - libobjenesis-java library. -Section: Programming - -Format: HTML -Index: /usr/share/doc/libobjenesis-java/api/index.html -Files: /usr/share/doc/libobjenesis-java/api/* diff --git a/debian/libobjenesis-java-doc.install b/debian/libobjenesis-java-doc.install deleted file mode 100644 index 8c07946..0000000 --- a/debian/libobjenesis-java-doc.install +++ /dev/null @@ -1 +0,0 @@ -target/site/apidocs/* usr/share/doc/libobjenesis-java/api diff --git a/debian/maven.properties b/debian/maven.properties index c14f797..16f1924 100644 --- a/debian/maven.properties +++ b/debian/maven.properties @@ -3,3 +3,4 @@ # maven.test.skip=true project.build.sourceEncoding=ISO-8859-1 +maven.javadoc.skip=true diff --git a/deploy.sh b/deploy.sh index 205f830..d4a3b88 100755 --- a/deploy.sh +++ b/deploy.sh @@ -23,15 +23,16 @@ git push --tags mvn release:perform -Pall,full,release -echo "Please add the release notes in github" +echo "Please add the release notes and copy binaries (main, tck, tck-android, exotic) in github" open "https://github.com/easymock/objenesis/tags" pause # Release the jars now on central staging echo "Check everything is alright, next step will release to central" +echo "Right now you need to delete some of the projects from staging" open "https://oss.sonatype.org/#welcome" pause -mvn nexus-staging:release +# mvn nexus-staging:release echo "Close the milestone in GitHub and create the new one" open "https://github.com/easymock/objenesis/milestones" diff --git a/exotic/pom.xml b/exotic/pom.xml index 886ec50..ca33699 100644 --- a/exotic/pom.xml +++ b/exotic/pom.xml @@ -1,7 +1,7 @@ + + gae website diff --git a/tck-android/pom.xml b/tck-android/pom.xml index b43e2d0..23ffcf7 100644 --- a/tck-android/pom.xml +++ b/tck-android/pom.xml @@ -1,7 +1,7 @@ + + org.junit.vintage + junit-vintage-engine + test + diff --git a/tck/src/main/java/org/objenesis/tck/AbstractLoader.java b/tck/src/main/java/org/objenesis/tck/AbstractLoader.java index ebb0960..391c82d 100644 --- a/tck/src/main/java/org/objenesis/tck/AbstractLoader.java +++ b/tck/src/main/java/org/objenesis/tck/AbstractLoader.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/Candidate.java b/tck/src/main/java/org/objenesis/tck/Candidate.java index fb0d977..5a6a305 100644 --- a/tck/src/main/java/org/objenesis/tck/Candidate.java +++ b/tck/src/main/java/org/objenesis/tck/Candidate.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/CandidateLoader.java b/tck/src/main/java/org/objenesis/tck/CandidateLoader.java index 07f7a80..8fc0fb5 100644 --- a/tck/src/main/java/org/objenesis/tck/CandidateLoader.java +++ b/tck/src/main/java/org/objenesis/tck/CandidateLoader.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/Main.java b/tck/src/main/java/org/objenesis/tck/Main.java index 5ef8c86..2a2acd8 100644 --- a/tck/src/main/java/org/objenesis/tck/Main.java +++ b/tck/src/main/java/org/objenesis/tck/Main.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/Reporter.java b/tck/src/main/java/org/objenesis/tck/Reporter.java index 156f590..31ec14a 100644 --- a/tck/src/main/java/org/objenesis/tck/Reporter.java +++ b/tck/src/main/java/org/objenesis/tck/Reporter.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/TCK.java b/tck/src/main/java/org/objenesis/tck/TCK.java index b6e4415..3afef7a 100644 --- a/tck/src/main/java/org/objenesis/tck/TCK.java +++ b/tck/src/main/java/org/objenesis/tck/TCK.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -87,6 +87,7 @@ protected void loadCandidates() throws IOException { * * @param candidateClass Class to attempt to instantiate * @param description Description of the class + * @param type Type of the candidate */ public void registerCandidate(Class candidateClass, String description, Candidate.CandidateType type) { Candidate candidate = new Candidate(candidateClass, description, type); diff --git a/tck/src/main/java/org/objenesis/tck/TextReporter.java b/tck/src/main/java/org/objenesis/tck/TextReporter.java index abd8551..9184eeb 100644 --- a/tck/src/main/java/org/objenesis/tck/TextReporter.java +++ b/tck/src/main/java/org/objenesis/tck/TextReporter.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/candidates/ConstructorThrowingException.java b/tck/src/main/java/org/objenesis/tck/candidates/ConstructorThrowingException.java index bbbc35c..57d160c 100644 --- a/tck/src/main/java/org/objenesis/tck/candidates/ConstructorThrowingException.java +++ b/tck/src/main/java/org/objenesis/tck/candidates/ConstructorThrowingException.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/candidates/ConstructorWithArguments.java b/tck/src/main/java/org/objenesis/tck/candidates/ConstructorWithArguments.java index 9945788..574e9e6 100644 --- a/tck/src/main/java/org/objenesis/tck/candidates/ConstructorWithArguments.java +++ b/tck/src/main/java/org/objenesis/tck/candidates/ConstructorWithArguments.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/candidates/ConstructorWithMandatoryArguments.java b/tck/src/main/java/org/objenesis/tck/candidates/ConstructorWithMandatoryArguments.java index b7c0488..c1cea16 100644 --- a/tck/src/main/java/org/objenesis/tck/candidates/ConstructorWithMandatoryArguments.java +++ b/tck/src/main/java/org/objenesis/tck/candidates/ConstructorWithMandatoryArguments.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/candidates/DefaultPackageConstructor.java b/tck/src/main/java/org/objenesis/tck/candidates/DefaultPackageConstructor.java index 3ab5c81..9e34e39 100644 --- a/tck/src/main/java/org/objenesis/tck/candidates/DefaultPackageConstructor.java +++ b/tck/src/main/java/org/objenesis/tck/candidates/DefaultPackageConstructor.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/candidates/DefaultPrivateConstructor.java b/tck/src/main/java/org/objenesis/tck/candidates/DefaultPrivateConstructor.java index db59b3e..81d46db 100644 --- a/tck/src/main/java/org/objenesis/tck/candidates/DefaultPrivateConstructor.java +++ b/tck/src/main/java/org/objenesis/tck/candidates/DefaultPrivateConstructor.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/candidates/DefaultProtectedConstructor.java b/tck/src/main/java/org/objenesis/tck/candidates/DefaultProtectedConstructor.java index 9aac25c..fffd014 100644 --- a/tck/src/main/java/org/objenesis/tck/candidates/DefaultProtectedConstructor.java +++ b/tck/src/main/java/org/objenesis/tck/candidates/DefaultProtectedConstructor.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/candidates/DefaultPublicConstructor.java b/tck/src/main/java/org/objenesis/tck/candidates/DefaultPublicConstructor.java index ce23759..e8be733 100644 --- a/tck/src/main/java/org/objenesis/tck/candidates/DefaultPublicConstructor.java +++ b/tck/src/main/java/org/objenesis/tck/candidates/DefaultPublicConstructor.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/candidates/NoConstructor.java b/tck/src/main/java/org/objenesis/tck/candidates/NoConstructor.java index 84a4535..a3d7ca8 100644 --- a/tck/src/main/java/org/objenesis/tck/candidates/NoConstructor.java +++ b/tck/src/main/java/org/objenesis/tck/candidates/NoConstructor.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/candidates/SerializableConstructorThrowingException.java b/tck/src/main/java/org/objenesis/tck/candidates/SerializableConstructorThrowingException.java index 7bddf0a..c2fc5fd 100644 --- a/tck/src/main/java/org/objenesis/tck/candidates/SerializableConstructorThrowingException.java +++ b/tck/src/main/java/org/objenesis/tck/candidates/SerializableConstructorThrowingException.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/candidates/SerializableConstructorWithArguments.java b/tck/src/main/java/org/objenesis/tck/candidates/SerializableConstructorWithArguments.java index 2697ce9..670635b 100644 --- a/tck/src/main/java/org/objenesis/tck/candidates/SerializableConstructorWithArguments.java +++ b/tck/src/main/java/org/objenesis/tck/candidates/SerializableConstructorWithArguments.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/candidates/SerializableConstructorWithMandatoryArguments.java b/tck/src/main/java/org/objenesis/tck/candidates/SerializableConstructorWithMandatoryArguments.java index aeebdd4..979554a 100644 --- a/tck/src/main/java/org/objenesis/tck/candidates/SerializableConstructorWithMandatoryArguments.java +++ b/tck/src/main/java/org/objenesis/tck/candidates/SerializableConstructorWithMandatoryArguments.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/candidates/SerializableDefaultPackageConstructor.java b/tck/src/main/java/org/objenesis/tck/candidates/SerializableDefaultPackageConstructor.java index eeb9614..fa3a149 100644 --- a/tck/src/main/java/org/objenesis/tck/candidates/SerializableDefaultPackageConstructor.java +++ b/tck/src/main/java/org/objenesis/tck/candidates/SerializableDefaultPackageConstructor.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/candidates/SerializableDefaultPrivateConstructor.java b/tck/src/main/java/org/objenesis/tck/candidates/SerializableDefaultPrivateConstructor.java index 17b3563..4272979 100644 --- a/tck/src/main/java/org/objenesis/tck/candidates/SerializableDefaultPrivateConstructor.java +++ b/tck/src/main/java/org/objenesis/tck/candidates/SerializableDefaultPrivateConstructor.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/candidates/SerializableDefaultProtectedConstructor.java b/tck/src/main/java/org/objenesis/tck/candidates/SerializableDefaultProtectedConstructor.java index 81cab08..5f1723d 100644 --- a/tck/src/main/java/org/objenesis/tck/candidates/SerializableDefaultProtectedConstructor.java +++ b/tck/src/main/java/org/objenesis/tck/candidates/SerializableDefaultProtectedConstructor.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/candidates/SerializableDefaultPublicConstructor.java b/tck/src/main/java/org/objenesis/tck/candidates/SerializableDefaultPublicConstructor.java index 97fcd34..c236566 100644 --- a/tck/src/main/java/org/objenesis/tck/candidates/SerializableDefaultPublicConstructor.java +++ b/tck/src/main/java/org/objenesis/tck/candidates/SerializableDefaultPublicConstructor.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/candidates/SerializableNoConstructor.java b/tck/src/main/java/org/objenesis/tck/candidates/SerializableNoConstructor.java index fe306c6..7edafc1 100644 --- a/tck/src/main/java/org/objenesis/tck/candidates/SerializableNoConstructor.java +++ b/tck/src/main/java/org/objenesis/tck/candidates/SerializableNoConstructor.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/candidates/SerializableReplacer.java b/tck/src/main/java/org/objenesis/tck/candidates/SerializableReplacer.java index 38c3896..95ff1ac 100644 --- a/tck/src/main/java/org/objenesis/tck/candidates/SerializableReplacer.java +++ b/tck/src/main/java/org/objenesis/tck/candidates/SerializableReplacer.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/candidates/SerializableResolver.java b/tck/src/main/java/org/objenesis/tck/candidates/SerializableResolver.java index e5215ed..3051b87 100644 --- a/tck/src/main/java/org/objenesis/tck/candidates/SerializableResolver.java +++ b/tck/src/main/java/org/objenesis/tck/candidates/SerializableResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/candidates/SerializableWithAncestorThrowingException.java b/tck/src/main/java/org/objenesis/tck/candidates/SerializableWithAncestorThrowingException.java index 30e9f11..47ab7a7 100644 --- a/tck/src/main/java/org/objenesis/tck/candidates/SerializableWithAncestorThrowingException.java +++ b/tck/src/main/java/org/objenesis/tck/candidates/SerializableWithAncestorThrowingException.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/features/AbstractFeature.java b/tck/src/main/java/org/objenesis/tck/features/AbstractFeature.java index 5bb57b6..b34e66e 100644 --- a/tck/src/main/java/org/objenesis/tck/features/AbstractFeature.java +++ b/tck/src/main/java/org/objenesis/tck/features/AbstractFeature.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/features/ExtendsNotSerializableParentClass.java b/tck/src/main/java/org/objenesis/tck/features/ExtendsNotSerializableParentClass.java index 9d2a9c4..8ad9a3f 100644 --- a/tck/src/main/java/org/objenesis/tck/features/ExtendsNotSerializableParentClass.java +++ b/tck/src/main/java/org/objenesis/tck/features/ExtendsNotSerializableParentClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/features/ExtendsSerializableClass.java b/tck/src/main/java/org/objenesis/tck/features/ExtendsSerializableClass.java index f9c993b..feb84df 100644 --- a/tck/src/main/java/org/objenesis/tck/features/ExtendsSerializableClass.java +++ b/tck/src/main/java/org/objenesis/tck/features/ExtendsSerializableClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/features/Feature.java b/tck/src/main/java/org/objenesis/tck/features/Feature.java index e3826d3..f0357a1 100644 --- a/tck/src/main/java/org/objenesis/tck/features/Feature.java +++ b/tck/src/main/java/org/objenesis/tck/features/Feature.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/features/NotSerializableClass.java b/tck/src/main/java/org/objenesis/tck/features/NotSerializableClass.java index 83fe264..ebc8c08 100644 --- a/tck/src/main/java/org/objenesis/tck/features/NotSerializableClass.java +++ b/tck/src/main/java/org/objenesis/tck/features/NotSerializableClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/features/ReadExternalNotCalled.java b/tck/src/main/java/org/objenesis/tck/features/ReadExternalNotCalled.java index c3dcde9..24840ef 100644 --- a/tck/src/main/java/org/objenesis/tck/features/ReadExternalNotCalled.java +++ b/tck/src/main/java/org/objenesis/tck/features/ReadExternalNotCalled.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/features/ReadObjectNotCalled.java b/tck/src/main/java/org/objenesis/tck/features/ReadObjectNotCalled.java index 0a8c743..8bf6121 100644 --- a/tck/src/main/java/org/objenesis/tck/features/ReadObjectNotCalled.java +++ b/tck/src/main/java/org/objenesis/tck/features/ReadObjectNotCalled.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/features/SerializableClass.java b/tck/src/main/java/org/objenesis/tck/features/SerializableClass.java index bf7e860..d2170be 100644 --- a/tck/src/main/java/org/objenesis/tck/features/SerializableClass.java +++ b/tck/src/main/java/org/objenesis/tck/features/SerializableClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/search/ClassEnumerator.java b/tck/src/main/java/org/objenesis/tck/search/ClassEnumerator.java index d5b649d..50c0ac1 100644 --- a/tck/src/main/java/org/objenesis/tck/search/ClassEnumerator.java +++ b/tck/src/main/java/org/objenesis/tck/search/ClassEnumerator.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/search/SearchWorkingInstantiator.java b/tck/src/main/java/org/objenesis/tck/search/SearchWorkingInstantiator.java index 1f8af92..dd27b96 100644 --- a/tck/src/main/java/org/objenesis/tck/search/SearchWorkingInstantiator.java +++ b/tck/src/main/java/org/objenesis/tck/search/SearchWorkingInstantiator.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/search/SearchWorkingInstantiatorListener.java b/tck/src/main/java/org/objenesis/tck/search/SearchWorkingInstantiatorListener.java index 972d575..4196053 100644 --- a/tck/src/main/java/org/objenesis/tck/search/SearchWorkingInstantiatorListener.java +++ b/tck/src/main/java/org/objenesis/tck/search/SearchWorkingInstantiatorListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/java/org/objenesis/tck/search/SystemOutListener.java b/tck/src/main/java/org/objenesis/tck/search/SystemOutListener.java index d9d6594..31b339d 100644 --- a/tck/src/main/java/org/objenesis/tck/search/SystemOutListener.java +++ b/tck/src/main/java/org/objenesis/tck/search/SystemOutListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/main/resources/org/objenesis/tck/candidates/serializable-candidates.properties b/tck/src/main/resources/org/objenesis/tck/candidates/serializable-candidates.properties index c098cfe..0134828 100644 --- a/tck/src/main/resources/org/objenesis/tck/candidates/serializable-candidates.properties +++ b/tck/src/main/resources/org/objenesis/tck/candidates/serializable-candidates.properties @@ -1,5 +1,5 @@ # -# Copyright 2006-2021 the original author or authors. +# Copyright 2006-2022 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tck/src/main/resources/org/objenesis/tck/candidates/standard-candidates.properties b/tck/src/main/resources/org/objenesis/tck/candidates/standard-candidates.properties index 2653d7f..69b334d 100644 --- a/tck/src/main/resources/org/objenesis/tck/candidates/standard-candidates.properties +++ b/tck/src/main/resources/org/objenesis/tck/candidates/standard-candidates.properties @@ -1,5 +1,5 @@ # -# Copyright 2006-2021 the original author or authors. +# Copyright 2006-2022 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tck/src/test/java/org/objenesis/tck/AbstractLoaderTest.java b/tck/src/test/java/org/objenesis/tck/AbstractLoaderTest.java index d15aaa0..e0031b9 100644 --- a/tck/src/test/java/org/objenesis/tck/AbstractLoaderTest.java +++ b/tck/src/test/java/org/objenesis/tck/AbstractLoaderTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,13 +15,14 @@ */ package org.objenesis.tck; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + import java.io.ByteArrayInputStream; import java.io.IOException; -import org.junit.Before; -import org.junit.Test; - -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; /** * @author Henri Tremblay @@ -32,7 +33,7 @@ public class AbstractLoaderTest { private StringBuilder recordedEvents; private AbstractLoader loader; - @Before + @BeforeEach public void setUp() { recordedEvents = new StringBuilder(); AbstractLoader.ErrorHandler errorHandler = name -> diff --git a/tck/src/test/java/org/objenesis/tck/ObjenesisTest.java b/tck/src/test/java/org/objenesis/tck/ObjenesisTest.java index c330bbe..e0fac98 100644 --- a/tck/src/test/java/org/objenesis/tck/ObjenesisTest.java +++ b/tck/src/test/java/org/objenesis/tck/ObjenesisTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,12 +18,13 @@ import java.io.ByteArrayOutputStream; import java.io.PrintStream; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.objenesis.Objenesis; import org.objenesis.ObjenesisSerializer; import org.objenesis.ObjenesisStd; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; /** * Integration test for Objenesis. Should pass successfully on every supported JVM for all Objenesis @@ -48,7 +49,7 @@ public void startTest(Candidate candidate) { @Override public void result(Candidate.CandidateType type, boolean worked) { - assertTrue("Instantiating " + currentCandidate + " for " + type + " failed", worked); + assertTrue(worked, "Instantiating " + currentCandidate + " for " + type + " failed"); } @Override diff --git a/tck/src/test/java/org/objenesis/tck/OsgiTest.java b/tck/src/test/java/org/objenesis/tck/OsgiTest.java index e32849d..f0e62d7 100644 --- a/tck/src/test/java/org/objenesis/tck/OsgiTest.java +++ b/tck/src/test/java/org/objenesis/tck/OsgiTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tck/src/test/java/org/objenesis/tck/SerializableTest.java b/tck/src/test/java/org/objenesis/tck/SerializableTest.java index dda5cd4..4519c02 100644 --- a/tck/src/test/java/org/objenesis/tck/SerializableTest.java +++ b/tck/src/test/java/org/objenesis/tck/SerializableTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,9 @@ */ package org.objenesis.tck; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; + import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.Externalizable; @@ -28,10 +31,9 @@ import java.util.HashSet; import java.util.Set; -import org.junit.After; -import org.junit.Test; - -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * Test showcasing how the normal serialization should behave (constructor and special methods called). You @@ -159,9 +161,9 @@ private Object readResolve() { private static final Set called = new HashSet<>(); - @After + @AfterEach public void verify() { - assertTrue(called.toString(), called.isEmpty()); + assertTrue(called.isEmpty(), called.toString()); } @Test @@ -178,7 +180,7 @@ public void extendsSerializable() throws Exception { } @Test - public void notSerializable() throws Exception { + public void notSerializable() { assertThrows(NotSerializableException.class, () -> writeRead(new NotSerializable())); assertNotCalled("NotSerializable.constructor"); } diff --git a/tck/src/test/java/org/objenesis/tck/TCKTest.java b/tck/src/test/java/org/objenesis/tck/TCKTest.java index 3290ba8..6c6e4dd 100644 --- a/tck/src/test/java/org/objenesis/tck/TCKTest.java +++ b/tck/src/test/java/org/objenesis/tck/TCKTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,12 @@ */ package org.objenesis.tck; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.objenesis.Objenesis; import org.objenesis.instantiator.ObjectInstantiator; import org.objenesis.tck.features.Feature; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * @author Joe Walnes diff --git a/tck/src/test/java/org/objenesis/tck/TextReporterTest.java b/tck/src/test/java/org/objenesis/tck/TextReporterTest.java index 7b3b635..ec01285 100644 --- a/tck/src/test/java/org/objenesis/tck/TextReporterTest.java +++ b/tck/src/test/java/org/objenesis/tck/TextReporterTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,15 +18,15 @@ import java.io.ByteArrayOutputStream; import java.io.PrintStream; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.objenesis.Objenesis; import org.objenesis.ObjenesisBase; import org.objenesis.instantiator.basic.ConstructorInstantiator; import org.objenesis.instantiator.basic.FailingInstantiator; import org.objenesis.strategy.SingleInstantiatorStrategy; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * @author Joe Walnes @@ -37,7 +37,7 @@ public class TextReporterTest { private TextReporter textReporter; private ByteArrayOutputStream summaryBuffer; - @Before + @BeforeEach public void setUp() { summaryBuffer = new ByteArrayOutputStream(); ByteArrayOutputStream logBuffer = new ByteArrayOutputStream(); diff --git a/tck/src/test/resources/logback-test.xml b/tck/src/test/resources/logback-test.xml index 17715e7..3df444c 100644 --- a/tck/src/test/resources/logback-test.xml +++ b/tck/src/test/resources/logback-test.xml @@ -1,6 +1,6 @@ - 3.2 + 3.3 apidocs @@ -39,7 +39,7 @@ org.objenesis objenesis - 3.2 + 3.3 diff --git a/website/site/content/acknowledgements.html b/website/site/content/acknowledgements.html index 6def76c..abfd23d 100644 --- a/website/site/content/acknowledgements.html +++ b/website/site/content/acknowledgements.html @@ -1,6 +1,6 @@