mirror of
				https://github.com/spring-projects/spring-security.git
				synced 2025-10-31 06:38:42 +00:00 
			
		
		
		
	Using putIfAbsent instead of put
This commit is contained in:
		
							parent
							
								
									9a50ca74b4
								
							
						
					
					
						commit
						cd6f33c03e
					
				| @ -127,11 +127,7 @@ final class FilterOrderRegistration { | ||||
| 	 * @param position the position to associate with the {@link Filter} | ||||
| 	 */ | ||||
| 	void put(Class<? extends Filter> filter, int position) { | ||||
| 		String className = filter.getName(); | ||||
| 		if (this.filterToOrder.containsKey(className)) { | ||||
| 			return; | ||||
| 		} | ||||
| 		this.filterToOrder.put(className, position); | ||||
| 		this.filterToOrder.putIfAbsent(filter.getName(), position); | ||||
| 	} | ||||
| 
 | ||||
| 	/** | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user