You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2021/10/18 06:53:38 UTC

[wicket] branch master updated (7d60d97 -> cf3715a)

This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git.


    from 7d60d97  WICKET-6924 Allow image/avif in SecurePackageResourceGuard
     new 475f5e8  WICKET-6925 Deprecate AbstractWrapModel
     new cf3715a  WICKET-6925 Remove AbstractWrapModel

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/wicket/model/AbstractWrapModel.java | 56 ----------------------
 .../java/org/apache/wicket/model/IWrapModel.java   | 25 +++++++++-
 2 files changed, 24 insertions(+), 57 deletions(-)
 delete mode 100644 wicket-core/src/main/java/org/apache/wicket/model/AbstractWrapModel.java

[wicket] 01/02: WICKET-6925 Deprecate AbstractWrapModel

Posted by mg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit 475f5e852e3f63b2c84dbcf1ca4dad956bd1d4b7
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Mon Oct 18 09:49:51 2021 +0300

    WICKET-6925 Deprecate AbstractWrapModel
    
    (cherry picked from commit b0b96e9c51307e3463424874b8274c0959d4356f)
---
 .../org/apache/wicket/model/AbstractWrapModel.java | 23 ++------------------
 .../java/org/apache/wicket/model/IWrapModel.java   | 25 +++++++++++++++++++++-
 2 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/wicket-core/src/main/java/org/apache/wicket/model/AbstractWrapModel.java b/wicket-core/src/main/java/org/apache/wicket/model/AbstractWrapModel.java
index 1b563ce..3478868 100644
--- a/wicket-core/src/main/java/org/apache/wicket/model/AbstractWrapModel.java
+++ b/wicket-core/src/main/java/org/apache/wicket/model/AbstractWrapModel.java
@@ -27,30 +27,11 @@ package org.apache.wicket.model;
  * 
  * @param <T>
  *            The Model object type
+ * @deprecated Use {@link IWrapModel}
  */
+@Deprecated
 public abstract class AbstractWrapModel<T> implements IWrapModel<T>
 {
 	private static final long serialVersionUID = 1L;
 
-	@Override
-	public T getObject()
-	{
-		return null;
-	}
-
-	@Override
-	public void setObject(T object)
-	{
-	}
-
-	/**
-	 * Calls getWrappedModel().detach();
-	 * 
-	 * @see org.apache.wicket.model.IDetachable#detach()
-	 */
-	@Override
-	public void detach()
-	{
-		getWrappedModel().detach();
-	}
 }
diff --git a/wicket-core/src/main/java/org/apache/wicket/model/IWrapModel.java b/wicket-core/src/main/java/org/apache/wicket/model/IWrapModel.java
index b91bb57..48e9d5d 100644
--- a/wicket-core/src/main/java/org/apache/wicket/model/IWrapModel.java
+++ b/wicket-core/src/main/java/org/apache/wicket/model/IWrapModel.java
@@ -17,7 +17,7 @@
 package org.apache.wicket.model;
 
 /**
- * A marker interface that represents a model that serves as a wrapper for another. Typically these
+ * A marker interface that represents a model that serves as a wrapper for another. Typically, these
  * models are produced by the following methods:
  * {@link IComponentAssignedModel#wrapOnAssignment(org.apache.wicket.Component)} and
  * {@link IComponentInheritedModel#wrapOnInheritance(org.apache.wicket.Component)}
@@ -38,4 +38,27 @@ public interface IWrapModel<T> extends IModel<T>
 	 * @return The wrapped model
 	 */
 	IModel<?> getWrappedModel();
+
+	/**
+	 * Calls getWrappedModel().detach();
+	 *
+	 * @see org.apache.wicket.model.IDetachable#detach()
+	 */
+	@Override
+	default void detach()
+	{
+		getWrappedModel().detach();
+	}
+
+	@Override
+	default void setObject(T object)
+	{
+	}
+
+	@Override
+	default T getObject()
+	{
+		return null;
+	}
+
 }

[wicket] 02/02: WICKET-6925 Remove AbstractWrapModel

Posted by mg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit cf3715a7ad805cd71e5e84671e78b98b9498b692
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Mon Oct 18 09:53:09 2021 +0300

    WICKET-6925 Remove AbstractWrapModel
---
 .../org/apache/wicket/model/AbstractWrapModel.java | 37 ----------------------
 1 file changed, 37 deletions(-)

diff --git a/wicket-core/src/main/java/org/apache/wicket/model/AbstractWrapModel.java b/wicket-core/src/main/java/org/apache/wicket/model/AbstractWrapModel.java
deleted file mode 100644
index 3478868..0000000
--- a/wicket-core/src/main/java/org/apache/wicket/model/AbstractWrapModel.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.model;
-
-/**
- * Simple base class for IWrapModel objects see {@link IComponentAssignedModel} or
- * {@link IComponentInheritedModel} so that you don't have to have empty methods like detach or
- * setObject() when not used in the wrapper.
- * 
- * The detach method calls the wrapped models detach.
- * 
- * @author jcompagner
- * 
- * @param <T>
- *            The Model object type
- * @deprecated Use {@link IWrapModel}
- */
-@Deprecated
-public abstract class AbstractWrapModel<T> implements IWrapModel<T>
-{
-	private static final long serialVersionUID = 1L;
-
-}