Skip to content

Commit

Permalink
add missing override
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
  • Loading branch information
lukasj committed Mar 17, 2022
1 parent d222ad9 commit 1c91d7a
Show file tree
Hide file tree
Showing 413 changed files with 2,276 additions and 283 deletions.
Expand Up @@ -57,6 +57,7 @@ public class JAXBContextWrapper implements BindingContext {
jaxbContext = (org.eclipse.persistence.jaxb.JAXBContext) cxt;
infoMap = map;
mpool = new ObjectPool<>() {
@Override
protected JAXBMarshaller newInstance() {
try {
return jaxbContext.createMarshaller();
Expand All @@ -67,6 +68,7 @@ protected JAXBMarshaller newInstance() {
}
};
upool = new ObjectPool<>() {
@Override
protected JAXBUnmarshaller newInstance() {
try {
return jaxbContext.createUnmarshaller();
Expand All @@ -81,26 +83,32 @@ protected JAXBUnmarshaller newInstance() {
seiModel = model;
}

@Override
public String getBuildId() {
return Version.getBuildRevision();
}

@Override
public XMLBridge createBridge(TypeInfo ref) {
return WrapperComposite.class.equals(ref.type) ? new com.sun.xml.ws.spi.db.WrapperBridge(this, ref) : new JAXBBond(this, ref);
}

@Override
public XMLBridge createFragmentBridge() {
return new JAXBBond(this, null);
}

@Override
public Marshaller createMarshaller() throws JAXBException {
return jaxbContext.createMarshaller();
}

@Override
public Unmarshaller createUnmarshaller() throws JAXBException {
return jaxbContext.createUnmarshaller();
}

@Override
public void generateSchema(SchemaOutputResolver outputResolver)
throws IOException {
jaxbContext.generateSchema(outputResolver);
Expand All @@ -110,12 +118,14 @@ public void generateSchema(SchemaOutputResolver outputResolver)
}
}

@Override
public QName getElementName(Object o) throws JAXBException {
// TODO Auto-generated method stub
return null;
}

public QName getElementName(Class cls) throws JAXBException {
@Override
public QName getElementName(Class cls) throws JAXBException {
XmlRootElement xre = (XmlRootElement) cls.getAnnotation(XmlRootElement.class);
XmlType xt = (XmlType) cls.getAnnotation(XmlType.class);
if (xt != null && xt.name() != null && !"".equals(xt.name())) return null;
Expand All @@ -131,6 +141,7 @@ public QName getElementName(Class cls) throws JAXBException {
return null;
}

@Override
public <B, V> PropertyAccessor<B, V> getElementPropertyAccessor(Class<B> wrapperBean, String ns, String name) throws JAXBException {
JAXBWrapperAccessor wa = wrapperAccessors.get(wrapperBean);
if (wa == null) {
Expand All @@ -140,26 +151,31 @@ public <B, V> PropertyAccessor<B, V> getElementPropertyAccessor(Class<B> wrapper
return wa.getPropertyAccessor(ns, name);
}

@Override
public JAXBContext getJAXBContext() {
return jaxbContext;
}

@Override
public List<String> getKnownNamespaceURIs() {
// TODO
return new ArrayList<>();
}

@Override
public QName getTypeName(TypeInfo tr) {
if (typeNames == null) typeNames = jaxbContext.getTypeMappingInfoToSchemaType();
TypeMappingInfo tmi = infoMap.get(tr);
return typeNames.get(tmi);
}

@Override
public boolean hasSwaRef() {
return hasSwaRef;
}

public Object newWrapperInstace(Class<?> wrapperType)
@Override
public Object newWrapperInstace(Class<?> wrapperType)
throws ReflectiveOperationException {
return wrapperType.getConstructor().newInstance();
}
Expand Down
Expand Up @@ -60,26 +60,32 @@ public SAX2DOMContentHandler(Document d) {
prefixMappings = new HashMap<>();
}

@Override
public void setDocumentLocator(Locator locator) {
//To change body of implemented methods use File | Settings | File Templates.
}

@Override
public void startDocument() throws SAXException {
//To change body of implemented methods use File | Settings | File Templates.
}

@Override
public void endDocument() throws SAXException {
//To change body of implemented methods use File | Settings | File Templates.
}

@Override
public void startPrefixMapping(String prefix, String uri) throws SAXException {
prefixMappings.put(prefix, uri);
}

@Override
public void endPrefixMapping(String string) throws SAXException {
//To change body of implemented methods use File | Settings | File Templates.
}

@Override
public void startElement(String ns, String local, String qname, Attributes attributes) throws SAXException {
if (stack.isEmpty()) {
throw new SAXException("invalid state");
Expand Down Expand Up @@ -116,10 +122,12 @@ public void startElement(String ns, String local, String qname, Attributes attri
stack.push(e);
}

@Override
public void endElement(String string, String string1, String string2) throws SAXException {
stack.pop();
}

@Override
public void characters(char[] chars, int i, int i1) throws SAXException {
Text text = doc.createTextNode(new String(chars, i, i1));
if (stack.isEmpty()) {
Expand All @@ -129,10 +137,12 @@ public void characters(char[] chars, int i, int i1) throws SAXException {
node.appendChild(text);
}

@Override
public void ignorableWhitespace(char[] chars, int i, int i1) throws SAXException {
//To change body of implemented methods use File | Settings | File Templates.
}

@Override
public void processingInstruction(String string, String string1) throws SAXException {
ProcessingInstruction pi = doc.createProcessingInstruction(string, string1);
if (stack.isEmpty()) {
Expand All @@ -142,6 +152,7 @@ public void processingInstruction(String string, String string1) throws SAXExcep
node.appendChild(pi);
}

@Override
public void skippedEntity(String string) throws SAXException {
//To change body of implemented methods use File | Settings | File Templates.
}
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -33,26 +33,31 @@ public class SDOAttachmentMarshaller implements XMLAttachmentMarshaller {
public SDOAttachmentMarshaller(jakarta.xml.bind.attachment.AttachmentMarshaller jbm) {
this.jbm = jbm;
}
@Override
public String addSwaRefAttachment(byte[] data, int start, int length) {
final ByteArrayInputStream bais = new ByteArrayInputStream(data, start, length);
DataSource ds = new DataSource() {

//@Override
@Override
public String getContentType() {
return "application/data";
}

//@Override
@Override
public InputStream getInputStream() throws IOException {
return bais;
}

//@Override
@Override
public String getName() {
return "";
}

//@Override
@Override
public OutputStream getOutputStream() throws IOException {
return null;
}
Expand All @@ -62,20 +67,24 @@ public OutputStream getOutputStream() throws IOException {
}


@Override
public String addMtomAttachment(DataHandler dh, String elementNamespace, String elementLocalName) {
return jbm.addMtomAttachment(dh, elementNamespace, elementLocalName);
}

@Override
public String addMtomAttachment(byte[] data, int offset, int length,
String mimeType, String elementNamespace, String elementLocalName) {
return jbm.addMtomAttachment(data, offset, length, mimeType, elementNamespace, elementLocalName);
}


@Override
public String addSwaRefAttachment(DataHandler dh) {
return jbm.addSwaRefAttachment(dh);
}

@Override
public boolean isXOPPackage() {
return jbm.isXOPPackage();
}
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -30,14 +30,17 @@ public SDOAttachmentUnmarshaller(jakarta.xml.bind.attachment.AttachmentUnmarshal
this.jbu = jbu;
}

@Override
public byte[] getAttachmentAsByteArray(String cid) {
return jbu.getAttachmentAsByteArray(cid);
}

@Override
public DataHandler getAttachmentAsDataHandler(String cid) {
return jbu.getAttachmentAsDataHandler(cid);
}

@Override
public boolean isXOPPackage() {
return jbu.isXOPPackage();
}
Expand Down
Expand Up @@ -56,6 +56,7 @@ public SDODatabindingException(Throwable throwable) {
super(throwable);
}

@Override
public String getMessage() {
Throwable cause = getCause();
if (cause != null && cause.getMessage() != null && !super.getMessage().equals(cause.getMessage())) {
Expand Down
Expand Up @@ -45,6 +45,7 @@ public SDODatabindingSchemaResolver(List<Source> schemas, EntityResolver resolve
externalResolver = resolver;
}

@Override
public Source resolveSchema(Source sourceXSD, String namespace,
String schemaLocation) {

Expand Down
Expand Up @@ -186,18 +186,22 @@ public SAXLocator(String publicId, String systemId, int lineNumber, int columnNu
this.columnNumber = columnNumber;
}

@Override
public String getPublicId() {
return publicId;
}

@Override
public String getSystemId() {
return systemId;
}

@Override
public int getLineNumber() {
return lineNumber;
}

@Override
public int getColumnNumber() {
return columnNumber;
}
Expand Down
Expand Up @@ -70,6 +70,7 @@ protected File getDefaultSrcOut() {
return new File(project.getBuild().getDirectory(), "generated-sources/wsgen");
}

@Override
protected void processSei(String sei) throws MojoExecutionException {
getLog().info("Processing: " + sei);
List<String> args = getWsGenArgs(sei, false);
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -35,10 +35,12 @@ public NonAnonymousResponsesReceiver getReceiver() {
return receiver;
}

@Override
public String getID() {
return ID;
}

@Override
public boolean isEnabled() {
return true;
}
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand All @@ -19,6 +19,7 @@
* @author Rama.Pulavarthi@sun.com
*/
public class AsyncClientTransportTubeFactory extends TransportTubeFactory {
@Override
public Tube doCreate(@NotNull ClientTubeAssemblerContext context) {
if (context.getBinding().getAddressingVersion() == null ||!context.getBinding().isFeatureEnabled(AsyncClientTransportFeature.class)) {
return null;
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -61,11 +61,13 @@ public void sendAsync(Packet request, final Fiber.CompletionCallback completionC
Fiber fiber = engine.createFiber();
final Tube tube = tubelinePool.take();
fiber.start(tube, request, new Fiber.CompletionCallback() {
@Override
public void onCompletion(@NotNull Packet response) {
tubelinePool.recycle(tube);
completionCallback.onCompletion(response);
}

@Override
public void onCompletion(@NotNull Throwable error) {
// let's not reuse tubes as they might be in a wrong state, so not
// calling tubePool.recycle()
Expand All @@ -74,6 +76,7 @@ public void onCompletion(@NotNull Throwable error) {
});
}

@Override
public void close() {
if (tubelinePool != null) {
// multi-thread safety of 'close' needs to be considered more carefully.
Expand Down
Expand Up @@ -34,6 +34,7 @@ public FileSystemResourceLoader(File root) {
this.root = root;
}

@Override
public URL getResource(String path) throws MalformedURLException {
try {
return new File(root+path).getCanonicalFile().toURI().toURL();
Expand All @@ -42,10 +43,12 @@ public URL getResource(String path) throws MalformedURLException {
}
}

@Override
public URL getCatalogFile() throws MalformedURLException {
return getResource("/WEB-INF/jax-ws-catalog.xml");
}

@Override
public Set<String> getResourcePaths(String path) {
Set<String> r = new HashSet<>();
File[] files = new File(root+path).listFiles();
Expand Down

0 comments on commit 1c91d7a

Please sign in to comment.