diff --git a/jaxb-ri/boms/bom-ext/pom.xml b/jaxb-ri/boms/bom-ext/pom.xml index 0eaecb5ea..b05cf1cdc 100644 --- a/jaxb-ri/boms/bom-ext/pom.xml +++ b/jaxb-ri/boms/bom-ext/pom.xml @@ -35,7 +35,7 @@ ${project.version} - 1.5.0 + 1.5.1 ${project.version} ${project.version} 1.10.14 diff --git a/jaxb-ri/docs/release-documentation/src/docbook/jaxb-changelog.xml b/jaxb-ri/docs/release-documentation/src/docbook/jaxb-changelog.xml index d1a623cdd..5f031b519 100644 --- a/jaxb-ri/docs/release-documentation/src/docbook/jaxb-changelog.xml +++ b/jaxb-ri/docs/release-documentation/src/docbook/jaxb-changelog.xml @@ -24,11 +24,17 @@ Changelog The &binding.impl.name; 4.x meets the requirements of the Jakarta XML Binding 4.x specifications. -
+
Changes between 4.0.4 and 4.0.5 Bug fixes: + + dtd-parser #39: Parser parses #IMPLIED use attributes as NORMAL (and vice versa) + + + dtd-parser #40: Occurrence constants are misspelled + diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/Multiplicity.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/Multiplicity.java index b2ece354b..8f594167b 100644 --- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/Multiplicity.java +++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/Multiplicity.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2023 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 @@ -15,14 +15,14 @@ /** - * represents a possible number of occurence. + * represents a possible number of occurrence. * * Usually, denoted by a pair of integers like (1,1) or (5,10). * A special value "unbounded" is allowed as the upper bound. * *

- * For example, (0,unbounded) corresponds to the '*' occurence of DTD. - * (0,1) corresponds to the '?' occurence of DTD. + * For example, (0,unbounded) corresponds to the '*' occurrence of DTD. + * (0,1) corresponds to the '?' occurrence of DTD. * * @author * Kohsuke KAWAGUCHI diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/RawTypeSet.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/RawTypeSet.java index 1f6534278..e1d7d38aa 100644 --- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/RawTypeSet.java +++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/RawTypeSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2023 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 @@ -42,7 +42,7 @@ public final class RawTypeSet { public final Mode canBeTypeRefs; /** - * The occurence of the whole references. + * The occurrence of the whole references. */ public final Multiplicity mul; diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/Occurence.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/Occurrence.java similarity index 68% rename from jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/Occurence.java rename to jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/Occurrence.java index 6fe7c6532..799ad115f 100644 --- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/Occurence.java +++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/Occurrence.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2023 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 @@ -18,27 +18,27 @@ /** * @author Kohsuke Kawaguchi */ -final class Occurence extends Term { +final class Occurrence extends Term { final Term term; final boolean isOptional; final boolean isRepeated; - Occurence(Term term, boolean optional, boolean repeated) { + Occurrence(Term term, boolean optional, boolean repeated) { this.term = term; isOptional = optional; isRepeated = repeated; } - static Term wrap( Term t, int occurence ) { - switch(occurence) { - case DTDEventListener.OCCURENCE_ONCE: + static Term wrap( Term t, int occurrence ) { + switch(occurrence) { + case DTDEventListener.OCCURRENCE_ONCE: return t; - case DTDEventListener.OCCURENCE_ONE_OR_MORE: - return new Occurence(t,false,true); - case DTDEventListener.OCCURENCE_ZERO_OR_MORE: - return new Occurence(t,true,true); - case DTDEventListener.OCCURENCE_ZERO_OR_ONE: - return new Occurence(t,true,false); + case DTDEventListener.OCCURRENCE_ONE_OR_MORE: + return new Occurrence(t,false,true); + case DTDEventListener.OCCURRENCE_ZERO_OR_MORE: + return new Occurrence(t,true,true); + case DTDEventListener.OCCURRENCE_ZERO_OR_ONE: + return new Occurrence(t,true,false); default: throw new IllegalArgumentException(); } diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/TDTDReader.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/TDTDReader.java index 7c337af9f..4ae747e5c 100644 --- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/TDTDReader.java +++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/dtd/TDTDReader.java @@ -62,8 +62,8 @@ * @author * Kohsuke KAWAGUCHI */ -public class TDTDReader extends DTDHandlerBase -{ +public class TDTDReader extends DTDHandlerBase { + /** * Parses DTD grammar and a binding information into BGM. * @@ -361,8 +361,8 @@ public void startModelGroup() throws SAXException { } @Override - public void endModelGroup(short occurence) throws SAXException { - Term t = Occurence.wrap( modelGroups.pop().wrapUp(), occurence ); + public void endModelGroup(short occurrence) throws SAXException { + Term t = Occurrence.wrap( modelGroups.pop().wrapUp(), occurrence ); modelGroups.peek().addTerm(t); } @@ -375,9 +375,9 @@ public void connector(short connectorType) throws SAXException { // and treat it as (A,B,C,....) @Override - public void childElement(String elementName, short occurence) throws SAXException { + public void childElement(String elementName, short occurrence) throws SAXException { Element child = getOrCreateElement(elementName); - modelGroups.peek().addTerm( Occurence.wrap( child, occurence ) ); + modelGroups.peek().addTerm( Occurrence.wrap( child, occurrence ) ); child.isReferenced = true; } @@ -389,7 +389,7 @@ public void childElement(String elementName, short occurence) throws SAXExceptio * Mutable {@link Locator} instance that points to * the current source line. *

- * Use {@link #copyLocator()} to get a immutable clone. + * Use {@link #copyLocator()} to get an immutable clone. */ private Locator locator; diff --git a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSComponent.java b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSComponent.java index 39e14db1b..6adf35a3b 100644 --- a/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSComponent.java +++ b/jaxb-ri/xsom/src/main/java/com/sun/xml/xsom/XSComponent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2023 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 @@ -66,7 +66,7 @@ public interface XSComponent * Gets the foreign attribute of the given name, or null if not found. * *

- * If multiple occurences of the same attribute is found, + * If multiple occurrences of the same attribute is found, * this method returns the first one. * * @see #getForeignAttributes()