Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/mvn-release-prepare-perform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ jobs:
steps:
- id: 'checkout'
name: 'Step: Check Out Project'
uses: 'actions/checkout@v4'
uses: 'actions/checkout@v6'
with:
fetch-depth: 1
persist-credentials: false
- id: 'setup-java'
name: 'Step: Set Up Java and Maven'
uses: 'actions/setup-java@v4'
uses: 'actions/setup-java@v5'
with:
cache: 'maven'
distribution: 'temurin'
gpg-passphrase: 'GPG_PASSPHRASE'
gpg-private-key: '${{ secrets.GPG_PRIVATE_KEY }}'
java-version: '23'
mvn-toolchain-id: 'Temurin 23'
java-version: '25'
mvn-toolchain-id: 'Temurin 25'
mvn-toolchain-vendor: 'openjdk' # see ../../pom.xml
server-id: 'sonatype-oss-repository-hosting' # see https://github.com/microbean/microbean-parent/blob/master/pom.xml#L38
server-password: 'SONATYPE_OSSRH_PASSWORD'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/mvn-verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ jobs:
steps:
- id: 'checkout'
name: 'Step: Checkout'
uses: 'actions/checkout@v4'
uses: 'actions/checkout@v6'
with:
fetch-depth: 1
persist-credentials: false
- id: 'setup-java'
name: 'Step: Set Up Java and Maven'
uses: 'actions/setup-java@v4'
uses: 'actions/setup-java@v5'
with:
cache: 'maven'
distribution: 'temurin'
java-version: '23'
mvn-toolchain-id: 'Temurin 23'
java-version: '25'
mvn-toolchain-id: 'Temurin 25'
mvn-toolchain-vendor: 'openjdk' # see ../../pom.xml
- id: 'mvn-verify'
name: 'Step: Maven Verify'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependency:
<groupId>org.microbean</groupId>
<artifactId>microbean-proxy</artifactId>
<!-- Always check https://central.sonatype.com/artifact/org.microbean/microbean-proxy for up-to-date available versions. -->
<version>0.0.2</version>
<version>0.0.3</version>
</dependency>
```

Expand Down
86 changes: 30 additions & 56 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,11 @@
</issueManagement>

<distributionManagement>
<repository>
<id>sonatype-oss-repository-hosting</id>
<!-- See https://central.sonatype.org/publish/publish-maven/#distribution-management-and-authentication -->
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<site>
<id>Github Pages</id>
<name>microBean™ Proxy Site</name>
<url>https://microbean.github.io/microbean-proxy/</url>
</site>
<snapshotRepository>
<id>sonatype-oss-repository-hosting</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

<properties>
Expand All @@ -89,7 +80,6 @@
<releaseProfiles>deployment</releaseProfiles>
<scmCommentPrefix>[maven-release-plugin] [skip ci]</scmCommentPrefix>
<tagNameFormat>v@{project.version}</tagNameFormat>
<useReleaseProfile>false</useReleaseProfile>

<!-- maven-scm-publish-plugin properties;
see https://maven.apache.org/plugins/maven-scm-publish-plugin/publish-scm-mojo.html -->
Expand All @@ -101,12 +91,8 @@
<maven.site.deploy.skip>true</maven.site.deploy.skip>
<relativizeDecorationLinks>false</relativizeDecorationLinks>

<!-- nexus-staging-maven-plugin properties -->
<!-- See https://github.com/sonatype/nexus-maven-plugins/blob/0aee3defb33cb133ff536aba59b11d32a368b1e6/staging/maven-plugin/src/main/java/org/sonatype/nexus/maven/staging/AbstractStagingMojo.java#L169-L175 -->
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<!-- <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl> -->
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<stagingProgressTimeoutMinutes>10</stagingProgressTimeoutMinutes>
<!-- central-publishing-maven-plugin properties -->
<deploymentName>${project.name} v${project.version}</deploymentName>

<!-- Other properties -->
<project.build.sourceEncoding>UTF8</project.build.sourceEncoding>
Expand All @@ -125,7 +111,7 @@
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.12.2</version>
<version>6.0.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -135,19 +121,19 @@
<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-attributes</artifactId>
<version>0.0.2</version>
<version>0.0.5</version>
</dependency>

<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-bean</artifactId>
<version>0.0.18</version>
<version>0.0.20</version>
</dependency>

<dependency>
<groupId>org.microbean</groupId>
<artifactId>microbean-construct</artifactId>
<version>0.0.10</version>
<version>0.0.18</version>
</dependency>

</dependencies>
Expand Down Expand Up @@ -194,11 +180,11 @@
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.1</version>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
Expand Down Expand Up @@ -308,13 +294,13 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.23.1</version>
<version>12.1.2</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.4.1</version>
<version>3.5.0</version>
<configuration>
<filesets>
<fileset>
Expand All @@ -329,7 +315,7 @@
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.14.0</version>
<version>3.14.1</version>
<configuration>
<compilerArgs>
<arg>-Xlint:all</arg>
Expand All @@ -339,32 +325,31 @@
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.8.1</version>
<version>3.9.0</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.4</version>
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.5.0</version>
<version>3.6.2</version>
</plugin>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<!-- <version>3.1.0</version> -->
<version>3.2.7</version>
<version>3.2.8</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.4</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
<version>3.5.0</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.11.2</version>
<version>3.12.0</version>
<configuration>
<docfilessubdirs>true</docfilessubdirs>
<tags>
Expand Down Expand Up @@ -396,16 +381,15 @@
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<!-- <version>3.0.0-M6</version> --> <!-- see https://issues.apache.org/jira/browse/MRELEASE-1038 -->
<version>3.1.1</version>
<version>3.3.1</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<version>3.4.0</version>
</plugin>
<plugin>
<artifactId>maven-scm-plugin</artifactId>
<version>2.1.0</version>
<version>2.2.1</version>
</plugin>
<plugin>
<artifactId>maven-scm-publish-plugin</artifactId>
Expand All @@ -417,7 +401,7 @@
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<version>3.4.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -429,7 +413,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.3</version>
<version>3.5.4</version>
</plugin>
<plugin>
<artifactId>maven-toolchains-plugin</artifactId>
Expand All @@ -438,35 +422,25 @@
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.9.3.0</version>
<version>4.9.8.2</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.18.0</version>
<version>2.20.1</version>
</plugin>
<plugin>
<groupId>io.smallrye</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>3.3.0</version>
<version>3.5.3</version>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.9.0</version>
<extensions>true</extensions>
<dependencies>
<!-- https://issues.sonatype.org/browse/NEXUS-26993?focusedCommentId=1098136&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-1098136 -->
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.20</version>
</dependency>
</dependencies>
<configuration>
<serverId>sonatype-oss-repository-hosting</serverId>
<nexusUrl>${nexusUrl}</nexusUrl>
<autoReleaseAfterClose>${autoReleaseAfterClose}</autoReleaseAfterClose>
<publishingServerId>central.sonatype.com</publishingServerId>
</configuration>
</plugin>
</plugins>
Expand Down Expand Up @@ -512,8 +486,8 @@
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>

Expand Down
26 changes: 22 additions & 4 deletions src/main/java/org/microbean/proxy/AbstractProxier.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
*/
package org.microbean.proxy;

import java.util.Objects;

import java.util.function.Supplier;

import org.microbean.construct.Domain;

import static java.util.Objects.requireNonNull;

/**
* An abstract base class for subclassses that create {@linkplain Proxy proxies}.
*
Expand All @@ -29,8 +29,20 @@
public abstract sealed class AbstractProxier<PS extends ProxySpecification>
permits AbstractReflectiveProxier, AbstractToolkitProxier {


/*
* Instance fields.
*/


private final Domain domain;


/*
* Constructors.
*/


/**
* Creates a new {@link AbstractProxier} implementation.
*
Expand All @@ -39,9 +51,15 @@ public abstract sealed class AbstractProxier<PS extends ProxySpecification>
* @exception NullPointerException if {@code domain} is {@code null}
*/
protected AbstractProxier(final Domain domain) {
this.domain = Objects.requireNonNull(domain, "domain");
this.domain = requireNonNull(domain, "domain");
}


/*
* Instance methods.
*/


/**
* Returns the {@link ClassLoader} for loading classes.
*
Expand All @@ -55,7 +73,7 @@ protected AbstractProxier(final Domain domain) {
protected ClassLoader classLoader() {
return Thread.currentThread().getContextClassLoader();
}

/**
* Returns the {@link Domain} supplied at construction time.
*
Expand Down
Loading