aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--juick-crosspost/src/main/java/com/juick/components/Crosspost.java4
-rw-r--r--juick-rss/src/main/java/com/juick/rss/MessagesView.java3
-rw-r--r--juick-server/src/main/java/com/juick/database/MySqlUpdater.java6
-rw-r--r--juick-server/src/main/java/com/juick/service/BaseJdbcService.java4
-rw-r--r--juick-server/src/main/java/com/juick/service/MessagesServiceImpl.java4
-rw-r--r--juick-server/src/main/java/com/juick/service/SubscriptionServiceImpl.java6
-rw-r--r--juick-server/src/main/java/com/juick/service/TagServiceImpl.java2
-rw-r--r--juick-server/src/main/java/com/juick/service/search/SphinxSearchServiceImpl.java4
-rw-r--r--juick-server/src/main/java/com/juick/service/security/JuickUserDetailsService.java2
-rw-r--r--juick-ws/src/main/java/com/juick/ws/XMPPConnection.java4
10 files changed, 20 insertions, 19 deletions
diff --git a/juick-crosspost/src/main/java/com/juick/components/Crosspost.java b/juick-crosspost/src/main/java/com/juick/components/Crosspost.java
index d7c0ec14..d2736d85 100644
--- a/juick-crosspost/src/main/java/com/juick/components/Crosspost.java
+++ b/juick-crosspost/src/main/java/com/juick/components/Crosspost.java
@@ -67,8 +67,8 @@ public class Crosspost extends TextWebSocketHandler {
MessagesService messagesService;
public Crosspost(final Environment env, final CrosspostService crosspostService) {
- Assert.notNull(env);
- Assert.notNull(crosspostService);
+ Assert.notNull(env, "Environment must be initialized");
+ Assert.notNull(crosspostService, "CrosspostService must be initialized");
this.crosspostService = crosspostService;
diff --git a/juick-rss/src/main/java/com/juick/rss/MessagesView.java b/juick-rss/src/main/java/com/juick/rss/MessagesView.java
index 3b6b48a6..26432ae4 100644
--- a/juick-rss/src/main/java/com/juick/rss/MessagesView.java
+++ b/juick-rss/src/main/java/com/juick/rss/MessagesView.java
@@ -25,6 +25,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.net.URI;
import java.net.URISyntaxException;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@@ -63,7 +64,7 @@ public class MessagesView extends AbstractRssFeedView {
atomLink.setHref(href);
atomLink.setType("application/rss+xml");
atomLink.setRel("self");
- atomLinkModule.setLink(atomLink);
+ atomLinkModule.setLinks(Collections.singletonList(atomLink));
feed.getModules().add(atomLinkModule);
} else {
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 c087ee29..2027d9f1 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 fe544efe..e3784345 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 a19878d9..495940f6 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 ae4af9df..d1eef338 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 cb345ceb..b5bd0ae8 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 161e0fb2..aa903545 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 d1fd9345..6f9ece7e 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;
}
diff --git a/juick-ws/src/main/java/com/juick/ws/XMPPConnection.java b/juick-ws/src/main/java/com/juick/ws/XMPPConnection.java
index 7a01c501..bd801dd6 100644
--- a/juick-ws/src/main/java/com/juick/ws/XMPPConnection.java
+++ b/juick-ws/src/main/java/com/juick/ws/XMPPConnection.java
@@ -52,8 +52,8 @@ public class XMPPConnection implements AutoCloseable {
public XMPPConnection(
final Environment env, final WebsocketComponent wsHandler) {
- Assert.notNull(env);
- Assert.notNull(wsHandler);
+ Assert.notNull(env, "Environment must be initialized");
+ Assert.notNull(wsHandler, "WebsocketComponent must be initialized");
this.wsHandler = wsHandler;