From 31fd9dcfd8f7d690dcabafa06e4a6a5bb68519a5 Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Sun, 18 Feb 2024 17:53:41 +0100 Subject: [PATCH] fix whitespaces (tabs to spaces) Signed-off-by: Lukas Jungmann --- .../main/java/jakarta/xml/bind/Binder.java | 4 +--- .../jakarta/xml/bind/DatatypeConverter.java | 6 +++--- .../java/jakarta/xml/bind/JAXBElement.java | 6 +++--- .../jakarta/xml/bind/JAXBIntrospector.java | 14 ++++++------- .../java/jakarta/xml/bind/Marshaller.java | 6 +++--- .../jakarta/xml/bind/PropertyException.java | 21 +++++++++---------- .../xml/bind/annotation/XmlAccessorOrder.java | 6 +++--- .../jakarta/xml/bind/annotation/XmlEnum.java | 1 - .../jakarta/xml/bind/annotation/XmlMixed.java | 19 ++++++++--------- .../jakarta/xml/bind/annotation/XmlNs.java | 1 - .../xml/bind/annotation/XmlSchemaType.java | 1 - .../jakarta/xml/bind/annotation/XmlType.java | 5 ++--- .../adapters/XmlJavaTypeAdapter.java | 3 +-- .../jakarta/xml/bind/util/JAXBResult.java | 4 ++-- .../jakarta/xml/bind/util/JAXBSource.java | 2 +- 15 files changed, 45 insertions(+), 54 deletions(-) diff --git a/api/src/main/java/jakarta/xml/bind/Binder.java b/api/src/main/java/jakarta/xml/bind/Binder.java index 89305d6..d53dba5 100644 --- a/api/src/main/java/jakarta/xml/bind/Binder.java +++ b/api/src/main/java/jakarta/xml/bind/Binder.java @@ -146,9 +146,7 @@ protected Binder() {} * If any of the input parameters are null * @since 1.6, JAXB 2.0 */ - public abstract JAXBElement - unmarshal( XmlNode xmlNode, Class declaredType ) - throws JAXBException; + public abstract JAXBElement unmarshal( XmlNode xmlNode, Class declaredType ) throws JAXBException; /** * Marshal a Jakarta XML Binding object tree to a new XML document. diff --git a/api/src/main/java/jakarta/xml/bind/DatatypeConverter.java b/api/src/main/java/jakarta/xml/bind/DatatypeConverter.java index ab23e3a..c6db93e 100644 --- a/api/src/main/java/jakarta/xml/bind/DatatypeConverter.java +++ b/api/src/main/java/jakarta/xml/bind/DatatypeConverter.java @@ -289,7 +289,7 @@ public static byte parseByte( String lexicalXSDByte ) { * if namespace prefix of {@code lexicalXSDQname} is not bound to a URI in NamespaceContext {@code nsc}. */ public static javax.xml.namespace.QName parseQName( String lexicalXSDQName, - NamespaceContext nsc) { + NamespaceContext nsc) { if (theConverter == null) initConverter(); return theConverter.parseQName( lexicalXSDQName, nsc ); } @@ -364,7 +364,7 @@ public static long parseUnsignedInt( String lexicalXSDUnsignedInt ) { * An int value represented by the string argument. * @throws NumberFormatException if string parameter can not be parsed into an {@code int} value. */ - public static int parseUnsignedShort( String lexicalXSDUnsignedShort ) { + public static int parseUnsignedShort( String lexicalXSDUnsignedShort ) { if (theConverter == null) initConverter(); return theConverter.parseUnsignedShort( lexicalXSDUnsignedShort ); } @@ -423,7 +423,7 @@ public static String parseAnySimpleType( String lexicalXSDAnySimpleType ) { */ // also indicate the print methods produce a lexical // representation for given Java datatypes. - + public static String printString( String val ) { if (theConverter == null) initConverter(); return theConverter.printString( val ); diff --git a/api/src/main/java/jakarta/xml/bind/JAXBElement.java b/api/src/main/java/jakarta/xml/bind/JAXBElement.java index cc6e2a2..77511fb 100644 --- a/api/src/main/java/jakarta/xml/bind/JAXBElement.java +++ b/api/src/main/java/jakarta/xml/bind/JAXBElement.java @@ -91,9 +91,9 @@ private GlobalScope() {} * @see #isTypeSubstituted() */ public JAXBElement(QName name, - Class declaredType, - Class scope, - T value) { + Class declaredType, + Class scope, + T value) { if(declaredType==null || name==null) throw new IllegalArgumentException(); this.declaredType = declaredType; diff --git a/api/src/main/java/jakarta/xml/bind/JAXBIntrospector.java b/api/src/main/java/jakarta/xml/bind/JAXBIntrospector.java index 34f9bb0..04a5e2d 100644 --- a/api/src/main/java/jakarta/xml/bind/JAXBIntrospector.java +++ b/api/src/main/java/jakarta/xml/bind/JAXBIntrospector.java @@ -72,12 +72,12 @@ protected JAXBIntrospector() {} * @return The element value of the jaxbElement. */ public static Object getValue(Object jaxbElement) { - if (jaxbElement instanceof JAXBElement) { - return ((JAXBElement)jaxbElement).getValue(); - } else { - // assume that class of this instance is - // annotated with @XmlRootElement. - return jaxbElement; - } + if (jaxbElement instanceof JAXBElement) { + return ((JAXBElement)jaxbElement).getValue(); + } else { + // assume that class of this instance is + // annotated with @XmlRootElement. + return jaxbElement; + } } } diff --git a/api/src/main/java/jakarta/xml/bind/Marshaller.java b/api/src/main/java/jakarta/xml/bind/Marshaller.java index b5fa058..62d85e3 100644 --- a/api/src/main/java/jakarta/xml/bind/Marshaller.java +++ b/api/src/main/java/jakarta/xml/bind/Marshaller.java @@ -177,11 +177,11 @@ *
*
{@code jaxb.encoding} - value must be a java.lang.String
*
The output encoding to use when marshalling the XML data. The - * Marshaller will use "UTF-8" by default if this property is not - * specified.
+ * Marshaller will use "UTF-8" by default if this property is not + * specified. *
{@code jaxb.formatted.output} - value must be a java.lang.Boolean
*
This property controls whether or not the Marshaller will format - * the resulting XML data with line breaks and indentation. A + * the resulting XML data with line breaks and indentation. A * true value for this property indicates human readable indented * xml data, while a false value indicates unformatted xml data. * The Marshaller will default to false (unformatted) if this diff --git a/api/src/main/java/jakarta/xml/bind/PropertyException.java b/api/src/main/java/jakarta/xml/bind/PropertyException.java index f559c95..524524b 100644 --- a/api/src/main/java/jakarta/xml/bind/PropertyException.java +++ b/api/src/main/java/jakarta/xml/bind/PropertyException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2024 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 @@ -32,7 +32,7 @@ public class PropertyException extends JAXBException { * @param message a description of the exception */ public PropertyException(String message) { - super(message); + super(message); } /** @@ -43,7 +43,7 @@ public PropertyException(String message) { * @param errorCode a string specifying the vendor specific error code */ public PropertyException(String message, String errorCode) { - super(message, errorCode); + super(message, errorCode); } /** @@ -53,7 +53,7 @@ public PropertyException(String message, String errorCode) { * @param exception the linked exception */ public PropertyException(Throwable exception) { - super(exception); + super(exception); } /** @@ -64,7 +64,7 @@ public PropertyException(Throwable exception) { * @param exception the linked exception */ public PropertyException(String message, Throwable exception) { - super(message, exception); + super(message, exception); } /** @@ -75,11 +75,10 @@ public PropertyException(String message, Throwable exception) { * @param errorCode a string specifying the vendor specific error code * @param exception the linked exception */ - public PropertyException( - String message, - String errorCode, - Throwable exception) { - super(message, errorCode, exception); + public PropertyException(String message, + String errorCode, + Throwable exception) { + super(message, errorCode, exception); } /** @@ -90,7 +89,7 @@ public PropertyException( * @param value the value of the property related to this exception */ public PropertyException(String name, Object value) { - super( Messages.format( Messages.NAME_VALUE, + super( Messages.format( Messages.NAME_VALUE, name, value.toString() ) ); } diff --git a/api/src/main/java/jakarta/xml/bind/annotation/XmlAccessorOrder.java b/api/src/main/java/jakarta/xml/bind/annotation/XmlAccessorOrder.java index 3999f11..5027f45 100644 --- a/api/src/main/java/jakarta/xml/bind/annotation/XmlAccessorOrder.java +++ b/api/src/main/java/jakarta/xml/bind/annotation/XmlAccessorOrder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2024 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 @@ -51,7 +51,7 @@ *

This annotation can be used with the following annotations: * {@link XmlType}, {@link XmlRootElement}, {@link XmlAccessorType}, * {@link XmlSchema}, {@link XmlSchemaType}, {@link XmlSchemaTypes}, - * , {@link XmlJavaTypeAdapter}. It can also be used with the + * {@link XmlJavaTypeAdapter}. It can also be used with the * following annotations at the package level: {@link XmlJavaTypeAdapter}. * * @author Sekhar Vajjhala, Sun Microsystems, Inc. @@ -61,5 +61,5 @@ @Inherited @Retention(RUNTIME) @Target({PACKAGE, TYPE}) public @interface XmlAccessorOrder { - XmlAccessOrder value() default XmlAccessOrder.UNDEFINED; + XmlAccessOrder value() default XmlAccessOrder.UNDEFINED; } diff --git a/api/src/main/java/jakarta/xml/bind/annotation/XmlEnum.java b/api/src/main/java/jakarta/xml/bind/annotation/XmlEnum.java index 5ece1d8..f235295 100644 --- a/api/src/main/java/jakarta/xml/bind/annotation/XmlEnum.java +++ b/api/src/main/java/jakarta/xml/bind/annotation/XmlEnum.java @@ -49,7 +49,6 @@ * * @since 1.6, JAXB 2.0 */ - @Retention(RUNTIME) @Target({TYPE}) public @interface XmlEnum { /** diff --git a/api/src/main/java/jakarta/xml/bind/annotation/XmlMixed.java b/api/src/main/java/jakarta/xml/bind/annotation/XmlMixed.java index c12ba5c..7e707a1 100644 --- a/api/src/main/java/jakarta/xml/bind/annotation/XmlMixed.java +++ b/api/src/main/java/jakarta/xml/bind/annotation/XmlMixed.java @@ -60,24 +60,24 @@ * import java.math.BigInteger; * public class ObjectFactory { * // element instance factories - * JAXBElement createLetterBody(LetterBody value); - * JAXBElement createLetterBodyName(String value); - * JAXBElement createLetterBodyQuantity(BigInteger value); - * JAXBElement createLetterBodyProductName(String value); + * JAXBElement createLetterBody(LetterBody value); + * JAXBElement createLetterBodyName(String value); + * JAXBElement createLetterBodyQuantity(BigInteger value); + * JAXBElement createLetterBodyProductName(String value); * // type instance factory - * LetterBody createLetterBody(); + * LetterBody createLetterBody(); * } * } * {@snippet : * public class LetterBody { - * // Mixed content can contain instances of Element classes - * // Name, Quantity and ProductName. Text data is represented as + * // Mixed content can contain instances of Element classes + * // Name, Quantity and ProductName. Text data is represented as * // java.util.String for text. * @XmlMixed * @XmlElementRef(name="productName", type=JAXBElement.class) * @XmlElementRef(name="quantity", type=JAXBElement.class) * @XmlElementRef(name="name", type=JAXBElement.class) - * List getContent(){...} + * List getContent() {...} * } * } * The following is an XML instance document with mixed content @@ -100,8 +100,7 @@ * gcl.add("Your order of "); // add text information item as a String * * // add children element information items - * gcl.add(ObjectFactory. - * createLetterBodyQuantity(new BigInteger("1"))); + * gcl.add(ObjectFactory.createLetterBodyQuantity(new BigInteger("1"))); * gcl.add(ObjectFactory.createLetterBodyProductName("Baby Monitor")); * gcl.add("shipped from our warehouse"); // add text information item * } diff --git a/api/src/main/java/jakarta/xml/bind/annotation/XmlNs.java b/api/src/main/java/jakarta/xml/bind/annotation/XmlNs.java index 5fae5cd..1bdbbaf 100644 --- a/api/src/main/java/jakarta/xml/bind/annotation/XmlNs.java +++ b/api/src/main/java/jakarta/xml/bind/annotation/XmlNs.java @@ -29,7 +29,6 @@ * @author Sekhar Vajjhala, Sun Microsystems, Inc. * @since 1.6, JAXB 2.0 */ - @Retention(RUNTIME) @Target({}) public @interface XmlNs { /** diff --git a/api/src/main/java/jakarta/xml/bind/annotation/XmlSchemaType.java b/api/src/main/java/jakarta/xml/bind/annotation/XmlSchemaType.java index ebaa6c0..12159a3 100644 --- a/api/src/main/java/jakarta/xml/bind/annotation/XmlSchemaType.java +++ b/api/src/main/java/jakarta/xml/bind/annotation/XmlSchemaType.java @@ -70,7 +70,6 @@ * * @since 1.6, JAXB 2.0 */ - @Retention(RUNTIME) @Target({FIELD,METHOD,PACKAGE}) public @interface XmlSchemaType { String name(); diff --git a/api/src/main/java/jakarta/xml/bind/annotation/XmlType.java b/api/src/main/java/jakarta/xml/bind/annotation/XmlType.java index edda53b..1854401 100644 --- a/api/src/main/java/jakarta/xml/bind/annotation/XmlType.java +++ b/api/src/main/java/jakarta/xml/bind/annotation/XmlType.java @@ -337,7 +337,7 @@ * } * * public class USAddressFactory { - * public static USAddress getUSAddress(){ + * public static USAddress getUSAddress() { * return new USAddress("Mark Baker", "23 Elm St", * "Dayton", "OH", 90952); * } @@ -359,7 +359,7 @@ * * private USAddress() {} * - * public static USAddress getNewInstance(){ + * public static USAddress getNewInstance() { * return new USAddress(); * } * } @@ -372,7 +372,6 @@ * @see XmlSchema * @since 1.6, JAXB 2.0 */ - @Retention(RUNTIME) @Target({TYPE}) public @interface XmlType { /** diff --git a/api/src/main/java/jakarta/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java b/api/src/main/java/jakarta/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java index 2d51d55..3eb0b15 100644 --- a/api/src/main/java/jakarta/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java +++ b/api/src/main/java/jakarta/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2024 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 @@ -74,7 +74,6 @@ * @since 1.6, JAXB 2.0 * @see XmlAdapter */ - @Retention(RUNTIME) @Target({PACKAGE,FIELD,METHOD,TYPE,PARAMETER}) public @interface XmlJavaTypeAdapter { /** diff --git a/api/src/main/java/jakarta/xml/bind/util/JAXBResult.java b/api/src/main/java/jakarta/xml/bind/util/JAXBResult.java index 3b443a0..4813001 100644 --- a/api/src/main/java/jakarta/xml/bind/util/JAXBResult.java +++ b/api/src/main/java/jakarta/xml/bind/util/JAXBResult.java @@ -53,7 +53,7 @@ * setLexicalHandler, and setSystemId methods. * * @author - * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com) + * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com) * @since 1.6 */ public class JAXBResult extends SAXResult { @@ -113,7 +113,7 @@ public JAXBResult( Unmarshaller _unmarshaller ) throws JAXBException { * Always return a non-null object. * * @exception IllegalStateException - * if this method is called before an object is unmarshalled. + * if this method is called before an object is unmarshalled. * * @exception JAXBException * if there is any unmarshalling error. diff --git a/api/src/main/java/jakarta/xml/bind/util/JAXBSource.java b/api/src/main/java/jakarta/xml/bind/util/JAXBSource.java index a261912..495b716 100644 --- a/api/src/main/java/jakarta/xml/bind/util/JAXBSource.java +++ b/api/src/main/java/jakarta/xml/bind/util/JAXBSource.java @@ -69,7 +69,7 @@ * returned by the getXMLReader. * * @author - * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com) + * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com) * @since 1.6 */ public class JAXBSource extends SAXSource {