Prefer ArrayList/ArrayDeque over LinkedList for multi-element holders
LinkedList remains in place where a List is likely to remain empty or single-element (in order to avoid unused capacity). Issue: SPR-17037
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -41,11 +41,12 @@ public class NameMatchMethodPointcutTests {
|
||||
|
||||
protected SerializableNopInterceptor nop;
|
||||
|
||||
|
||||
/**
|
||||
* Create an empty pointcut, populating instance variables.
|
||||
*/
|
||||
@Before
|
||||
public void setUp() {
|
||||
public void setup() {
|
||||
ProxyFactory pf = new ProxyFactory(new SerializablePerson());
|
||||
nop = new SerializableNopInterceptor();
|
||||
pc = new NameMatchMethodPointcut();
|
||||
@@ -53,6 +54,7 @@ public class NameMatchMethodPointcutTests {
|
||||
proxied = (Person) pf.getProxy();
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testMatchingOnly() {
|
||||
// Can't do exact matching through isMatch
|
||||
@@ -94,7 +96,7 @@ public class NameMatchMethodPointcutTests {
|
||||
|
||||
@Test
|
||||
public void testSets() throws Throwable {
|
||||
pc.setMappedNames(new String[] { "set*", "echo" });
|
||||
pc.setMappedNames("set*", "echo");
|
||||
assertEquals(0, nop.getCount());
|
||||
proxied.getName();
|
||||
proxied.setName("");
|
||||
@@ -116,7 +118,7 @@ public class NameMatchMethodPointcutTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEqualsAndHashCode() throws Exception {
|
||||
public void testEqualsAndHashCode() {
|
||||
NameMatchMethodPointcut pc1 = new NameMatchMethodPointcut();
|
||||
NameMatchMethodPointcut pc2 = new NameMatchMethodPointcut();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user