From d96822ea80fb323fbb3302ba4db52f344b0cf959 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 6 May 2015 21:23:20 -0400 Subject: Bump the version to 1.3-SNAPSHOT. --- pom.xml | 2 +- sangria-contextual/pom.xml | 2 +- sangria-core/pom.xml | 2 +- sangria-lazy/pom.xml | 2 +- sangria-listbinder/pom.xml | 2 +- sangria-log4j/pom.xml | 2 +- sangria-slf4j/pom.xml | 2 +- sangria-test/pom.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 8ac8012..947a220 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.tavianator.sangria sangria - 1.2-SNAPSHOT + 1.3-SNAPSHOT pom Sangria diff --git a/sangria-contextual/pom.xml b/sangria-contextual/pom.xml index 702616f..82aa9ee 100644 --- a/sangria-contextual/pom.xml +++ b/sangria-contextual/pom.xml @@ -7,7 +7,7 @@ com.tavianator.sangria sangria - 1.2-SNAPSHOT + 1.3-SNAPSHOT sangria-contextual diff --git a/sangria-core/pom.xml b/sangria-core/pom.xml index c06b186..1801ed4 100644 --- a/sangria-core/pom.xml +++ b/sangria-core/pom.xml @@ -7,7 +7,7 @@ com.tavianator.sangria sangria - 1.2-SNAPSHOT + 1.3-SNAPSHOT sangria-core diff --git a/sangria-lazy/pom.xml b/sangria-lazy/pom.xml index e2c806e..ba6b122 100644 --- a/sangria-lazy/pom.xml +++ b/sangria-lazy/pom.xml @@ -7,7 +7,7 @@ com.tavianator.sangria sangria - 1.2-SNAPSHOT + 1.3-SNAPSHOT sangria-lazy diff --git a/sangria-listbinder/pom.xml b/sangria-listbinder/pom.xml index 4040c4a..ded89fa 100644 --- a/sangria-listbinder/pom.xml +++ b/sangria-listbinder/pom.xml @@ -7,7 +7,7 @@ com.tavianator.sangria sangria - 1.2-SNAPSHOT + 1.3-SNAPSHOT sangria-listbinder diff --git a/sangria-log4j/pom.xml b/sangria-log4j/pom.xml index b91bb7e..2b9fe74 100644 --- a/sangria-log4j/pom.xml +++ b/sangria-log4j/pom.xml @@ -7,7 +7,7 @@ com.tavianator.sangria sangria - 1.2-SNAPSHOT + 1.3-SNAPSHOT sangria-log4j diff --git a/sangria-slf4j/pom.xml b/sangria-slf4j/pom.xml index 53cbfb7..41d6647 100644 --- a/sangria-slf4j/pom.xml +++ b/sangria-slf4j/pom.xml @@ -7,7 +7,7 @@ com.tavianator.sangria sangria - 1.2-SNAPSHOT + 1.3-SNAPSHOT sangria-slf4j diff --git a/sangria-test/pom.xml b/sangria-test/pom.xml index cdb835d..4ee89c3 100644 --- a/sangria-test/pom.xml +++ b/sangria-test/pom.xml @@ -7,7 +7,7 @@ com.tavianator.sangria sangria - 1.2-SNAPSHOT + 1.3-SNAPSHOT sangria-test -- cgit v1.2.3 From 9010e2fee46485132e78f5a490b900bfde4d3f9b Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 6 May 2015 21:21:29 -0400 Subject: Use the Guice 4 release (and BOM). --- pom.xml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 947a220..7c971dd 100644 --- a/pom.xml +++ b/pom.xml @@ -92,14 +92,10 @@ com.google.inject - guice - 4.0-beta5 - - - - com.google.inject.extensions - guice-multibindings - 4.0-beta5 + guice-bom + 4.0 + pom + import -- cgit v1.2.3 From 2abbfaa3e5b1cbfcf8e9f8c4d27d3f6762175459 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 6 May 2015 21:39:59 -0400 Subject: slf4j, log4j: Fix some tests that "broke" due to Guice fixes. --- .../sangria/log4j/SangriaLog4jModuleTest.java | 26 ++++++++++++---------- .../sangria/slf4j/SangriaSlf4jModuleTest.java | 26 ++++++++++++---------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/sangria-log4j/src/test/java/com/tavianator/sangria/log4j/SangriaLog4jModuleTest.java b/sangria-log4j/src/test/java/com/tavianator/sangria/log4j/SangriaLog4jModuleTest.java index a3ecd66..ce6982b 100644 --- a/sangria-log4j/src/test/java/com/tavianator/sangria/log4j/SangriaLog4jModuleTest.java +++ b/sangria-log4j/src/test/java/com/tavianator/sangria/log4j/SangriaLog4jModuleTest.java @@ -57,21 +57,23 @@ public class SangriaLog4jModuleTest { assertThat(provider.get().getName(), equalTo(LogManager.ROOT_LOGGER_NAME)); } + static class HasProviderMethod extends AbstractModule { + @Override + protected void configure() { + install(new SangriaLog4jModule()); + } + + @Provides + String getLoggerName(Logger logger) { + return logger.getName(); + } + } + @Test public void testProviderMethod() { - Injector injector = Guice.createInjector(new AbstractModule() { - @Override - protected void configure() { - install(new SangriaLog4jModule()); - } - - @Provides - String getLoggerName(Logger logger) { - return logger.getName(); - } - }); + Injector injector = Guice.createInjector(new HasProviderMethod()); - assertThat(injector.getInstance(String.class), equalTo(LogManager.ROOT_LOGGER_NAME)); + assertThat(injector.getInstance(String.class), equalTo(HasProviderMethod.class.getName())); } @Test diff --git a/sangria-slf4j/src/test/java/com/tavianator/sangria/slf4j/SangriaSlf4jModuleTest.java b/sangria-slf4j/src/test/java/com/tavianator/sangria/slf4j/SangriaSlf4jModuleTest.java index aaf72b2..07bf068 100644 --- a/sangria-slf4j/src/test/java/com/tavianator/sangria/slf4j/SangriaSlf4jModuleTest.java +++ b/sangria-slf4j/src/test/java/com/tavianator/sangria/slf4j/SangriaSlf4jModuleTest.java @@ -58,21 +58,23 @@ public class SangriaSlf4jModuleTest { assertThat(provider.get().getName(), equalTo(Logger.ROOT_LOGGER_NAME)); } + static class HasProviderMethod extends AbstractModule { + @Override + protected void configure() { + install(new SangriaSlf4jModule()); + } + + @Provides + String getLoggerName(Logger logger) { + return logger.getName(); + } + } + @Test public void testProviderMethod() { - Injector injector = Guice.createInjector(new AbstractModule() { - @Override - protected void configure() { - install(new SangriaSlf4jModule()); - } - - @Provides - String getLoggerName(Logger logger) { - return logger.getName(); - } - }); + Injector injector = Guice.createInjector(new HasProviderMethod()); - assertThat(injector.getInstance(String.class), equalTo(Logger.ROOT_LOGGER_NAME)); + assertThat(injector.getInstance(String.class), equalTo(HasProviderMethod.class.getName())); } @Test -- cgit v1.2.3 From 55e93141ff7f93cbecb341ad49d2811800569e0d Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 6 May 2015 21:41:44 -0400 Subject: log4j: Add missing JavaDoc on test. --- .../test/java/com/tavianator/sangria/log4j/SangriaLog4jModuleTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sangria-log4j/src/test/java/com/tavianator/sangria/log4j/SangriaLog4jModuleTest.java b/sangria-log4j/src/test/java/com/tavianator/sangria/log4j/SangriaLog4jModuleTest.java index ce6982b..9dbc560 100644 --- a/sangria-log4j/src/test/java/com/tavianator/sangria/log4j/SangriaLog4jModuleTest.java +++ b/sangria-log4j/src/test/java/com/tavianator/sangria/log4j/SangriaLog4jModuleTest.java @@ -34,6 +34,8 @@ import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; /** + * Tests for {@link SangriaLog4jModule}. + * * @author Tavian Barnes (tavianator@tavianator.com) * @version 1.0 * @since 1.0 -- cgit v1.2.3