Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix whitespaces (tabs to spaces) #299

Merged
merged 1 commit into from
Feb 18, 2024
Merged
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
4 changes: 1 addition & 3 deletions api/src/main/java/jakarta/xml/bind/Binder.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ protected Binder() {}
* If any of the input parameters are null
* @since 1.6, JAXB 2.0
*/
public abstract <T> JAXBElement<T>
unmarshal( XmlNode xmlNode, Class<T> declaredType )
throws JAXBException;
public abstract <T> JAXBElement<T> unmarshal( XmlNode xmlNode, Class<T> declaredType ) throws JAXBException;

/**
* Marshal a Jakarta XML Binding object tree to a new XML document.
Expand Down
6 changes: 3 additions & 3 deletions api/src/main/java/jakarta/xml/bind/DatatypeConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down Expand Up @@ -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 );
}
Expand Down Expand Up @@ -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 );
Expand Down
6 changes: 3 additions & 3 deletions api/src/main/java/jakarta/xml/bind/JAXBElement.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ private GlobalScope() {}
* @see #isTypeSubstituted()
*/
public JAXBElement(QName name,
Class<T> declaredType,
Class<?> scope,
T value) {
Class<T> declaredType,
Class<?> scope,
T value) {
if(declaredType==null || name==null)
throw new IllegalArgumentException();
this.declaredType = declaredType;
Expand Down
14 changes: 7 additions & 7 deletions api/src/main/java/jakarta/xml/bind/JAXBIntrospector.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ protected JAXBIntrospector() {}
* @return The element value of the <code>jaxbElement</code>.
*/
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;
}
}
}
6 changes: 3 additions & 3 deletions api/src/main/java/jakarta/xml/bind/Marshaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@
* <dl>
* <dt>{@code jaxb.encoding} - value must be a java.lang.String</dt>
* <dd>The output encoding to use when marshalling the XML data. The
* Marshaller will use "UTF-8" by default if this property is not
* specified.</dd>
* Marshaller will use "UTF-8" by default if this property is not
* specified.</dd>
* <dt>{@code jaxb.formatted.output} - value must be a java.lang.Boolean</dt>
* <dd>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
Expand Down
21 changes: 10 additions & 11 deletions api/src/main/java/jakarta/xml/bind/PropertyException.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -32,7 +32,7 @@ public class PropertyException extends JAXBException {
* @param message a description of the exception
*/
public PropertyException(String message) {
super(message);
super(message);
}

/**
Expand All @@ -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);
}

/**
Expand All @@ -53,7 +53,7 @@ public PropertyException(String message, String errorCode) {
* @param exception the linked exception
*/
public PropertyException(Throwable exception) {
super(exception);
super(exception);
}

/**
Expand All @@ -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);
}

/**
Expand All @@ -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);
}

/**
Expand All @@ -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() ) );
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -51,7 +51,7 @@
* <p>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.
Expand All @@ -61,5 +61,5 @@

@Inherited @Retention(RUNTIME) @Target({PACKAGE, TYPE})
public @interface XmlAccessorOrder {
XmlAccessOrder value() default XmlAccessOrder.UNDEFINED;
XmlAccessOrder value() default XmlAccessOrder.UNDEFINED;
}
1 change: 0 additions & 1 deletion api/src/main/java/jakarta/xml/bind/annotation/XmlEnum.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
*
* @since 1.6, JAXB 2.0
*/

@Retention(RUNTIME) @Target({TYPE})
public @interface XmlEnum {
/**
Expand Down
19 changes: 9 additions & 10 deletions api/src/main/java/jakarta/xml/bind/annotation/XmlMixed.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,24 @@
* import java.math.BigInteger;
* public class ObjectFactory {
* // element instance factories
* JAXBElement<LetterBody> createLetterBody(LetterBody value);
* JAXBElement<String> createLetterBodyName(String value);
* JAXBElement<BigInteger> createLetterBodyQuantity(BigInteger value);
* JAXBElement<String> createLetterBodyProductName(String value);
* JAXBElement<LetterBody> createLetterBody(LetterBody value);
* JAXBElement<String> createLetterBodyName(String value);
* JAXBElement<BigInteger> createLetterBodyQuantity(BigInteger value);
* JAXBElement<String> 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
Expand All @@ -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
* }
Expand Down
1 change: 0 additions & 1 deletion api/src/main/java/jakarta/xml/bind/annotation/XmlNs.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
* @author Sekhar Vajjhala, Sun Microsystems, Inc.
* @since 1.6, JAXB 2.0
*/

@Retention(RUNTIME) @Target({})
public @interface XmlNs {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
*
* @since 1.6, JAXB 2.0
*/

@Retention(RUNTIME) @Target({FIELD,METHOD,PACKAGE})
public @interface XmlSchemaType {
String name();
Expand Down
5 changes: 2 additions & 3 deletions api/src/main/java/jakarta/xml/bind/annotation/XmlType.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
* }
Expand All @@ -359,7 +359,7 @@
*
* private USAddress() {}
*
* public static USAddress getNewInstance(){
* public static USAddress getNewInstance() {
* return new USAddress();
* }
* }
Expand All @@ -372,7 +372,6 @@
* @see XmlSchema
* @since 1.6, JAXB 2.0
*/

@Retention(RUNTIME) @Target({TYPE})
public @interface XmlType {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -74,7 +74,6 @@
* @since 1.6, JAXB 2.0
* @see XmlAdapter
*/

@Retention(RUNTIME) @Target({PACKAGE,FIELD,METHOD,TYPE,PARAMETER})
public @interface XmlJavaTypeAdapter {
/**
Expand Down
4 changes: 2 additions & 2 deletions api/src/main/java/jakarta/xml/bind/util/JAXBResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
* setLexicalHandler, and setSystemId methods.
*
* @author
* Kohsuke Kawaguchi ([email protected])
* Kohsuke Kawaguchi ([email protected])
* @since 1.6
*/
public class JAXBResult extends SAXResult {
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/jakarta/xml/bind/util/JAXBSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
* returned by the getXMLReader.
*
* @author
* Kohsuke Kawaguchi ([email protected])
* Kohsuke Kawaguchi ([email protected])
* @since 1.6
*/
public class JAXBSource extends SAXSource {
Expand Down