diff options
Diffstat (limited to 'juick-server/src/main')
7 files changed, 14 insertions, 14 deletions
diff --git a/juick-server/src/main/java/com/juick/database/MySqlUpdater.java b/juick-server/src/main/java/com/juick/database/MySqlUpdater.java index c087ee29f..2027d9f1d 100644 --- a/juick-server/src/main/java/com/juick/database/MySqlUpdater.java +++ b/juick-server/src/main/java/com/juick/database/MySqlUpdater.java @@ -36,9 +36,9 @@ public class MySqlUpdater { public MySqlUpdater(JdbcTemplate jdbcTemplate, PlatformTransactionManager transactionManager, String updateSqlResource) { - Assert.notNull(jdbcTemplate); - Assert.notNull(transactionManager); - Assert.notNull(updateSqlResource); + Assert.notNull(jdbcTemplate, "JdbcTemplate must be initialized"); + Assert.notNull(transactionManager, "PlatformTransactionManager must be initialized"); + Assert.notNull(updateSqlResource, "sqlResource must be initialized"); this.jdbcTemplate = jdbcTemplate; this.transactionTemplate = new TransactionTemplate(transactionManager); diff --git a/juick-server/src/main/java/com/juick/service/BaseJdbcService.java b/juick-server/src/main/java/com/juick/service/BaseJdbcService.java index fe544efea..e3784345a 100644 --- a/juick-server/src/main/java/com/juick/service/BaseJdbcService.java +++ b/juick-server/src/main/java/com/juick/service/BaseJdbcService.java @@ -22,7 +22,7 @@ public abstract class BaseJdbcService { protected BaseJdbcService(JdbcTemplate jdbcTemplate, PlatformTransactionManager transactionManager) { - Assert.notNull(jdbcTemplate); + Assert.notNull(jdbcTemplate, "JdbcTemplate must be initialized"); this.jdbcTemplate = jdbcTemplate; this.namedParameterJdbcTemplate = new NamedParameterJdbcTemplate(jdbcTemplate); @@ -32,7 +32,7 @@ public abstract class BaseJdbcService { } protected BaseJdbcService(DataSource dataSource, PlatformTransactionManager transactionManager) { - Assert.notNull(dataSource); + Assert.notNull(dataSource, "DataSource must be initialized"); this.jdbcTemplate = new JdbcTemplate(dataSource); this.namedParameterJdbcTemplate = new NamedParameterJdbcTemplate(jdbcTemplate); diff --git a/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java b/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java index a19878d98..495940f6b 100644 --- a/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java +++ b/juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java @@ -37,10 +37,10 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ public MessagesServiceImpl(JdbcTemplate jdbcTemplate, UserService userService, SearchService searchService) { super(jdbcTemplate, null); - Assert.notNull(userService); + Assert.notNull(userService, "UserService must be initialized"); this.userService = userService; - Assert.notNull(searchService); + Assert.notNull(searchService, "SearchService must be initialized"); this.searchService = searchService; } diff --git a/juick-server/src/main/java/com/juick/service/SubscriptionServiceImpl.java b/juick-server/src/main/java/com/juick/service/SubscriptionServiceImpl.java index ae4af9df4..d1eef3380 100644 --- a/juick-server/src/main/java/com/juick/service/SubscriptionServiceImpl.java +++ b/juick-server/src/main/java/com/juick/service/SubscriptionServiceImpl.java @@ -31,13 +31,13 @@ public class SubscriptionServiceImpl extends BaseJdbcService implements Subscrip MessagesService messagesService, TagService tagService) { super(jdbcTemplate, null); - Assert.notNull(userService); + Assert.notNull(userService, "UserService must be initialized"); this.userService = userService; - Assert.notNull(messagesService); + Assert.notNull(messagesService,"MessagesService must be initialized"); this.messagesService = messagesService; - Assert.notNull(tagService); + Assert.notNull(tagService, "TagService must be initialized"); this.tagService = tagService; } diff --git a/juick-server/src/main/java/com/juick/service/TagServiceImpl.java b/juick-server/src/main/java/com/juick/service/TagServiceImpl.java index cb345ceb5..b5bd0ae81 100644 --- a/juick-server/src/main/java/com/juick/service/TagServiceImpl.java +++ b/juick-server/src/main/java/com/juick/service/TagServiceImpl.java @@ -41,7 +41,7 @@ public class TagServiceImpl extends BaseJdbcService implements TagService { @Inject public TagServiceImpl(JdbcTemplate jdbcTemplate, MessagesService messagesService) { super(jdbcTemplate, null); - Assert.notNull(messagesService); + Assert.notNull(messagesService, "MessagesService must be initialized"); this.messagesService = messagesService; } diff --git a/juick-server/src/main/java/com/juick/service/search/SphinxSearchServiceImpl.java b/juick-server/src/main/java/com/juick/service/search/SphinxSearchServiceImpl.java index 161e0fb2e..aa9035457 100644 --- a/juick-server/src/main/java/com/juick/service/search/SphinxSearchServiceImpl.java +++ b/juick-server/src/main/java/com/juick/service/search/SphinxSearchServiceImpl.java @@ -27,12 +27,12 @@ public class SphinxSearchServiceImpl implements SearchService { public SphinxSearchServiceImpl(JdbcTemplate searchJdbcTemplate) { - Assert.notNull(searchJdbcTemplate); + Assert.notNull(searchJdbcTemplate, "JdbcTemplate must be initialized"); this.namedParameterSearchJdbcTemplate = new NamedParameterJdbcTemplate(searchJdbcTemplate); } public SphinxSearchServiceImpl(DataSource searchDataSource) { - Assert.notNull(searchDataSource); + Assert.notNull(searchDataSource, "DataSource must be initialized"); this.namedParameterSearchJdbcTemplate = new NamedParameterJdbcTemplate(searchDataSource); } diff --git a/juick-server/src/main/java/com/juick/service/security/JuickUserDetailsService.java b/juick-server/src/main/java/com/juick/service/security/JuickUserDetailsService.java index d1fd93455..6f9ece7e7 100644 --- a/juick-server/src/main/java/com/juick/service/security/JuickUserDetailsService.java +++ b/juick-server/src/main/java/com/juick/service/security/JuickUserDetailsService.java @@ -15,7 +15,7 @@ public class JuickUserDetailsService implements UserDetailsService { private final UserService userService; public JuickUserDetailsService(final UserService userService) { - Assert.notNull(userService); + Assert.notNull(userService, "UserService must be initialized"); this.userService = userService; } |