Skip to content

Commit 6bc7ae2

Browse files
committed
restore formatted file unwanted, erase commented lines and delete module-info.java that conflicts with surefire-plugin execution
1 parent 0f60b71 commit 6bc7ae2

File tree

5 files changed

+27
-78
lines changed

5 files changed

+27
-78
lines changed
Lines changed: 26 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
11
/*
22
* Copyright (c) 2004, 2024 Oracle and/or its affiliates. All rights reserved.
3+
* Copyright (c) 2026 Contributors to the Eclipse Foundation. All rights reserved.
34
*
45
* This program and the accompanying materials are made available under the
56
* terms of the Eclipse Distribution License v. 1.0, which is available at
67
* http://www.eclipse.org/org/documents/edl-v10.php.
78
*
89
* SPDX-License-Identifier: BSD-3-Clause
910
*/
10-
1111
package jakarta.xml.bind;
1212

13-
import javax.xml.namespace.QName;
13+
import javax.xml.namespace.QName;
1414

1515
/**
16-
* Provide access to Jakarta XML Binding xml binding data for a Jakarta XML
17-
* Binding object.
16+
* Provide access to Jakarta XML Binding xml binding data for a Jakarta XML Binding object.
1817
*
1918
* <p>
2019
* Initially, the intent of this class is to just conceptualize how
21-
* a Jakarta XML Binding application developer can access xml binding
22-
* information,
20+
* a Jakarta XML Binding application developer can access xml binding information,
2321
* independent if binding model is java to schema or schema to java.
24-
* Since accessing the XML element name related to a Jakarta XML Binding element
25-
* is
22+
* Since accessing the XML element name related to a Jakarta XML Binding element is
2623
* a highly requested feature, demonstrate access to this
2724
* binding information.
2825
* <p>
@@ -37,62 +34,50 @@ public abstract class JAXBIntrospector {
3734
/**
3835
* Do-nothing constructor for the derived classes.
3936
*/
40-
protected JAXBIntrospector() {
41-
}
37+
protected JAXBIntrospector() {}
4238

4339
/**
44-
* <p>
45-
* Return true if <code>object</code> represents a Jakarta XML Binding element.
46-
* </p>
47-
* <p>
48-
* Parameter <code>object</code> is a Jakarta XML Binding element for following
49-
* cases:
40+
* <p>Return true if <code>object</code> represents a Jakarta XML Binding element.</p>
41+
* <p>Parameter <code>object</code> is a Jakarta XML Binding element for following cases:
5042
* <ol>
51-
* <li>It is an instance of <code>jakarta.xml.bind.JAXBElement</code>.</li>
52-
* <li>The class of <code>object</code> is annotated with
53-
* <code>&#64;XmlRootElement</code>.
54-
* </li>
43+
* <li>It is an instance of <code>jakarta.xml.bind.JAXBElement</code>.</li>
44+
* <li>The class of <code>object</code> is annotated with
45+
* <code>&#64;XmlRootElement</code>.
46+
* </li>
5547
* </ol>
5648
*
5749
* @see #getElementName(Object)
5850
*/
5951
public abstract boolean isElement(Object object);
6052

6153
/**
62-
* <p>
63-
* Get xml element qname for <code>jaxbElement</code>.
64-
* </p>
54+
* <p>Get xml element qname for <code>jaxbElement</code>.</p>
6555
*
66-
* @param jaxbElement is an object that {@link #isElement(Object)} returned
67-
* true.
56+
* @param jaxbElement is an object that {@link #isElement(Object)} returned true.
6857
*
6958
* @return xml element qname associated with jaxbElement;
7059
* null if <code>jaxbElement</code> is not a JAXBElement.
7160
*/
7261
public abstract QName getElementName(Object jaxbElement);
7362

7463
/**
75-
* <p>
76-
* Get the element value of a Jakarta XML Binding element.
77-
* </p>
64+
* <p>Get the element value of a Jakarta XML Binding element.</p>
7865
*
79-
* <p>
80-
* Convenience method to abstract whether working with either
81-
* a jakarta.xml.bind.JAXBElement instance or an instance of
82-
* {@code @XmlRootElement} annotated Java class.
83-
* </p>
66+
* <p>Convenience method to abstract whether working with either
67+
* a jakarta.xml.bind.JAXBElement instance or an instance of
68+
* {@code @XmlRootElement} annotated Java class.</p>
8469
*
85-
* @param jaxbElement object that #isElement(Object) returns true.
70+
* @param jaxbElement object that #isElement(Object) returns true.
8671
*
8772
* @return The element value of the <code>jaxbElement</code>.
8873
*/
8974
public static Object getValue(Object jaxbElement) {
90-
if (jaxbElement instanceof JAXBElement) {
91-
return ((JAXBElement<?>) jaxbElement).getValue();
92-
} else {
93-
// assume that class of this instance is
94-
// annotated with @XmlRootElement.
95-
return jaxbElement;
96-
}
75+
if (jaxbElement instanceof JAXBElement) {
76+
return ((JAXBElement<?>)jaxbElement).getValue();
77+
} else {
78+
// assume that class of this instance is
79+
// annotated with @XmlRootElement.
80+
return jaxbElement;
81+
}
9782
}
9883
}

jaxb-api-test/pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<dependency>
3333
<groupId>org.junit.jupiter</groupId>
3434
<artifactId>junit-jupiter-params</artifactId>
35-
<version>5.10.2</version>
35+
<version>5.14.2</version>
3636
<scope>test</scope>
3737
</dependency>
3838
<dependency>
@@ -103,7 +103,6 @@
103103
src/test/resources/logging.properties
104104
</java.util.logging.config.file>
105105
</systemPropertyVariables>
106-
<useModulePath>false</useModulePath>
107106
</configuration>
108107
</plugin>
109108
<plugin>

jaxb-api-test/src/main/java/module-info.java

Lines changed: 0 additions & 14 deletions
This file was deleted.

jaxb-api-test/src/test/java/jakarta/xml/bind/test/JAXBContextTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ public void testClassesSM(String scenario,
297297
private void enableSM() {
298298
System.setSecurityManager(null);
299299
System.setProperty("java.security.policy", classesDir + "jakarta/xml/bind/test.policy");
300-
// System.setSecurityManager(new SecurityManager());
301300
}
302301

303302
private void cleanResource(Path resource) {
@@ -367,7 +366,6 @@ private void setupFile(Path file, Path dir, String value) throws IOException {
367366

368367
private void log(String msg) {
369368
logger.info("[" + scenario + "] " + msg);
370-
// System.out.println("[" + scenario + "] " + msg);
371369
}
372370

373371
}

jaxb-api-test/src/test/java/module-info.java

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)