elharo commented on code in PR #2:
URL: https://github.com/apache/xerces-j/pull/2#discussion_r2160487146
##########
src/org/apache/xerces/dom/DOMConfigurationImpl.java:
##########
@@ -229,7 +230,7 @@ public class DOMConfigurationImpl extends
ParserConfigurationSettings
protected SymbolTable fSymbolTable;
/** Components. */
- protected ArrayList fComponents;
+ protected List<XMLComponent> fComponents;
Review Comment:
This is an API breaking change
##########
src/org/apache/xerces/dom/NamedNodeMapImpl.java:
##########
@@ -571,12 +562,12 @@ protected int addItem (Node arg) {
/**
* NON-DOM: copy content of this map into the specified ArrayList
*
- * @param list ArrayList to copy information into.
+ * @param list a list of nodes to copy information into, or null a new
list will be created
Review Comment:
null to create a new list
##########
src/org/apache/xerces/dom/NamedNodeMapImpl.java:
##########
@@ -119,8 +118,7 @@ public int getLength() {
* is greater than or equal to getLength().
*/
public Node item(int index) {
- return (nodes != null && index < nodes.size()) ?
- (Node)(nodes.get(index)) : null;
+ return (nodes != null && index < nodes.size()) ?
(Node)(nodes.get(index)) : null;
Review Comment:
reformatting otherwise untouched code makes the PR more opaque
##########
src/org/apache/xerces/dom/DOMImplementationListImpl.java:
##########
@@ -34,27 +35,27 @@
public class DOMImplementationListImpl implements DOMImplementationList {
// A collection of DOMImplementations
- private final ArrayList fImplementations;
+ private final List<DOMImplementation> fImplementations;
/**
* Construct an empty list of DOMImplementations
*/
public DOMImplementationListImpl() {
- fImplementations = new ArrayList();
+ fImplementations = new ArrayList<>();
}
/**
* Construct a list of DOMImplementations from an ArrayList
*/
- public DOMImplementationListImpl(ArrayList params) {
+ public DOMImplementationListImpl(List<DOMImplementation> params) {
fImplementations = params;
}
/**
* Construct a list of DOMImplementations from a Vector
*/
- public DOMImplementationListImpl(Vector params) {
- fImplementations = new ArrayList(params);
+ public DOMImplementationListImpl(Vector<DOMImplementation> params) {
Review Comment:
again, be careful about changing publicmethod signatures
##########
src/org/apache/xerces/dom/DOMImplementationListImpl.java:
##########
@@ -34,27 +35,27 @@
public class DOMImplementationListImpl implements DOMImplementationList {
// A collection of DOMImplementations
- private final ArrayList fImplementations;
+ private final List<DOMImplementation> fImplementations;
/**
* Construct an empty list of DOMImplementations
*/
public DOMImplementationListImpl() {
- fImplementations = new ArrayList();
+ fImplementations = new ArrayList<>();
}
/**
* Construct a list of DOMImplementations from an ArrayList
*/
- public DOMImplementationListImpl(ArrayList params) {
+ public DOMImplementationListImpl(List<DOMImplementation> params) {
Review Comment:
possibly another API breaking change
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]