Author: hlship Date: Thu Mar 3 19:59:10 2011 New Revision: 1076761 URL: http://svn.apache.org/viewvc?rev=1076761&view=rev Log: TAP5-1462: Remove Element.getParent()
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/dom/Element.java tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterImpl.java tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/dom/DOMTest.java tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/DocumentLinkerImplTest.java tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/MarkupWriterImplTest.java Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/dom/Element.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/dom/Element.java?rev=1076761&r1=1076760&r2=1076761&view=diff ============================================================================== --- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/dom/Element.java (original) +++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/dom/Element.java Thu Mar 3 19:59:10 2011 @@ -92,16 +92,6 @@ public final class Element extends Node } /** - * Returns the containing element for this element. This will be null for the root element of a document. - * - * @deprecated since 5.1.0.1, use {@link Node#getContainer()} instead - */ - public Element getParent() - { - return container; - } - - /** * Adds an attribute to the element, but only if the attribute name does not already exist. * * @param name Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterImpl.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterImpl.java?rev=1076761&r1=1076760&r2=1076761&view=diff ============================================================================== --- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterImpl.java (original) +++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterImpl.java Thu Mar 3 19:59:10 2011 @@ -1,4 +1,4 @@ -// Copyright 2006, 2007, 2008, 2009, 2010 The Apache Software Foundation +// Copyright 2006, 2007, 2008, 2009, 2010, 2011 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -192,7 +192,7 @@ public class MarkupWriterImpl implements fireElementDidEnd(); - current = current.getParent(); + current = current.getContainer(); currentText = null; Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/dom/DOMTest.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/dom/DOMTest.java?rev=1076761&r1=1076760&r2=1076761&view=diff ============================================================================== --- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/dom/DOMTest.java (original) +++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/dom/DOMTest.java Thu Mar 3 19:59:10 2011 @@ -1,4 +1,4 @@ -// Copyright 2006, 2007, 2008, 2009, 2010 The Apache Software Foundation +// Copyright 2006, 2007, 2008, 2009, 2010, 2011 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -148,13 +148,13 @@ public class DOMTest extends InternalBas p.attribute("first-name", "Fred"); p.attribute("last-name", "Flintstone"); - assertSame(p.getParent(), e); + assertSame(p.getContainer(), e); p = e.element("person"); p.attribute("first-name", "Barney"); p.attribute("last-name", "Rubble"); - assertSame(p.getParent(), e); + assertSame(p.getContainer(), e); assertEquals(d.toString(), readFile("nested_elements.txt")); } Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/DocumentLinkerImplTest.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/DocumentLinkerImplTest.java?rev=1076761&r1=1076760&r2=1076761&view=diff ============================================================================== --- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/DocumentLinkerImplTest.java (original) +++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/DocumentLinkerImplTest.java Thu Mar 3 19:59:10 2011 @@ -1,4 +1,4 @@ -// Copyright 2007, 2008, 2009, 2010 The Apache Software Foundation +// Copyright 2007, 2008, 2009, 2010, 2011 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -209,7 +209,7 @@ public class DocumentLinkerImplTest exte { Document document = new Document(new XMLMarkupModel()); - document.newRootElement("html").element("head").comment(" existing head ").getParent().element("body").text( + document.newRootElement("html").element("head").comment(" existing head ").getContainer().element("body").text( "body content"); DocumentLinkerImpl linker = new DocumentLinkerImpl(true, "1.2.3", true); Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/MarkupWriterImplTest.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/MarkupWriterImplTest.java?rev=1076761&r1=1076760&r2=1076761&view=diff ============================================================================== --- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/MarkupWriterImplTest.java (original) +++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/MarkupWriterImplTest.java Thu Mar 3 19:59:10 2011 @@ -1,4 +1,4 @@ -// Copyright 2006, 2007, 2008, 2009 The Apache Software Foundation +// Copyright 2006, 2007, 2008, 2009, 2011 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -304,7 +304,7 @@ public class MarkupWriterImplTest extend Element child = w.elementNS("barneyns", "child"); - assertSame(child.getParent(), root); + assertSame(child.getContainer(), root); w.end(); // child w.end(); // root