juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [juneau] branch master updated: Clean up deprecated code.
Date Fri, 16 Oct 2020 15:19:13 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 03e4fdb  Clean up deprecated code.
03e4fdb is described below

commit 03e4fdbe5165f351a1bce07ce7114be8bb7b8773
Author: JamesBognar <james.bognar@salesforce.com>
AuthorDate: Fri Oct 16 11:19:08 2020 -0400

    Clean up deprecated code.
---
 .../apache/juneau/BeanConfigAnnotationTest.java    |   8 -
 .../main/java/org/apache/juneau/BeanContext.java   | 197 ---------------------
 .../src/main/java/org/apache/juneau/BeanMeta.java  |   8 +-
 .../main/java/org/apache/juneau/annotation/SC.java |  25 ---
 .../main/java/org/apache/juneau/annotation/SS.java |  25 ---
 5 files changed, 4 insertions(+), 259 deletions(-)

diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/BeanConfigAnnotationTest.java
b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/BeanConfigAnnotationTest.java
index e369e7f..0028d45 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/BeanConfigAnnotationTest.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/BeanConfigAnnotationTest.java
@@ -222,10 +222,6 @@ public class BeanConfigAnnotationTest {
 		check("false", bc.isBeansRequireSettersForGetters());
 		check("true", bc.isBeansRequireSomeProperties());
 		check("_type", bc.getBeanTypePropertyName());
-		check("", bc.getBpi());
-		check("", bc.getBpx());
-		check("", bc.getBpro());
-		check("", bc.getBpwo());
 		check("false", bc.isDebug());
 		check("false", bc.isDetectRecursions());
 		check("", bc.getExamples());
@@ -273,10 +269,6 @@ public class BeanConfigAnnotationTest {
 		check("false", bc.isBeansRequireSettersForGetters());
 		check("true", bc.isBeansRequireSomeProperties());
 		check("_type", bc.getBeanTypePropertyName());
-		check("", bc.getBpi());
-		check("", bc.getBpx());
-		check("", bc.getBpro());
-		check("", bc.getBpwo());
 		check("false", bc.isDebug());
 		check("false", bc.isDetectRecursions());
 		check("", bc.getExamples());
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
index 67ecd61..7daec07 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
@@ -1096,46 +1096,6 @@ public class BeanContext extends Context implements MetaProvider {
 	public static final String BEAN_typePropertyName = PREFIX + ".typePropertyName.s";
 
 	/**
-	 * Configuration property:  Bean property includes.
-	 *
-	 * <div class='warn'>
-	 * 	<b>Deprecated</b> - Use {@link Bean#bpi()} and {@link BeanConfig#bpi()}
-	 * </div>
-	 */
-	@Deprecated
-	public static final String BEAN_bpi = PREFIX + ".bpi.sms";
-
-	/**
-	 * Configuration property:  Bean property excludes.
-	 *
-	 * <div class='warn'>
-	 * 	<b>Deprecated</b> - Use {@link Bean#bpx()} and {@link BeanConfig#bpx()}
-	 * </div>
-	 */
-	@Deprecated
-	public static final String BEAN_bpx = PREFIX + ".bpx.sms";
-
-	/**
-	 * Configuration property:  Read-only bean properties.
-	 *
-	 * <div class='warn'>
-	 * 	<b>Deprecated</b> - Use {@link Bean#bpro()} and {@link BeanConfig#bpro()}
-	 * </div>
-	 */
-	@Deprecated
-	public static final String BEAN_bpro = PREFIX + ".bpro.sms";
-
-	/**
-	 * Configuration property:  Write-only bean properties.
-	 *
-	 * <div class='warn'>
-	 * 	<b>Deprecated</b> - Use {@link Bean#bpwo()} and {@link BeanConfig#bpwo()}
-	 * </div>
-	 */
-	@Deprecated
-	public static final String BEAN_bpwo = PREFIX + ".bpwo.sms";
-
-	/**
 	 * Configuration property:  POJO examples.
 	 *
 	 * <h5 class='section'>Property:</h5>
@@ -2285,7 +2245,6 @@ public class BeanContext extends Context implements MetaProvider {
 	private final Map<String,?> examples;
 	private final BeanRegistry beanRegistry;
 	private final Map<String,ClassInfo> implClasses;
-	private final Map<String,Set<String>> bpi, bpx, bpro, bpwo;
 	private final PropertyNamer propertyNamer;
 	private final String typePropertyName;
 	private final int beanHashCode;
@@ -2403,27 +2362,6 @@ public class BeanContext extends Context implements MetaProvider {
 			icm.put(e.getKey(), ClassInfo.of(e.getValue()));
 		implClasses = icm.unmodifiable();
 
-		AMap<String,Set<String>> m2 = AMap.of();
-		for (Map.Entry<String,String> e : getMapProperty(BEAN_bpi, String.class).entrySet())
-			m2.put(e.getKey(), ASet.of(split(e.getValue())).unmodifiable());
-		bpi = m2.unmodifiable();
-
-		m2 = AMap.of();
-		for (Map.Entry<String,String> e : getMapProperty(BEAN_bpx, String.class).entrySet())
-			m2.put(e.getKey(), ASet.of(split(e.getValue())).unmodifiable());
-		bpx = m2.unmodifiable();
-
-		m2 = AMap.of();
-		for (Map.Entry<String,String> e : getMapProperty(BEAN_bpro, String.class).entrySet())
-			m2.put(e.getKey(), ASet.of(split(e.getValue())).unmodifiable());
-		bpro = m2.unmodifiable();
-
-		m2 = AMap.of();
-		for (Map.Entry<String,String> e : getMapProperty(BEAN_bpwo, String.class).entrySet())
-			m2.put(e.getKey(), ASet.of(split(e.getValue())).unmodifiable());
-		bpwo = m2.unmodifiable();
-
-
 		if (! cmCacheCache.containsKey(beanHashCode)) {
 			ConcurrentHashMap<Class,ClassMeta> cm = new ConcurrentHashMap<>();
 			cm.putIfAbsent(String.class, new ClassMeta(String.class, this, null, findPojoSwaps(String.class),
findChildPojoSwaps(String.class), findExample(String.class)));
@@ -3664,139 +3602,6 @@ public class BeanContext extends Context implements MetaProvider {
 	}
 
 	/**
-	 * Bean property includes.
-	 *
-	 * @see #BEAN_bpi
-	 * @return
-	 * 	Include properties keyed by class name.
-	 */
-	protected final Map<String,Set<String>> getBpi() {
-		return bpi;
-	}
-
-	/**
-	 * Returns the {@link #BEAN_bpi} setting for the specified class.
-	 *
-	 * @param c The class.
-	 * @return The properties to include for the specified class, or an empty set if it's not
defined for the class.
-	 */
-	protected Set<String> getBpi(Class<?> c) {
-		if (bpi.isEmpty())
-			return emptySet();
-		ClassInfo ci = ClassInfo.of(c);
-		for (ClassInfo c2 : ci.getAllParentsChildFirst()) {
-			for (String n : c2.getNames()) {
-				Set<String> s = bpi.get(n);
-				if (s != null)
-					return s;
-			}
-		}
-		if (bpi.containsKey("*"))
-			return bpi.get("*");
-		return emptySet();
-	}
-
-	/**
-	 * Bean property excludes.
-	 *
-	 * @see #BEAN_bpx
-	 * @return
-	 * 	The list of property names to exclude keyed by class name.
-	 */
-	protected final Map<String,Set<String>> getBpx() {
-		return bpx;
-	}
-
-	/**
-	 * Returns the {@link #BEAN_bpx} setting for the specified class.
-	 *
-	 * @param c The class.
-	 * @return The properties to exclude for the specified class, or an empty set if it's not
defined for the class.
-	 */
-	protected Set<String> getBpx(Class<?> c) {
-		if (bpx.isEmpty())
-			return emptySet();
-		ClassInfo ci = ClassInfo.of(c);
-		for (ClassInfo c2 : ci.getAllParentsChildFirst()) {
-			for (String n : c2.getNames()) {
-				Set<String> s = bpx.get(n);
-				if (s != null)
-					return s;
-			}
-		}
-		if (bpx.containsKey("*"))
-			return bpx.get("*");
-		return emptySet();
-	}
-
-	/**
-	 * Read-only bean properties.
-	 *
-	 * @see #BEAN_bpro
-	 * @return
-	 * 	The list of read-only property names keyed by class name.
-	 */
-	protected final Map<String,Set<String>> getBpro() {
-		return bpro;
-	}
-
-	/**
-	 * Returns the {@link #BEAN_bpro} setting for the specified class.
-	 *
-	 * @param c The class.
-	 * @return The read-only properties for the specified class, or an empty set if it's not
defined for the class.
-	 */
-	protected Set<String> getBpro(Class<?> c) {
-		if (bpro.isEmpty())
-			return emptySet();
-		ClassInfo ci = ClassInfo.of(c);
-		for (ClassInfo c2 : ci.getAllParentsChildFirst()) {
-			for (String n : c2.getNames()) {
-				Set<String> s = bpro.get(n);
-				if (s != null)
-					return s;
-			}
-		}
-		if (bpro.containsKey("*"))
-			return bpro.get("*");
-		return emptySet();
-	}
-
-	/**
-	 * Write-only bean properties.
-	 *
-	 * @see #BEAN_bpwo
-	 * @return
-	 * 	The list of write-only property names keyed by class name.
-	 */
-	protected final Map<String,Set<String>> getBpwo() {
-		return bpwo;
-	}
-
-	/**
-	 * Returns the {@link #BEAN_bpwo} setting for the specified class.
-	 *
-	 * @param c The class.
-	 * @return The write-only properties for the specified class, or an empty set if it's not
defined for the class.
-	 */
-	protected Set<String> getBpwo(Class<?> c) {
-		if (bpwo.isEmpty())
-			return emptySet();
-		ClassInfo ci = ClassInfo.of(c);
-		for (ClassInfo c2 : ci.getAllParentsChildFirst()) {
-			for (String n : c2.getNames()) {
-				Set<String> s = bpwo.get(n);
-				if (s != null)
-					return s;
-			}
-		}
-		if (bpwo.containsKey("*"))
-			return bpwo.get("*");
-		return emptySet();
-	}
-
-
-	/**
 	 * POJO examples.
 	 *
 	 * @see #BEAN_examples
@@ -4032,8 +3837,6 @@ public class BeanContext extends Context implements MetaProvider {
 				.a("beansRequireSerializable", beansRequireSerializable)
 				.a("beansRequireSettersForGetters", beansRequireSettersForGetters)
 				.a("beansRequireSomeProperties", beansRequireSomeProperties)
-				.a("bpi", bpi)
-				.a("bpx", bpx)
 				.a("ignoreInvocationExceptionsOnGetters", ignoreInvocationExceptionsOnGetters)
 				.a("ignoreInvocationExceptionsOnSetters", ignoreInvocationExceptionsOnSetters)
 				.a("ignorePropertiesWithoutSetters", ignorePropertiesWithoutSetters)
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java
index 45d3c98..7642629 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java
@@ -288,10 +288,10 @@ public class BeanMeta<T> {
 
 				// Explicitly defined property names in @Bean annotation.
 				Set<String> fixedBeanProps = new LinkedHashSet<>();
-				Set<String> bpi = new LinkedHashSet<>(ctx.getBpi(c));
-				Set<String> bpx = new LinkedHashSet<>(ctx.getBpx(c));
-				Set<String> bpro = new LinkedHashSet<>(ctx.getBpro(c));
-				Set<String> bpwo = new LinkedHashSet<>(ctx.getBpwo(c));
+				Set<String> bpi = new LinkedHashSet<>();
+				Set<String> bpx = new LinkedHashSet<>();
+				Set<String> bpro = new LinkedHashSet<>();
+				Set<String> bpwo = new LinkedHashSet<>();
 
 				Set<String> filterProps = new HashSet<>();  // Names of properties defined
in @Bean(properties)
 
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SC.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SC.java
deleted file mode 100644
index 0401ab8..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SC.java
+++ /dev/null
@@ -1,25 +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.juneau.annotation;
-
-/**
- * Represents a String-to-Class mapping.
- */
-public @interface SC {
-
-	/** The String key */
-	public String k();
-
-	/** The Class value */
-	public Class<?> v();
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SS.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SS.java
deleted file mode 100644
index a55c1ab..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SS.java
+++ /dev/null
@@ -1,25 +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.juneau.annotation;
-
-/**
- * Represents a String-to-String mapping.
- */
-public @interface SS {
-
-	/** The String key */
-	public String k();
-
-	/** The String value */
-	public String v();
-}


Mime
View raw message