Remove all improper uses of the Apache Shiro API and replace with the appropriate core Spring Framework API.

For example, usages of org.apache.shiro.util.Assert and org.apache.shiro.util.StringUtils should be replaced with org.springframework.util.Assert and org.springframework.util.StringUtils, respectively.
This commit is contained in:
John Blum
2019-08-20 15:00:12 -07:00
parent 8f9c5777b3
commit 6558e0ee97
10 changed files with 20 additions and 15 deletions

View File

@@ -25,12 +25,13 @@ import java.util.Optional;
import java.util.stream.Collectors;
import org.apache.geode.cache.DiskStore;
import org.apache.shiro.util.Assert;
import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.context.ApplicationContext;
import org.springframework.data.gemfire.util.ArrayUtils;
import org.springframework.geode.boot.actuate.health.AbstractGeodeHealthIndicator;
import org.springframework.util.Assert;
/**
* The {@link GeodeDiskStoresHealthIndicator} class is a Spring Boot {@link HealthIndicator} providing details about

View File

@@ -23,11 +23,12 @@ import java.util.Optional;
import org.apache.geode.cache.Region;
import org.apache.geode.cache.query.Index;
import org.apache.geode.cache.query.IndexStatistics;
import org.apache.shiro.util.Assert;
import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.context.ApplicationContext;
import org.springframework.geode.boot.actuate.health.AbstractGeodeHealthIndicator;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
/**

View File

@@ -24,8 +24,7 @@ import java.util.Optional;
import java.util.function.Function;
import org.apache.geode.management.internal.security.ResourceConstants;
import org.apache.shiro.util.Assert;
import org.apache.shiro.util.StringUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.context.annotation.Bean;
@@ -41,7 +40,9 @@ import org.springframework.http.client.ClientHttpRequestInterceptor;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.ReflectionUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.client.RestTemplate;
/**

View File

@@ -22,8 +22,6 @@ import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
import org.apache.shiro.util.Assert;
import org.apache.shiro.util.StringUtils;
import org.springframework.boot.autoconfigure.condition.ConditionMessage;
import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
@@ -32,7 +30,9 @@ import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.annotation.AnnotationAttributes;
import org.springframework.core.env.PropertyResolver;
import org.springframework.core.type.AnnotatedTypeMetadata;
import org.springframework.util.Assert;
import org.springframework.util.MultiValueMap;
import org.springframework.util.StringUtils;
/**
* The {@link OnMissingPropertyCondition} class is a {@link SpringBootCondition}, Spring {@link Condition} type

View File

@@ -17,7 +17,7 @@ package example.app.books.model;
import java.util.UUID;
import org.apache.shiro.util.Assert;
import org.springframework.util.Assert;
/**
* The {@link ISBN} class is a Abstract Data Type (ADT) modeling either a {@link Book} ISBN-10 or ISBN-13 number.

View File

@@ -22,15 +22,14 @@ import java.util.Arrays;
import java.util.Iterator;
import java.util.Optional;
import org.apache.geode.cache.GemFireCache;
import org.apache.geode.cache.execute.FunctionService;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
import org.apache.geode.cache.GemFireCache;
import org.apache.geode.cache.execute.FunctionService;
import org.apache.shiro.util.Assert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.test.context.SpringBootTest;
@@ -41,6 +40,7 @@ import org.springframework.data.gemfire.function.annotation.GemfireFunction;
import org.springframework.data.gemfire.tests.integration.IntegrationTestsSupport;
import org.springframework.geode.boot.autoconfigure.function.executions.Calculator;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.util.Assert;
/**
* Integration tests testing the auto-configuration of Spring Data for Apache Geode/Pivotal GemFire

View File

@@ -18,10 +18,10 @@ package example.app.temp.service;
import java.util.Optional;
import org.apache.geode.cache.query.CqEvent;
import org.apache.shiro.util.Assert;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.data.gemfire.listener.annotation.ContinuousQuery;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;
import example.app.temp.event.BoilingTemperatureEvent;
import example.app.temp.event.FreezingTemperatureEvent;

View File

@@ -19,7 +19,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.Random;
import org.apache.shiro.util.StringUtils;
import org.springframework.util.StringUtils;
/**
* Generates random phone number using a few well-defined area codes.

View File

@@ -22,7 +22,6 @@ import java.util.function.Predicate;
import org.apache.geode.cache.CacheLoader;
import org.apache.geode.cache.CacheWriter;
import org.apache.geode.cache.Region;
import org.apache.shiro.util.Assert;
import org.springframework.data.gemfire.PeerRegionFactoryBean;
import org.springframework.data.gemfire.client.ClientRegionFactoryBean;
@@ -30,6 +29,7 @@ import org.springframework.data.gemfire.config.annotation.RegionConfigurer;
import org.springframework.data.repository.CrudRepository;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
/**
* A {@link RegionConfigurer} implementation used to enable Inline Caching on a designated {@link Region}.

View File

@@ -20,9 +20,10 @@ import java.lang.annotation.Annotation;
import java.util.Optional;
import org.apache.geode.cache.Cache;
import org.apache.shiro.util.Assert;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportAware;
@@ -31,6 +32,7 @@ import org.springframework.core.type.AnnotationMetadata;
import org.springframework.data.gemfire.config.annotation.ClientCacheConfigurer;
import org.springframework.data.gemfire.config.annotation.PeerCacheConfigurer;
import org.springframework.data.gemfire.config.annotation.support.AbstractAnnotationConfigSupport;
import org.springframework.util.Assert;
/**
* The {@link DistributedSystemIdConfiguration} class is a Spring {@link Configuration} class used to configure