You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2017/10/03 15:02:54 UTC

[isis] branch dev/2.0.0/ISIS-1742-remove-deprecations updated: ISIS-1742: deletes @MaxLength annotation and supporting facets and facet factories.

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

danhaywood pushed a commit to branch dev/2.0.0/ISIS-1742-remove-deprecations
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/dev/2.0.0/ISIS-1742-remove-deprecations by this push:
     new 0c3d374  ISIS-1742: deletes @MaxLength annotation and supporting facets and facet factories.
0c3d374 is described below

commit 0c3d37475ed754f944ca3e11d40193e18a446b14
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 16:02:45 2017 +0100

    ISIS-1742: deletes @MaxLength annotation and supporting facets and facet factories.
---
 .../apache/isis/applib/annotation/MaxLength.java   | 42 ------------
 .../MaxLengthFacetOnActionAnnotation.java          | 31 ---------
 .../MaxLengthFacetOnActionAnnotationFactory.java   | 75 ----------------------
 .../annotation/MaxLengthFacetOnTypeAnnotation.java | 35 ----------
 .../MaxLengthFacetOnTypeAnnotationFactory.java     | 75 ----------------------
 .../parameter/ParameterAnnotationFacetFactory.java | 13 ----
 ...ngthFacetForMaxLengthAnnotationOnParameter.java | 41 ------------
 .../property/PropertyAnnotationFacetFactory.java   | 15 +----
 ...engthFacetForMaxLengthAnnotationOnProperty.java |  5 --
 .../dflt/ProgrammingModelFacetsJava5.java          |  6 --
 10 files changed, 2 insertions(+), 336 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/MaxLength.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/MaxLength.java
deleted file mode 100644
index 0a17193..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/MaxLength.java
+++ /dev/null
@@ -1,42 +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.isis.applib.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * @deprecated - use {@link Property#maxLength()} and {@link Parameter#maxLength()} instead.
- */
-@Deprecated
-@Inherited
-@Target({ ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface MaxLength {
-
-    /**
-     * @deprecated - use {@link Property#maxLength()} and {@link Parameter#maxLength()} instead.
-     */
-    @Deprecated
-    int value();
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/contributing/maxlenannot/MaxLengthFacetOnActionAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/contributing/maxlenannot/MaxLengthFacetOnActionAnnotation.java
deleted file mode 100644
index a49e928..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/contributing/maxlenannot/MaxLengthFacetOnActionAnnotation.java
+++ /dev/null
@@ -1,31 +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.isis.core.metamodel.facets.actions.contributing.maxlenannot;
-
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.objectvalue.maxlen.MaxLengthFacetAbstract;
-
-public class MaxLengthFacetOnActionAnnotation extends MaxLengthFacetAbstract {
-
-    public MaxLengthFacetOnActionAnnotation(final int value, final FacetHolder holder) {
-        super(value, holder);
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/contributing/maxlenannot/MaxLengthFacetOnActionAnnotationFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/contributing/maxlenannot/MaxLengthFacetOnActionAnnotationFactory.java
deleted file mode 100644
index e14730f..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/contributing/maxlenannot/MaxLengthFacetOnActionAnnotationFactory.java
+++ /dev/null
@@ -1,75 +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.isis.core.metamodel.facets.actions.contributing.maxlenannot;
-
-import org.apache.isis.applib.annotation.MaxLength;
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.commons.config.IsisConfigurationDefault;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facetapi.FacetUtil;
-import org.apache.isis.core.metamodel.facetapi.FeatureType;
-import org.apache.isis.core.metamodel.facetapi.MetaModelValidatorRefiner;
-import org.apache.isis.core.metamodel.facets.Annotations;
-import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
-import org.apache.isis.core.metamodel.facets.objectvalue.maxlen.MaxLengthFacet;
-import org.apache.isis.core.metamodel.progmodel.DeprecatedMarker;
-import org.apache.isis.core.metamodel.services.configinternal.ConfigurationServiceInternal;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorComposite;
-import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorForDeprecatedAnnotation;
-
-/**
- * To support contributed properties.
-
- * @deprecated
- */
-@Deprecated
-public class MaxLengthFacetOnActionAnnotationFactory extends FacetFactoryAbstract implements MetaModelValidatorRefiner, DeprecatedMarker {
-
-    private final MetaModelValidatorForDeprecatedAnnotation validator = new MetaModelValidatorForDeprecatedAnnotation(MaxLength.class);
-
-    public MaxLengthFacetOnActionAnnotationFactory() {
-        super(FeatureType.ACTIONS_ONLY);
-    }
-
-    @Override
-    public void process(final ProcessMethodContext processMethodContext) {
-        final MaxLength annotation = Annotations.getAnnotation(processMethodContext.getMethod(), MaxLength.class);
-        final MaxLengthFacet facet = create(annotation, processMethodContext.getFacetHolder());
-        FacetUtil.addFacet(validator.flagIfPresent(facet, processMethodContext));
-    }
-
-    private MaxLengthFacet create(final MaxLength annotation, final FacetHolder holder) {
-        return annotation == null ? null : new MaxLengthFacetOnActionAnnotation(annotation.value(), holder);
-    }
-
-    @Override
-    public void refineMetaModelValidator(final MetaModelValidatorComposite metaModelValidator, final IsisConfiguration configuration) {
-        metaModelValidator.add(validator);
-    }
-
-    @Override
-    public void setServicesInjector(final ServicesInjector servicesInjector) {
-        super.setServicesInjector(servicesInjector);
-        validator.setConfiguration(servicesInjector.lookupService(ConfigurationServiceInternal.class));
-    }
-
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/maxlen/annotation/MaxLengthFacetOnTypeAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/maxlen/annotation/MaxLengthFacetOnTypeAnnotation.java
deleted file mode 100644
index b6187be..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/maxlen/annotation/MaxLengthFacetOnTypeAnnotation.java
+++ /dev/null
@@ -1,35 +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.isis.core.metamodel.facets.object.maxlen.annotation;
-
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.objectvalue.maxlen.MaxLengthFacetAbstract;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class MaxLengthFacetOnTypeAnnotation extends MaxLengthFacetAbstract {
-
-    public MaxLengthFacetOnTypeAnnotation(final int value, final FacetHolder holder) {
-        super(value, holder);
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/maxlen/annotation/MaxLengthFacetOnTypeAnnotationFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/maxlen/annotation/MaxLengthFacetOnTypeAnnotationFactory.java
deleted file mode 100644
index dde01ba..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/maxlen/annotation/MaxLengthFacetOnTypeAnnotationFactory.java
+++ /dev/null
@@ -1,75 +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.isis.core.metamodel.facets.object.maxlen.annotation;
-
-import org.apache.isis.applib.annotation.MaxLength;
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facetapi.FacetUtil;
-import org.apache.isis.core.metamodel.facetapi.FeatureType;
-import org.apache.isis.core.metamodel.facetapi.MetaModelValidatorRefiner;
-import org.apache.isis.core.metamodel.facets.Annotations;
-import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
-import org.apache.isis.core.metamodel.facets.objectvalue.maxlen.MaxLengthFacet;
-import org.apache.isis.core.metamodel.progmodel.DeprecatedMarker;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorComposite;
-import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorForDeprecatedAnnotation;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class MaxLengthFacetOnTypeAnnotationFactory extends FacetFactoryAbstract implements MetaModelValidatorRefiner, DeprecatedMarker {
-
-    private final MetaModelValidatorForDeprecatedAnnotation validator = new MetaModelValidatorForDeprecatedAnnotation(MaxLength.class);
-
-    public MaxLengthFacetOnTypeAnnotationFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    /**
-     * In readiness for supporting <tt>@Value</tt> in the future.
-     */
-    @Override
-    public void process(final ProcessClassContext processClassContext) {
-        final MaxLength annotation = Annotations.getAnnotation(processClassContext.getCls(), MaxLength.class);
-        final MaxLengthFacet facet = create(annotation, processClassContext.getFacetHolder());
-        FacetUtil.addFacet(validator.flagIfPresent(facet));
-    }
-
-    private MaxLengthFacet create(final MaxLength annotation, final FacetHolder holder) {
-        return annotation == null ? null : new MaxLengthFacetOnTypeAnnotation(annotation.value(), holder);
-    }
-
-    @Override
-    public void refineMetaModelValidator(final MetaModelValidatorComposite metaModelValidator, final IsisConfiguration configuration) {
-        metaModelValidator.add(validator);
-    }
-
-    @Override
-    public void setServicesInjector(final ServicesInjector servicesInjector) {
-        super.setServicesInjector(servicesInjector);
-        IsisConfiguration configuration = servicesInjector.getConfigurationServiceInternal();
-        validator.setConfiguration(configuration);
-    }
-
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/param/parameter/ParameterAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/param/parameter/ParameterAnnotationFacetFactory.java
index e6393df..04ead2d 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/param/parameter/ParameterAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/param/parameter/ParameterAnnotationFacetFactory.java
@@ -35,7 +35,6 @@ import org.apache.isis.core.metamodel.facets.param.parameter.fileaccept.FileAcce
 import org.apache.isis.core.metamodel.facets.param.parameter.mandatory.MandatoryFacetForParameterAnnotation;
 import org.apache.isis.core.metamodel.facets.param.parameter.mandatory.MandatoryFacetInvertedByNullableAnnotationOnParameter;
 import org.apache.isis.core.metamodel.facets.param.parameter.mandatory.MandatoryFacetInvertedByOptionalAnnotationOnParameter;
-import org.apache.isis.core.metamodel.facets.param.parameter.maxlen.MaxLengthFacetForMaxLengthAnnotationOnParameter;
 import org.apache.isis.core.metamodel.facets.param.parameter.maxlen.MaxLengthFacetForParameterAnnotation;
 import org.apache.isis.core.metamodel.facets.param.parameter.mustsatisfy.MustSatisfySpecificationFacetForMustSatisfyAnnotationOnParameter;
 import org.apache.isis.core.metamodel.facets.param.parameter.mustsatisfy.MustSatisfySpecificationFacetForParameterAnnotation;
@@ -52,7 +51,6 @@ import java.lang.reflect.Method;
 
 public class ParameterAnnotationFacetFactory extends FacetFactoryAbstract implements MetaModelValidatorRefiner {
 
-    private final MetaModelValidatorForDeprecatedAnnotation maxLengthValidator = new MetaModelValidatorForDeprecatedAnnotation(MaxLength.class);
     private final MetaModelValidatorForDeprecatedAnnotation mustSatisfyValidator = new MetaModelValidatorForDeprecatedAnnotation(MustSatisfy.class);
     private final MetaModelValidatorForDeprecatedAnnotation regexValidator = new MetaModelValidatorForDeprecatedAnnotation(RegEx.class);
     private final MetaModelValidatorForDeprecatedAnnotation optionalValidator = new MetaModelValidatorForDeprecatedAnnotation(Optional.class);
@@ -88,15 +86,6 @@ public class ParameterAnnotationFacetFactory extends FacetFactoryAbstract implem
         final Annotation[] parameterAnnotations = Annotations.getParameterAnnotations(method)[paramNum];
 
         for (final Annotation parameterAnnotation : parameterAnnotations) {
-            if (parameterAnnotation instanceof MaxLength) {
-                final MaxLength annotation = (MaxLength) parameterAnnotation;
-                final org.apache.isis.core.metamodel.facets.objectvalue.maxlen.MaxLengthFacet facet = MaxLengthFacetForMaxLengthAnnotationOnParameter.create(annotation, processParameterContext.getFacetHolder());
-                FacetUtil.addFacet(maxLengthValidator.flagIfPresent(facet, processParameterContext));
-                return;
-            }
-        }
-
-        for (final Annotation parameterAnnotation : parameterAnnotations) {
             if (parameterAnnotation instanceof Parameter) {
                 final Parameter parameter = (Parameter) parameterAnnotation;
                 FacetUtil.addFacet(
@@ -230,7 +219,6 @@ public class ParameterAnnotationFacetFactory extends FacetFactoryAbstract implem
 
     @Override
     public void refineMetaModelValidator(final MetaModelValidatorComposite metaModelValidator, final IsisConfiguration configuration) {
-        metaModelValidator.add(maxLengthValidator);
         metaModelValidator.add(mustSatisfyValidator);
         metaModelValidator.add(regexValidator);
         metaModelValidator.add(optionalValidator);
@@ -241,7 +229,6 @@ public class ParameterAnnotationFacetFactory extends FacetFactoryAbstract implem
     public void setServicesInjector(final ServicesInjector servicesInjector) {
         super.setServicesInjector(servicesInjector);
         IsisConfiguration configuration = servicesInjector.getConfigurationServiceInternal();
-        maxLengthValidator.setConfiguration(configuration);
         mustSatisfyValidator.setConfiguration(configuration);
         regexValidator.setConfiguration(configuration);
         optionalValidator.setConfiguration(configuration);
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/param/parameter/maxlen/MaxLengthFacetForMaxLengthAnnotationOnParameter.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/param/parameter/maxlen/MaxLengthFacetForMaxLengthAnnotationOnParameter.java
deleted file mode 100644
index ee0c68c..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/param/parameter/maxlen/MaxLengthFacetForMaxLengthAnnotationOnParameter.java
+++ /dev/null
@@ -1,41 +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.isis.core.metamodel.facets.param.parameter.maxlen;
-
-import org.apache.isis.applib.annotation.MaxLength;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.objectvalue.maxlen.MaxLengthFacet;
-import org.apache.isis.core.metamodel.facets.objectvalue.maxlen.MaxLengthFacetAbstract;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class MaxLengthFacetForMaxLengthAnnotationOnParameter extends MaxLengthFacetAbstract {
-
-    public static MaxLengthFacet create(final MaxLength annotation, final FacetHolder holder) {
-        return annotation == null ? null : new MaxLengthFacetForMaxLengthAnnotationOnParameter(annotation.value(), holder);
-    }
-
-    private MaxLengthFacetForMaxLengthAnnotationOnParameter(final int value, final FacetHolder holder) {
-        super(value, holder);
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
index 0f3f54c..e1aa811 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
@@ -26,7 +26,6 @@ import javax.annotation.Nullable;
 import org.apache.isis.applib.annotation.Disabled;
 import org.apache.isis.applib.annotation.Hidden;
 import org.apache.isis.applib.annotation.Mandatory;
-import org.apache.isis.applib.annotation.MaxLength;
 import org.apache.isis.applib.annotation.MustSatisfy;
 import org.apache.isis.applib.annotation.NotPersisted;
 import org.apache.isis.applib.annotation.Optional;
@@ -63,7 +62,6 @@ import org.apache.isis.core.metamodel.facets.properties.property.mandatory.Manda
 import org.apache.isis.core.metamodel.facets.properties.property.mandatory.MandatoryFacetForPropertyAnnotation;
 import org.apache.isis.core.metamodel.facets.properties.property.mandatory.MandatoryFacetInvertedByNullableAnnotationOnProperty;
 import org.apache.isis.core.metamodel.facets.properties.property.mandatory.MandatoryFacetInvertedByOptionalAnnotationOnProperty;
-import org.apache.isis.core.metamodel.facets.properties.property.maxlength.MaxLengthFacetForMaxLengthAnnotationOnProperty;
 import org.apache.isis.core.metamodel.facets.properties.property.maxlength.MaxLengthFacetForPropertyAnnotation;
 import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForDomainEventFromDefault;
 import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForDomainEventFromPropertyAnnotation;
@@ -95,7 +93,6 @@ public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract impleme
     private final MetaModelValidatorForDeprecatedAnnotation mandatoryValidator = new MetaModelValidatorForDeprecatedAnnotation(Mandatory.class);
     private final MetaModelValidatorForDeprecatedAnnotation hiddenValidator = new MetaModelValidatorForDeprecatedAnnotation(Hidden.class);
     private final MetaModelValidatorForDeprecatedAnnotation disabledValidator = new MetaModelValidatorForDeprecatedAnnotation(Disabled.class);
-    private final MetaModelValidatorForDeprecatedAnnotation maxLengthValidator = new MetaModelValidatorForDeprecatedAnnotation(MaxLength.class);
     private final MetaModelValidatorForDeprecatedAnnotation mustSatisfyValidator = new MetaModelValidatorForDeprecatedAnnotation(MustSatisfy.class);
     private final MetaModelValidatorForDeprecatedAnnotation notPersistedValidator = new MetaModelValidatorForDeprecatedAnnotation(NotPersisted.class);
     private final MetaModelValidatorForConflictingOptionality conflictingOptionalityValidator = new MetaModelValidatorForConflictingOptionality();
@@ -293,15 +290,9 @@ public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract impleme
         final Method method = processMethodContext.getMethod();
         final FacetHolder holder = processMethodContext.getFacetHolder();
 
-        // check for deprecated @MaxLength first
-        final MaxLength annotation = Annotations.getAnnotation(method, MaxLength.class);
-        MaxLengthFacet facet = maxLengthValidator.flagIfPresent(MaxLengthFacetForMaxLengthAnnotationOnProperty.create(annotation, holder), processMethodContext);
-
-        // else search for @Property(maxLength=...)
+        // search for @Property(maxLength=...)
         final Property property = Annotations.getAnnotation(method, Property.class);
-        if(facet == null) {
-            facet = MaxLengthFacetForPropertyAnnotation.create(property, holder);
-        }
+        MaxLengthFacet facet = MaxLengthFacetForPropertyAnnotation.create(property, holder);
 
         FacetUtil.addFacet(facet);
     }
@@ -426,7 +417,6 @@ public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract impleme
         metaModelValidator.add(mandatoryValidator);
         metaModelValidator.add(hiddenValidator);
         metaModelValidator.add(disabledValidator);
-        metaModelValidator.add(maxLengthValidator);
         metaModelValidator.add(mustSatisfyValidator);
         metaModelValidator.add(notPersistedValidator);
         metaModelValidator.add(conflictingOptionalityValidator);
@@ -445,7 +435,6 @@ public class PropertyAnnotationFacetFactory extends FacetFactoryAbstract impleme
         mandatoryValidator.setConfiguration(configuration);
         hiddenValidator.setConfiguration(configuration);
         disabledValidator.setConfiguration(configuration);
-        maxLengthValidator.setConfiguration(configuration);
         mustSatisfyValidator.setConfiguration(configuration);
         notPersistedValidator.setConfiguration(configuration);
     }
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/maxlength/MaxLengthFacetForMaxLengthAnnotationOnProperty.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/maxlength/MaxLengthFacetForMaxLengthAnnotationOnProperty.java
index 2dad854..ecc3804 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/maxlength/MaxLengthFacetForMaxLengthAnnotationOnProperty.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/maxlength/MaxLengthFacetForMaxLengthAnnotationOnProperty.java
@@ -19,9 +19,7 @@
 
 package org.apache.isis.core.metamodel.facets.properties.property.maxlength;
 
-import org.apache.isis.applib.annotation.MaxLength;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.objectvalue.maxlen.MaxLengthFacet;
 import org.apache.isis.core.metamodel.facets.objectvalue.maxlen.MaxLengthFacetAbstract;
 
 /**
@@ -34,7 +32,4 @@ public class MaxLengthFacetForMaxLengthAnnotationOnProperty extends MaxLengthFac
         super(value, holder);
     }
 
-    public static MaxLengthFacet create(final MaxLength annotation, final FacetHolder holder) {
-        return annotation == null ? null : new MaxLengthFacetForMaxLengthAnnotationOnProperty(annotation.value(), holder);
-    }
 }
diff --git a/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java b/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
index 5f76395..83c93b1 100644
--- a/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
+++ b/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
@@ -20,7 +20,6 @@ package org.apache.isis.progmodels.dflt;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.metamodel.facets.actions.action.ActionAnnotationFacetFactory;
 import org.apache.isis.core.metamodel.facets.actions.action.ActionChoicesForCollectionParameterFacetFactory;
-import org.apache.isis.core.metamodel.facets.actions.contributing.maxlenannot.MaxLengthFacetOnActionAnnotationFactory;
 import org.apache.isis.core.metamodel.facets.actions.contributing.paged.PagedFacetOnActionFactory;
 import org.apache.isis.core.metamodel.facets.actions.defaults.method.ActionDefaultsFacetViaMethodFactory;
 import org.apache.isis.core.metamodel.facets.actions.exploration.annotation.PrototypeFacetForExplorationAnnotationFactory;
@@ -98,7 +97,6 @@ import org.apache.isis.core.metamodel.facets.object.ignore.jdo.RemoveJdoPrefixed
 import org.apache.isis.core.metamodel.facets.object.immutable.immutableannot.CopyImmutableFacetOntoMembersFactory;
 import org.apache.isis.core.metamodel.facets.object.immutable.immutablemarkerifc.ImmutableFacetMarkerInterfaceFactory;
 import org.apache.isis.core.metamodel.facets.object.mask.annotation.MaskFacetOnTypeAnnotationFactory;
-import org.apache.isis.core.metamodel.facets.object.maxlen.annotation.MaxLengthFacetOnTypeAnnotationFactory;
 import org.apache.isis.core.metamodel.facets.object.membergroups.annotprop.MemberGroupLayoutFacetFactory;
 import org.apache.isis.core.metamodel.facets.object.mixin.MixinFacetForMixinAnnotationFactory;
 import org.apache.isis.core.metamodel.facets.object.multiline.annotation.MultiLineFacetOnTypeAnnotationFactory;
@@ -366,10 +364,6 @@ public final class ProgrammingModelFacetsJava5 extends ProgrammingModelAbstract
 
 
         
-        addFactory(new MaxLengthFacetOnTypeAnnotationFactory());
-
-        addFactory(new MaxLengthFacetOnActionAnnotationFactory());
-
 
         addFactory(new MustSatisfySpecificationFromMustSatisfyAnnotationOnTypeFacetFactory());
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@isis.apache.org" <co...@isis.apache.org>'].