Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

org.jdom2.xpath.XPath has a poor model for setting the 'factory' #42

Closed
rolfl opened this Issue · 1 comment

1 participant

Rolf
Rolf
Collaborator

This package should have a proper 'factory' pattern.

The current problem is that it is impossible to have a reliable mechanism for setting the 'backing' XPath factory. If one area of code were to ever need a 'custom' XPath 'engine' then they could set the engine with the XPath.setXPathClass(), but this would impact all areas of the program, not just the part that needed the change.

Further, these other areas would be unable to check what factory they have, and, worse again, if issue #41 is fixed, that other area of code can be set to use the JaxenXPath factory again, but that will 'break' the original area that wanted the custom factory anyway.

A proper factory pattern needs to be used.

Rolf
Collaborator
Rolf rolfl closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.