mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
Avoid a NPE if the public URL is not set.
--HG-- extra : rebase_source : 9b98f856d10dff6cb19bbaf90fb7eb22336aea7f
This commit is contained in:
@@ -41,7 +41,11 @@ public class FeedSubscriptionService {
|
||||
public Feed subscribe(User user, String url, String title,
|
||||
FeedCategory category) {
|
||||
|
||||
if (url.startsWith(applicationSettingsService.get().getPublicUrl())) {
|
||||
final String pubUrl = applicationSettingsService.get().getPublicUrl();
|
||||
if (pubUrl == null) {
|
||||
throw new RuntimeException("Public URL of this CommaFeed is unset");
|
||||
}
|
||||
if (url.startsWith(pubUrl)) {
|
||||
throw new RuntimeException(
|
||||
"Could not subscribe to a feed from this CommaFeed instance");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user