Permalink
Browse files

Revert changes that replaced getExpandEntities with isExpandEntities.

This commit un-deprecates the get* Versions of the methods, and removes the is* versions
  • Loading branch information...
rolfl committed Apr 1, 2012
1 parent e9022f3 commit 447aacf2b5a41c219697f604c77e3b298626ef0a
@@ -619,19 +619,6 @@ public void setXMLFilter(final XMLFilter xmlFilter) {
engine = null;
}
- /**
- * Returns whether element content whitespace is to be ignored during the
- * build.
- *
- * @return whether element content whitespace is to be ignored during the
- * build
- * @deprecated in lieu of {@link #isIgnoringElementContentWhitespace()}
- */
- @Deprecated
- public boolean getIgnoringElementContentWhitespace() {
- return isIgnoringElementContentWhitespace();
- }
-
/**
* Returns whether element content whitespace is to be ignored during the
* build.
@@ -640,7 +627,7 @@ public boolean getIgnoringElementContentWhitespace() {
* build
*/
@Override
- public boolean isIgnoringElementContentWhitespace() {
+ public boolean getIgnoringElementContentWhitespace() {
return ignoringWhite;
}
@@ -660,20 +647,6 @@ public void setIgnoringElementContentWhitespace(final boolean ignoringWhite) {
engine = null;
}
- /**
- * Returns whether or not the parser will eliminate element content
- * containing only whitespace.
- *
- * @return <code>boolean</code> - whether only whitespace content will be
- * ignored during build.
- * @see #setIgnoringBoundaryWhitespace
- * @deprecated in lieu of {@link #isIgnoringBoundaryWhitespace()}
- */
- @Deprecated
- public boolean getIgnoringBoundaryWhitespace() {
- return isIgnoringBoundaryWhitespace();
- }
-
/**
* Returns whether or not the parser will eliminate element content
* containing only whitespace.
@@ -683,7 +656,7 @@ public boolean getIgnoringBoundaryWhitespace() {
* @see #setIgnoringBoundaryWhitespace
*/
@Override
- public boolean isIgnoringBoundaryWhitespace() {
+ public boolean getIgnoringBoundaryWhitespace() {
return ignoringBoundaryWhite;
}
@@ -709,26 +682,14 @@ public void setIgnoringBoundaryWhitespace(final boolean ignoringBoundaryWhite) {
engine = null;
}
- /**
- * Returns whether or not entities are being expanded into normal text
- * content.
- *
- * @return whether entities are being expanded
- * @deprecated in lieu of {@link #isExpandEntities()}
- */
- @Deprecated
- public boolean getExpandEntities() {
- return expand;
- }
-
/**
* Returns whether or not entities are being expanded into normal text
* content.
*
* @return whether entities are being expanded
*/
@Override
- public boolean isExpandEntities() {
+ public boolean getExpandEntities() {
return expand;
}
@@ -180,7 +180,7 @@ public DTDHandler getDTDHandler() {
* @see org.jdom2.input.sax.SAXEngine#isIgnoringElementContentWhitespace()
*/
@Override
- public boolean isIgnoringElementContentWhitespace() {
+ public boolean getIgnoringElementContentWhitespace() {
return saxHandler.getIgnoringElementContentWhitespace();
}
@@ -190,7 +190,7 @@ public boolean isIgnoringElementContentWhitespace() {
* @see org.jdom2.input.sax.SAXEngine#isIgnoringBoundaryWhitespace()
*/
@Override
- public boolean isIgnoringBoundaryWhitespace() {
+ public boolean getIgnoringBoundaryWhitespace() {
return saxHandler.getIgnoringBoundaryWhitespace();
}
@@ -200,7 +200,7 @@ public boolean isIgnoringBoundaryWhitespace() {
* @see org.jdom2.input.sax.SAXEngine#isExpandEntities()
*/
@Override
- public boolean isExpandEntities() {
+ public boolean getExpandEntities() {
return saxHandler.getExpandEntities();
}
@@ -121,7 +121,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* @return whether element content whitespace is to be ignored during the
* build
*/
- public abstract boolean isIgnoringElementContentWhitespace();
+ public abstract boolean getIgnoringElementContentWhitespace();
/**
* Returns whether or not the parser will elminate element content
@@ -130,15 +130,15 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* @return <code>boolean</code> - whether only whitespace content will be
* ignored during build.
*/
- public abstract boolean isIgnoringBoundaryWhitespace();
+ public abstract boolean getIgnoringBoundaryWhitespace();
/**
* Returns whether or not entities are being expanded into normal text
* content.
*
* @return whether entities are being expanded
*/
- public abstract boolean isExpandEntities();
+ public abstract boolean getExpandEntities();
/**
* This builds a document from the supplied input source.
@@ -162,7 +162,7 @@ public void testSAXBuilder() {
assertTrue(sb.getDTDHandler() == null);
assertTrue(sb.getXMLFilter() == null);
assertFalse(sb.isValidating());
- assertTrue(sb.isExpandEntities());
+ assertTrue(sb.getExpandEntities());
}
@SuppressWarnings("deprecation")
@@ -174,7 +174,7 @@ public void testSAXBuilderBooleanFalse() {
assertTrue(sb.getDTDHandler() == null);
assertTrue(sb.getXMLFilter() == null);
assertFalse(sb.isValidating());
- assertTrue(sb.isExpandEntities());
+ assertTrue(sb.getExpandEntities());
}
@SuppressWarnings("deprecation")
@@ -186,7 +186,7 @@ public void testSAXBuilderBooleanTrue() {
assertTrue(sb.getDTDHandler() == null);
assertTrue(sb.getXMLFilter() == null);
assertTrue(sb.isValidating());
- assertTrue(sb.isExpandEntities());
+ assertTrue(sb.getExpandEntities());
}
@SuppressWarnings("deprecation")
@@ -198,7 +198,7 @@ public void testSAXBuilderString() {
assertTrue(sb.getDTDHandler() == null);
assertTrue(sb.getXMLFilter() == null);
assertFalse(sb.isValidating());
- assertTrue(sb.isExpandEntities());
+ assertTrue(sb.getExpandEntities());
try {
XMLReader reader = sb.createParser();
assertNotNull(reader);
@@ -215,7 +215,7 @@ public void testSAXBuilderString() {
assertTrue(sb.getDTDHandler() == null);
assertTrue(sb.getXMLFilter() == null);
assertFalse(sb.isValidating());
- assertTrue(sb.isExpandEntities());
+ assertTrue(sb.getExpandEntities());
try {
XMLReader reader = sb.createParser();
assertNotNull(reader);
@@ -237,7 +237,7 @@ public void testSAXBuilderStringNew() {
assertTrue(sb.getDTDHandler() == null);
assertTrue(sb.getXMLFilter() == null);
assertFalse(sb.isValidating());
- assertTrue(sb.isExpandEntities());
+ assertTrue(sb.getExpandEntities());
try {
XMLReader reader = sb.createParser();
assertNotNull(reader);
@@ -255,7 +255,7 @@ public void testSAXBuilderStringNew() {
assertTrue(sb.getDTDHandler() == null);
assertTrue(sb.getXMLFilter() == null);
assertFalse(sb.isValidating());
- assertTrue(sb.isExpandEntities());
+ assertTrue(sb.getExpandEntities());
try {
XMLReader reader = sb.createParser();
assertNotNull(reader);
@@ -288,7 +288,7 @@ public void testSAXBuilderStringFalse() {
assertTrue(sb.getDTDHandler() == null);
assertTrue(sb.getXMLFilter() == null);
assertFalse(sb.isValidating());
- assertTrue(sb.isExpandEntities());
+ assertTrue(sb.getExpandEntities());
}
@SuppressWarnings("deprecation")
@@ -300,7 +300,7 @@ public void testGetJDOMFactory() {
assertTrue(sb.getDTDHandler() == null);
assertTrue(sb.getXMLFilter() == null);
assertTrue(sb.isValidating());
- assertTrue(sb.isExpandEntities());
+ assertTrue(sb.getExpandEntities());
assertTrue(sb.getJDOMFactory() instanceof DefaultJDOMFactory);
assertTrue(sb.getJDOMFactory() == sb.getFactory());
}
@@ -382,7 +382,7 @@ public void testGetErrorHandler() throws JDOMException {
assertTrue(sb.getDTDHandler() == null);
assertTrue(sb.getXMLFilter() == null);
assertTrue(sb.isValidating());
- assertTrue(sb.isExpandEntities());
+ assertTrue(sb.getExpandEntities());
assertTrue(sb.buildEngine().getErrorHandler() instanceof BuilderErrorHandler);
@@ -402,7 +402,7 @@ public void testGetEntityResolver() {
assertTrue(sb.getDTDHandler() == null);
assertTrue(sb.getXMLFilter() == null);
assertTrue(sb.isValidating());
- assertTrue(sb.isExpandEntities());
+ assertTrue(sb.getExpandEntities());
EntityResolver er = new EntityResolver() {
@Override
@@ -424,7 +424,7 @@ public void testGetDTDHandler() {
assertTrue(sb.getDTDHandler() == null);
assertTrue(sb.getXMLFilter() == null);
assertTrue(sb.isValidating());
- assertTrue(sb.isExpandEntities());
+ assertTrue(sb.getExpandEntities());
DTDHandler dtd = new DTDHandler() {
@Override
@@ -461,7 +461,7 @@ public void testXMLFilter() {
assertTrue(sb.getErrorHandler() == null);
assertTrue(sb.getDTDHandler() == null);
assertTrue(sb.getXMLFilter() == null);
- assertTrue(sb.isExpandEntities());
+ assertTrue(sb.getExpandEntities());
XMLFilter filter = new XMLFilterImpl() {
@Override
@@ -512,21 +512,19 @@ public void testGetIgnoringElementContentWhitespace() throws JDOMException {
assertTrue(sb.getDTDHandler() == null);
assertTrue(sb.getXMLFilter() == null);
assertTrue(sb.isValidating());
- assertTrue(sb.isExpandEntities());
+ assertTrue(sb.getExpandEntities());
SAXEngine se = sb.buildEngine();
- assertFalse(se.isIgnoringBoundaryWhitespace());
+ assertFalse(se.getIgnoringBoundaryWhitespace());
sb.setIgnoringElementContentWhitespace(true);
assertTrue(sb.getIgnoringElementContentWhitespace());
- assertTrue(sb.isIgnoringElementContentWhitespace());
se = sb.buildEngine();
- assertTrue(se.isIgnoringElementContentWhitespace());
+ assertTrue(se.getIgnoringElementContentWhitespace());
sb.setIgnoringElementContentWhitespace(false);
assertFalse(sb.getIgnoringElementContentWhitespace());
- assertFalse(sb.isIgnoringElementContentWhitespace());
se = sb.buildEngine();
- assertFalse(se.isIgnoringElementContentWhitespace());
+ assertFalse(se.getIgnoringElementContentWhitespace());
}
@SuppressWarnings("deprecation")
@@ -540,23 +538,21 @@ public void testGetIgnoringBoundaryWhitespace() throws JDOMException {
assertTrue(sb.getDTDHandler() == null);
assertTrue(sb.getXMLFilter() == null);
assertTrue(sb.isValidating());
- assertTrue(sb.isExpandEntities());
+ assertTrue(sb.getExpandEntities());
assertTrue(se.getEntityResolver() == null);
assertTrue(se.getErrorHandler() != null);
assertTrue(se.getDTDHandler() != null);
assertTrue(se.isValidating());
- assertTrue(se.isExpandEntities());
+ assertTrue(se.getExpandEntities());
sb.setIgnoringBoundaryWhitespace(true);
assertTrue(sb.getIgnoringBoundaryWhitespace());
- assertTrue(sb.isIgnoringBoundaryWhitespace());
se = sb.buildEngine();
- assertTrue(se.isIgnoringBoundaryWhitespace());
+ assertTrue(se.getIgnoringBoundaryWhitespace());
sb.setIgnoringBoundaryWhitespace(false);
- assertFalse(sb.getIgnoringBoundaryWhitespace());
- assertFalse(sb.isIgnoringBoundaryWhitespace());
+ assertFalse(sb.getIgnoringBoundaryWhitespace());
se = sb.buildEngine();
- assertFalse(se.isIgnoringBoundaryWhitespace());
+ assertFalse(se.getIgnoringBoundaryWhitespace());
}
@SuppressWarnings("deprecation")
@@ -568,7 +564,7 @@ public void testGetReuseParser() {
assertTrue(sb.getDTDHandler() == null);
assertTrue(sb.getXMLFilter() == null);
assertTrue(sb.isValidating());
- assertTrue(sb.isExpandEntities());
+ assertTrue(sb.getExpandEntities());
sb.setReuseParser(true);
assertTrue(sb.getReuseParser());
@@ -689,7 +685,7 @@ public void test_TCM__void_setExpandEntities_boolean() throws JDOMException, IOE
File file = new File(resourceDir + "/SAXBuilderTestEntity.xml");
builder.setExpandEntities(true);
- assertTrue(builder.isExpandEntities());
+ assertTrue(builder.getExpandEntities());
Document doc = builder.build(file);
assertTrue("didn't get entity text", doc.getRootElement().getText().indexOf("simple entity") == 0);
@@ -698,7 +694,7 @@ public void test_TCM__void_setExpandEntities_boolean() throws JDOMException, IOE
//test that entity declaration appears in doctype
//and EntityRef is created in content with internal entity
builder.setExpandEntities(false);
- assertFalse(builder.isExpandEntities());
+ assertFalse(builder.getExpandEntities());
doc = builder.build(file);
assertTrue("got entity text", ! (doc.getRootElement().getText().indexOf("simple entity") > 1));
@@ -713,7 +709,7 @@ public void test_TCM__void_setExpandEntities_boolean() throws JDOMException, IOE
file = new File(resourceDir + "/SAXBuilderTestEntity2.xml");
builder.setExpandEntities(true);
- assertTrue(builder.isExpandEntities());
+ assertTrue(builder.getExpandEntities());
doc = builder.build(file);
assertTrue("didn't get entity text", doc.getRootElement().getText().indexOf("simple entity") == 0);
@@ -722,7 +718,7 @@ public void test_TCM__void_setExpandEntities_boolean() throws JDOMException, IOE
//test that entity declaration appears in doctype
//and EntityRef is created in content with external entity
builder.setExpandEntities(false);
- assertFalse(builder.isExpandEntities());
+ assertFalse(builder.getExpandEntities());
doc = builder.build(file);
assertTrue("got entity text", ! (doc.getRootElement().getText().indexOf("simple entity") > 1));
assertTrue("got entity text", ! (doc.getRootElement().getText().indexOf("another simple entity") > 1));
@@ -839,7 +835,7 @@ public void testSetFastReconfigure() {
assertTrue(sb.getDTDHandler() == null);
assertTrue(sb.getXMLFilter() == null);
assertTrue(sb.isValidating());
- assertTrue(sb.isExpandEntities());
+ assertTrue(sb.getExpandEntities());
sb.setFastReconfigure(true);

0 comments on commit 447aacf

Please sign in to comment.