Skip to content

Commit

Permalink
Bump JAXB from 3.0.X to 4.0.X
Browse files Browse the repository at this point in the history
  • Loading branch information
hs536 authored and jansupol committed Mar 17, 2022
1 parent cbc7b32 commit fe9829b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -22,7 +22,6 @@
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Marshaller;
import jakarta.xml.bind.Unmarshaller;
import jakarta.xml.bind.Validator;

import org.glassfish.jersey.jettison.internal.BaseJsonMarshaller;
import org.glassfish.jersey.jettison.internal.BaseJsonUnmarshaller;
Expand Down Expand Up @@ -300,15 +299,4 @@ public Unmarshaller createUnmarshaller() throws JAXBException {
public Marshaller createMarshaller() throws JAXBException {
return new JettisonJaxbMarshaller(jaxbContext, getJSONConfiguration());
}

/**
* Simply delegates to underlying JAXBContext implementation.
*
* @return what underlying JAXBContext returns
* @throws jakarta.xml.bind.JAXBException
*/
@Override
public Validator createValidator() throws JAXBException {
return jaxbContext.createValidator();
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -128,17 +128,17 @@ public ValidationEventHandler getEventHandler() throws JAXBException {
}

@Override
public void setAdapter(XmlAdapter adapter) {
public <A extends XmlAdapter<?, ?>> void setAdapter(A adapter) {
jaxbMarshaller.setAdapter(adapter);
}

@Override
public <A extends XmlAdapter> void setAdapter(Class<A> type, A adapter) {
public <A extends XmlAdapter<?, ?>> void setAdapter(Class<A> type, A adapter) {
jaxbMarshaller.setAdapter(type, adapter);
}

@Override
public <A extends XmlAdapter> A getAdapter(Class<A> type) {
public <A extends XmlAdapter<?, ?>> A getAdapter(Class<A> type) {
return jaxbMarshaller.getAdapter(type);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -122,16 +122,6 @@ public UnmarshallerHandler getUnmarshallerHandler() {
return this.jaxbUnmarshaller.getUnmarshallerHandler();
}

@Override
public void setValidating(boolean validating) throws JAXBException {
this.jaxbUnmarshaller.setValidating(validating);
}

@Override
public boolean isValidating() throws JAXBException {
return this.jaxbUnmarshaller.isValidating();
}

@Override
public void setEventHandler(ValidationEventHandler validationEventHandler) throws JAXBException {
this.jaxbUnmarshaller.setEventHandler(validationEventHandler);
Expand Down Expand Up @@ -163,17 +153,17 @@ public Schema getSchema() {
}

@Override
public void setAdapter(XmlAdapter xmlAdapter) {
public <A extends XmlAdapter<?, ?>> void setAdapter(A xmlAdapter) {
this.jaxbUnmarshaller.setAdapter(xmlAdapter);
}

@Override
public <A extends XmlAdapter> void setAdapter(Class<A> type, A adapter) {
public <A extends XmlAdapter<?, ?>> void setAdapter(Class<A> type, A adapter) {
this.jaxbUnmarshaller.setAdapter(type, adapter);
}

@Override
public <A extends XmlAdapter> A getAdapter(Class<A> type) {
public <A extends XmlAdapter<?, ?>> A getAdapter(Class<A> type) {
return this.jaxbUnmarshaller.getAdapter(type);
}

Expand Down

0 comments on commit fe9829b

Please sign in to comment.