Skip to content
Commits on Source (3)
......@@ -100,11 +100,11 @@ http://www.sonatype.com/people/2010/01/how-to-generate-pgp-signatures-with-maven
```bash
# Get the milestone matching the version
milestone=$(curl -s -u "${github_user}:${github_password}" "https://api.github.com/repos/easymock/easymock/milestones" | jq ".[] | select(.title==\"$version\") | .number")
milestone=$(curl -s "https://api.github.com/repos/easymock/objenesis/milestones" | jq ".[] | select(.title==\"$version\") | .number")
echo "<h1>Version $version ($(date '+%Y-%m-%d'))</h1>"
echo
echo "<ul>"
curl -s -u "${github_user}:${github_password}" "https://api.github.com/repos/easymock/objenesis/issues?milestone=11&state=all" | jq -r '.[] | (" <li>" + .title + " ("# +(.number|tostring) + ")</li>")'
curl -s "https://api.github.com/repos/easymock/objenesis/issues?milestone=${milestone}&state=all" | jq -r '.[] | " <li>" + .title + " (#" + (.number|tostring) + ")</li>"'
echo "</ul>"
```
......
......@@ -21,7 +21,7 @@
<parent>
<groupId>org.objenesis</groupId>
<artifactId>objenesis-parent</artifactId>
<version>3.0</version>
<version>3.0.1</version>
</parent>
<artifactId>objenesis-benchmark</artifactId>
......
......@@ -48,7 +48,7 @@ public class ConcurrentGetInstantiator {
public static class SunInstantiatorStrategy extends BaseInstantiatorStrategy {
@Override
public <T> ObjectInstantiator<T> newInstantiatorOf(Class<T> type) {
return new SunReflectionFactoryInstantiator<T>(type);
return new SunReflectionFactoryInstantiator<>(type);
}
}
......
......@@ -79,8 +79,8 @@ public class CreateObject {
@Setup
public void prepare() {
sunInstantiator = new SunReflectionFactoryInstantiator<Object>(type);
unsafeInstantiator = new UnsafeFactoryInstantiator<Object>(type);
sunInstantiator = new SunReflectionFactoryInstantiator<>(type);
unsafeInstantiator = new UnsafeFactoryInstantiator<>(type);
unsafe = getUnsafe();
constructor = getConstructor();
}
......
objenesis (3.0.1-1) unstable; urgency=medium
* New upstream version 3.0.1.
-- Markus Koschany <apo@debian.org> Sun, 21 Oct 2018 15:36:41 +0200
objenesis (3.0-1) unstable; urgency=medium
* New upstream version 3.0.
......
......@@ -22,7 +22,7 @@ fi
version=$1
if [ "$(git branch | grep ${version)" == "${version}" ]; then
if [ "$(git branch | grep ${version})" == "${version}" ]; then
echo "A branch named $version clashes with the version tag"
exit 1
fi
......
......@@ -23,7 +23,7 @@
<parent>
<artifactId>objenesis-parent</artifactId>
<groupId>org.objenesis</groupId>
<version>3.0</version>
<version>3.0.1</version>
</parent>
<artifactId>gae</artifactId>
......@@ -34,7 +34,7 @@
<properties>
<app.id>objenesis</app.id>
<app.version>2</app.version>
<appengine.version>1.9.65</appengine.version>
<appengine.version>1.9.67</appengine.version>
<gcloud.plugin.version>2.0.9.133.v201611104</gcloud.plugin.version>
</properties>
......
......@@ -120,10 +120,7 @@ public class JspReporter implements Reporter {
if(!success) {
errorCount++;
}
Map<Candidate.CandidateType, Result> result = results.get(currentCandidate);
if(result == null) {
results.put(currentCandidate, result = new HashMap<>());
}
Map<Candidate.CandidateType, Result> result = results.computeIfAbsent(currentCandidate, k -> new HashMap<>());
result.put(type, new Result(currentCandidate, type, success, exception));
}
......@@ -148,7 +145,7 @@ public class JspReporter implements Reporter {
summary.println(" Objenesis serializer: " + objenesisSerializer.getInstantiatorOf(String.class).getClass().getName() + "<br>");
summary.println("</p>");
Collection<String> candidateNames = new ArrayList<String>();
Collection<String> candidateNames = new ArrayList<>();
for(Map.Entry<Candidate, Map<Candidate.CandidateType, Result>> entry : results.entrySet()) {
candidateNames.add(entry.getKey().getDescription());
}
......@@ -159,7 +156,7 @@ public class JspReporter implements Reporter {
summary.print("<th>Objenesis serializer</th>");
summary.println("</tr>");
List<Result> exceptions = new ArrayList<Result>();
List<Result> exceptions = new ArrayList<>();
// Candidates
for(Map.Entry<Candidate, Map<Candidate.CandidateType, Result>> entry : results.entrySet()) {
......
......@@ -21,7 +21,7 @@
<parent>
<groupId>org.objenesis</groupId>
<artifactId>objenesis-parent</artifactId>
<version>3.0</version>
<version>3.0.1</version>
</parent>
<artifactId>objenesis</artifactId>
......@@ -36,6 +36,9 @@
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifestEntries>
<Automatic-Module-Name>org.objenesis</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
......
......@@ -18,7 +18,6 @@ package org.objenesis.instantiator.basic;
import org.objenesis.instantiator.ObjectInstantiator;
import org.objenesis.instantiator.annotations.Instantiator;
import org.objenesis.instantiator.annotations.Typology;
import org.objenesis.instantiator.util.ClassDefinitionUtils;
import org.objenesis.instantiator.util.ClassUtils;
/**
......
......@@ -15,8 +15,6 @@
*/
package org.objenesis.instantiator.util;
import org.objenesis.ObjenesisException;
import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
......
......@@ -17,14 +17,6 @@ package org.objenesis.instantiator.util;
import org.objenesis.ObjenesisException;
import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.security.ProtectionDomain;
/**
* Helper class for to play with classes. It contains everything needed to play with a class
* except the dodgy (Java 8) code you will find in {@link ClassDefinitionUtils}.
......
......@@ -17,9 +17,6 @@ package org.objenesis.instantiator.util;
import org.junit.Test;
import org.objenesis.Objenesis;
import org.objenesis.ObjenesisException;
import java.util.ArrayList;
import static org.junit.Assert.*;
......
......@@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.objenesis</groupId>
<artifactId>objenesis-parent</artifactId>
<version>3.0</version>
<version>3.0.1</version>
<packaging>pom</packaging>
<name>Objenesis parent project</name>
......@@ -54,7 +54,7 @@
<url>https://github.com/easymock/objenesis</url>
<developerConnection>scm:git:git@github.com:easymock/objenesis.git</developerConnection>
<connection>scm:git:https://github.com/easymock/objenesis.git</connection>
<tag>3.0</tag>
<tag>3.0.1</tag>
</scm>
<developers>
......
......@@ -21,7 +21,7 @@
<parent>
<groupId>org.objenesis</groupId>
<artifactId>objenesis-parent</artifactId>
<version>3.0</version>
<version>3.0.1</version>
</parent>
<artifactId>objenesis-tck-android</artifactId>
<name>Objenesis Android TCK</name>
......
......@@ -51,15 +51,11 @@ public class ObjenesisTest extends AndroidTestCase {
@Override
public void exception(Candidate.CandidateType type, Exception exception) {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
PrintStream out = new PrintStream(buffer);
try {
try (PrintStream out = new PrintStream(buffer)) {
out.println("Exception when instantiating " + currentCandidate + " for " + type + ": ");
exception.printStackTrace(out);
fail(buffer.toString());
}
finally {
out.close();
}
}
@Override
......
......@@ -40,11 +40,7 @@ public class TckInstrumentation extends Instrumentation {
System.setOut(printStream);
System.setErr(printStream);
try {
launch();
} catch (IOException e) {
e.printStackTrace();
}
Bundle bundle = new Bundle();
String fromStdout = outputStream.toString();
......@@ -52,7 +48,7 @@ public class TckInstrumentation extends Instrumentation {
finish(Activity.RESULT_OK, bundle);
}
private void launch() throws IOException {
private void launch() {
TextReporter reporter = new TextReporter(System.out, System.err);
Main.run(reporter);
}
......
......@@ -21,7 +21,7 @@
<parent>
<groupId>org.objenesis</groupId>
<artifactId>objenesis-parent</artifactId>
<version>3.0</version>
<version>3.0.1</version>
</parent>
<artifactId>objenesis-tck</artifactId>
......@@ -106,6 +106,9 @@
<manifest>
<mainClass>org.objenesis.tck.Main</mainClass>
</manifest>
<manifestEntries>
<Automatic-Module-Name>org.objenesis.tck</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
......
......@@ -21,14 +21,14 @@
<parent>
<groupId>org.objenesis</groupId>
<artifactId>objenesis-parent</artifactId>
<version>3.0</version>
<version>3.0.1</version>
</parent>
<artifactId>objenesis-website</artifactId>
<name>Objenesis website</name>
<packaging>pom</packaging>
<!-- CHANGE THIS VERSION TO WHAT YOU NEED -->
<version>3.0</version>
<version>3.0.1</version>
<properties>
<javadoc>apidocs</javadoc>
......@@ -39,7 +39,7 @@
<dependency>
<groupId>org.objenesis</groupId>
<artifactId>objenesis</artifactId>
<version>3.0</version>
<version>3.0.1</version>
</dependency>
</dependencies>
......
......@@ -21,6 +21,12 @@
</head>
<body>
<h1>Version 3.0.1 (2018-10-18)</h1>
<ul>
<li>No Automatic-Module-Name in objenesis (#66)</li>
</ul>
<h1>Version 3.0 (2018-10-07)</h1>
<ul>
......