Remove long deprecated public BeanBlockContribution constructor
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/77af00aa Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/77af00aa Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/77af00aa Branch: refs/heads/master Commit: 77af00aad7d601a965d78bb32eabfa0af24a1e8b Parents: ab31e7f Author: Howard M. Lewis Ship <[email protected]> Authored: Tue Jun 18 13:55:54 2013 -0700 Committer: Howard M. Lewis Ship <[email protected]> Committed: Tue Jun 18 13:55:54 2013 -0700 ---------------------------------------------------------------------- .../tapestry5/services/BeanBlockContribution.java | 9 ++------- .../integration/app3/services/AppModule.java | 8 ++++---- .../internal/services/BeanBlockSourceImplTest.java | 15 ++++++--------- 3 files changed, 12 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/77af00aa/tapestry-core/src/main/java/org/apache/tapestry5/services/BeanBlockContribution.java ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/services/BeanBlockContribution.java b/tapestry-core/src/main/java/org/apache/tapestry5/services/BeanBlockContribution.java index 2a71717..acf4921 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/services/BeanBlockContribution.java +++ b/tapestry-core/src/main/java/org/apache/tapestry5/services/BeanBlockContribution.java @@ -1,4 +1,4 @@ -// Copyright 2007, 2010 The Apache Software Foundation +// Copyright 2007, 2010, 2013 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. @@ -31,12 +31,7 @@ public class BeanBlockContribution private final boolean edit; - /** - * @deprecated Use {@link DisplayBlockContribution#DisplayBlockContribution(String, String, String)} or - * {@link EditBlockContribution#EditBlockContribution(String, String, String)} instead. To be - * removed after Tapestry 5.2. - */ - public BeanBlockContribution(String dataType, String pageName, String blockId, boolean edit) + protected BeanBlockContribution(String dataType, String pageName, String blockId, boolean edit) { assert InternalUtils.isNonBlank(dataType); assert InternalUtils.isNonBlank(pageName); http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/77af00aa/tapestry-core/src/test/java/org/apache/tapestry5/integration/app3/services/AppModule.java ---------------------------------------------------------------------- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app3/services/AppModule.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app3/services/AppModule.java index f33dade..bf86974 100644 --- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app3/services/AppModule.java +++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app3/services/AppModule.java @@ -1,4 +1,4 @@ -// Copyright 2008, 2009 The Apache Software Foundation +// Copyright 2008, 2009, 2013 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. @@ -19,16 +19,16 @@ import org.apache.tapestry5.ioc.Configuration; import org.apache.tapestry5.ioc.MappedConfiguration; import org.apache.tapestry5.ioc.OrderedConfiguration; import org.apache.tapestry5.ioc.annotations.Contribute; -import org.apache.tapestry5.services.BeanBlockContribution; +import org.apache.tapestry5.services.DisplayBlockContribution; import org.apache.tapestry5.services.Request; import org.apache.tapestry5.services.security.ClientWhitelist; import org.apache.tapestry5.services.security.WhitelistAnalyzer; public class AppModule { - public static void contributeBeanBlockOverrideSource(Configuration<BeanBlockContribution> configuration) + public static void contributeBeanBlockOverrideSource(Configuration<Object> configuration) { - configuration.add(new BeanBlockContribution("boolean", "PropertyDisplayBlockOverrides", "boolean", false)); + configuration.add(new DisplayBlockContribution("boolean", "PropertyDisplayBlockOverrides", "boolean")); } public static void contributeApplicationDefaults(MappedConfiguration<String, String> configuration) http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/77af00aa/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/BeanBlockSourceImplTest.java ---------------------------------------------------------------------- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/BeanBlockSourceImplTest.java b/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/BeanBlockSourceImplTest.java index e865662..3da8ea2 100644 --- a/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/BeanBlockSourceImplTest.java +++ b/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/BeanBlockSourceImplTest.java @@ -1,4 +1,4 @@ -// Copyright 2007, 2008 The Apache Software Foundation +// Copyright 2007, 2008, 2013 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. @@ -18,15 +18,14 @@ import org.apache.tapestry5.Block; import org.apache.tapestry5.internal.structure.ComponentPageElement; import org.apache.tapestry5.internal.structure.Page; import org.apache.tapestry5.internal.test.InternalBaseTestCase; -import static org.apache.tapestry5.ioc.internal.util.CollectionFactory.newList; -import org.apache.tapestry5.services.BeanBlockContribution; -import org.apache.tapestry5.services.BeanBlockOverrideSource; -import org.apache.tapestry5.services.BeanBlockSource; +import org.apache.tapestry5.services.*; import org.testng.annotations.Test; import java.util.Collection; import java.util.Collections; +import static org.apache.tapestry5.ioc.internal.util.CollectionFactory.newList; + public class BeanBlockSourceImplTest extends InternalBaseTestCase { private static final Collection<BeanBlockContribution> EMPTY_CONFIGURATION = Collections.emptyList(); @@ -37,8 +36,7 @@ public class BeanBlockSourceImplTest extends InternalBaseTestCase Block block = mockBlock(); RequestPageCache cache = mockRequestPageCache(); Page page = mockPage(); - BeanBlockContribution contribution = new BeanBlockContribution("mydata", "MyPage", - "mydisplay", false); + BeanBlockContribution contribution = new DisplayBlockContribution("mydata", "MyPage", "mydisplay"); Collection<BeanBlockContribution> configuration = newList(contribution); train_get(cache, "MyPage", page); @@ -148,8 +146,7 @@ public class BeanBlockSourceImplTest extends InternalBaseTestCase Block block = mockBlock(); RequestPageCache cache = mockRequestPageCache(); Page page = mockPage(); - BeanBlockContribution contribution = new BeanBlockContribution("mydata", "MyPage", - "mydisplay", true); + BeanBlockContribution contribution = new EditBlockContribution("mydata", "MyPage", "mydisplay"); Collection<BeanBlockContribution> configuration = newList(contribution); train_get(cache, "MyPage", page);
