Skip to content

Commit

Permalink
#525 javax.xml.bind, fix dispatcher tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alessiostalla committed Sep 29, 2023
1 parent a8d6f15 commit 38040cf
Show file tree
Hide file tree
Showing 54 changed files with 128 additions and 144 deletions.
13 changes: 0 additions & 13 deletions demo-tt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,6 @@
<artifactId>diff</artifactId>
<version>1.1.11</version>
</dependency>
<!-- JAXB for Java 11+ -->
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ public void simpleScenario() throws Exception {
Class<?> c = javaResourceResolver.resolve(root, Class.class); //A.java
assertEquals("A", c.getName());
Field string = c.getField("string");
Object a = c.newInstance();
Object a = c.getConstructor().newInstance();
assertEquals("class A", string.get(a));

c = javaResourceResolver.resolve(root.resolveFile("b"), Class.class); //B.java
assertEquals("B", c.getName());
string = c.getField("string");
Object b = c.newInstance();
Object b = c.getConstructor().newInstance();
assertEquals("class B", string.get(b));
}

Expand All @@ -62,11 +62,11 @@ public void classWithPackage() throws Exception {
c = resourceResolver.resolve(root.resolveFile("pkg2"), Class.class);
assertEquals("some.pkg.Cls", c.getName());
}

protected ResourceResolver getResourceResolver() {
return new JavaResourceResolver();
}

protected ResourceResolver getResourceResolver(CodeBase codeBase) {
return new JavaResourceResolver(codeBase);
}
Expand Down Expand Up @@ -96,7 +96,7 @@ public void reload() throws Exception {
Class<?> c3 = javaResourceResolver.resolve(root, Class.class);
assertFalse(c1.equals(c3));
}

@Test
public void testCodebase() throws Exception {
ResourceResolver resourceResolver = getResourceResolver(new JavaCodeBase(VFS.getManager().resolveFile("res:java-codebase")));
Expand Down
Binary file modified dispatcher/src/test/resources/java-sources.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Marshaller;
import jakarta.xml.bind.Unmarshaller;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
Expand Down Expand Up @@ -95,7 +95,7 @@ protected void checkDirectories() throws QueueException {
public String enqueue(Email email) throws QueueException {
try {
Marshaller marshaller = jaxbContext.createMarshaller();
marshaller.setProperty(javax.xml.bind.Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
marshaller.setProperty(jakarta.xml.bind.Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
String emailId = RandomUtil.createRandomId(20);
File destinationFile = getEmailFile(emailId);
checkDirectory(queuedDirectory);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

package com.manydesigns.mail.queue.model;

import javax.xml.bind.annotation.*;
import jakarta.xml.bind.annotation.*;
import java.io.InputStream;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

package com.manydesigns.mail.queue.model;

import javax.xml.bind.annotation.*;
import jakarta.xml.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

package com.manydesigns.mail.queue.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlType;

/**
* @author Paolo Predonzani - paolo.predonzani@manydesigns.com
Expand Down
1 change: 0 additions & 1 deletion microservices/spring-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>com.manydesigns</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.web.server.LocalServerPort;

import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Response;
import jakarta.ws.rs.client.Client;
import jakarta.ws.rs.client.ClientBuilder;
import jakarta.ws.rs.client.WebTarget;
import jakarta.ws.rs.core.Response;
import java.io.InputStreamReader;
import java.sql.Connection;
import java.sql.SQLException;
Expand Down Expand Up @@ -128,4 +128,4 @@ public void canInvokeRESTResources() throws Exception {
@Autowired
public Persistence persistence;

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.Unmarshaller;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlElement;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
import org.apache.commons.configuration2.Configuration;
import org.eclipse.emf.ecore.EModelElement;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;

/**
* A property of an {@link Annotation annotation} on a model object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.eclipse.emf.ecore.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.xml.bind.annotation.*;
import jakarta.xml.bind.annotation.*;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

package com.manydesigns.portofino.model;

import javax.xml.bind.annotation.XmlRegistry;
import jakarta.xml.bind.annotation.XmlRegistry;

@XmlRegistry
public class ObjectFactory {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.manydesigns.portofino.model;

import javax.xml.bind.Unmarshaller;
import jakarta.xml.bind.Unmarshaller;

public interface Unmarshallable {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.manydesigns.portofino.resourceactions;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;

/**
* Represents a child action from another path.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import com.manydesigns.portofino.security.AccessLevel;
import org.apache.commons.lang.StringUtils;

import javax.xml.bind.annotation.*;
import jakarta.xml.bind.annotation.*;
import java.util.HashSet;
import java.util.Set;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

package com.manydesigns.portofino.resourceactions;

import javax.xml.bind.annotation.XmlRegistry;
import jakarta.xml.bind.annotation.XmlRegistry;

@XmlRegistry
public class ObjectFactory {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.manydesigns.portofino.security.AccessLevel;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import java.util.*;

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
import com.manydesigns.portofino.security.AccessLevel;
import com.manydesigns.portofino.security.RequiresPermissions;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlRootElement;
import java.util.ArrayList;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Unmarshaller;
import javax.xml.transform.stream.StreamSource;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import com.manydesigns.portofino.PortofinoProperties;
import com.manydesigns.portofino.cache.CacheResetListenerRegistry;
import com.manydesigns.portofino.config.ConfigurationSource;
import org.apache.commons.configuration2.Configuration;
import org.apache.commons.vfs2.FileObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.sse.OutboundSseEvent;
import javax.ws.rs.sse.Sse;
import javax.ws.rs.sse.SseEventSink;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.sse.OutboundSseEvent;
import jakarta.ws.rs.sse.Sse;
import jakarta.ws.rs.sse.SseEventSink;
import java.io.IOException;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import com.manydesigns.portofino.resourceactions.ConfigurationWithDefaults;
import com.manydesigns.portofino.resourceactions.ResourceActionConfiguration;

import javax.xml.bind.annotation.*;
import jakarta.xml.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.xml.bind.annotation.*;
import jakarta.xml.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

package com.manydesigns.portofino.resourceactions.crud.configuration;

import javax.xml.bind.annotation.XmlRegistry;
import jakarta.xml.bind.annotation.XmlRegistry;

@XmlRegistry
public class ObjectFactory {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.xml.bind.annotation.*;
import jakarta.xml.bind.annotation.*;

/*
* @author Paolo Predonzani - paolo.predonzani@manydesigns.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import com.manydesigns.portofino.security.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;

import javax.xml.bind.annotation.*;
import jakarta.xml.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

package com.manydesigns.portofino.resourceactions.crud.configuration.database;

import javax.xml.bind.annotation.XmlRegistry;
import jakarta.xml.bind.annotation.XmlRegistry;

@XmlRegistry
public class ObjectFactory {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
import com.manydesigns.portofino.database.model.Table;
import org.apache.commons.lang.StringUtils;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlType;

/**
* @author Paolo Predonzani - paolo.predonzani@manydesigns.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.manydesigns.portofino.resourceactions.crud.AbstractCrudAction;
import org.springframework.http.MediaType;

import javax.ws.rs.core.Response;
import jakarta.ws.rs.core.Response;

public interface CrudExporter {

Expand Down
Loading

0 comments on commit 38040cf

Please sign in to comment.