Odd, mine is set to 99 for static imports, I'll set it to 1 for statics. Gary
On Mon, Aug 15, 2016 at 5:44 PM, Remko Popma <[email protected]> wrote: > I use a high number to ensure all static imports are wildcarts. > (Thanks for the correction, I wrote from memory and had it the wrong way > around.) > > Sent from my iPhone > > On 2016/08/16, at 7:46, Matt Sicker <[email protected]> wrote: > > Is there a minimum number of imports before going to *, or are we just > using a really high number like 100 to prevent it altogether? > > On 15 August 2016 at 17:45, Remko Popma <[email protected]> wrote: > >> Gary, you may have upgraded your IDE and forgotten to change the static >> import threshold to 1 in the formatter. >> >> +import static org.junit.Assert.assertEquals; >> +import static org.junit.Assert.assertFalse; >> +import static org.junit.Assert.assertNull; >> +import static org.junit.Assert.assertTrue; >> + >> +import java.util.HashMap; >> import java.util.Map; >> >> import org.junit.Test; >> >> -import static org.junit.Assert.*; >> >> >> Sent from my iPhone >> >> On 2016/08/16, at 4:50, [email protected] wrote: >> >> Repository: logging-log4j2 >> Updated Branches: >> refs/heads/master 7230dbc6c -> 64cb45aaa >> >> >> [LOG4J2-1516] Add ThreadContextMap.putAll(Map<String, String>). >> >> Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo >> Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit >> /64cb45aa >> Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/64cb45aa >> Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/64cb45aa >> >> Branch: refs/heads/master >> Commit: 64cb45aaa03193cb434620c06bfe7520cc6172b7 >> Parents: 7230dbc >> Author: Gary Gregory <[email protected]> >> Authored: Mon Aug 15 12:50:31 2016 -0700 >> Committer: Gary Gregory <[email protected]> >> Committed: Mon Aug 15 12:50:31 2016 -0700 >> >> ---------------------------------------------------------------------- >> .../log4j/spi/DefaultThreadContextMapTest.java | 26 ++++++++++++++++++-- >> 1 file changed, 24 insertions(+), 2 deletions(-) >> ---------------------------------------------------------------------- >> >> >> http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/6 >> 4cb45aa/log4j-api/src/test/java/org/apache/logging/log4j/spi >> /DefaultThreadContextMapTest.java >> ---------------------------------------------------------------------- >> diff --git >> a/log4j-api/src/test/java/org/apache/logging/log4j/spi/DefaultThreadContextMapTest.java >> b/log4j-api/src/test/java/org/apache/logging/log4j/spi/Defau >> ltThreadContextMapTest.java >> index 65e06b8..71726f0 100644 >> --- a/log4j-api/src/test/java/org/apache/logging/log4j/spi/Defau >> ltThreadContextMapTest.java >> +++ b/log4j-api/src/test/java/org/apache/logging/log4j/spi/Defau >> ltThreadContextMapTest.java >> @@ -16,12 +16,16 @@ >> */ >> package org.apache.logging.log4j.spi; >> >> +import static org.junit.Assert.assertEquals; >> +import static org.junit.Assert.assertFalse; >> +import static org.junit.Assert.assertNull; >> +import static org.junit.Assert.assertTrue; >> + >> +import java.util.HashMap; >> import java.util.Map; >> >> import org.junit.Test; >> >> -import static org.junit.Assert.*; >> - >> /** >> * Tests the {@code DefaultThreadContextMap} class. >> */ >> @@ -68,6 +72,24 @@ public class DefaultThreadContextMapTest { >> assertEquals("value", map.get("key")); >> } >> >> + @Test >> + public void testPutAll() { >> + final DefaultThreadContextMap map = new >> DefaultThreadContextMap(true); >> + assertTrue(map.isEmpty()); >> + assertFalse(map.containsKey("key")); >> + final int mapSize = 10; >> + final Map<String, String> newMap = new HashMap<>(mapSize); >> + for (int i = 1; i <= mapSize; i++) { >> + newMap.put("key" + i, "value" + i); >> + } >> + map.putAll(newMap); >> + assertFalse(map.isEmpty()); >> + for (int i = 1; i <= mapSize; i++) { >> + assertTrue(map.containsKey("key" + i)); >> + assertEquals("value" + i, map.get("key" + i)); >> + } >> + } >> + >> /** >> * Test method for >> * {@link org.apache.logging.log4j.spi.D >> efaultThreadContextMap#remove(java.lang.String)} >> >> > > > -- > Matt Sicker <[email protected]> > > -- E-Mail: [email protected] | [email protected] Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> Spring Batch in Action <http://www.manning.com/templier/> Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory
