Skip to content

Commit 524d44e

Browse files
fixed #146
1 parent 1ec19d8 commit 524d44e

File tree

2 files changed

+17
-27
lines changed

2 files changed

+17
-27
lines changed

src/main/java/org/woehlke/twitterwall/oodm/entities/parts/EntitiesFilter.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ protected Set<Mention> findByUserDescription(String description,Task task) {
2121
if (description != null) {
2222

2323
String USER_PROFILE_INPUT[] = {
24-
"@("+ User.SCREEN_NAME_PATTERN+")(" + Entities.stopChar + ")",
25-
"@("+User.SCREEN_NAME_PATTERN+")$"
24+
"@("+ User.SCREEN_NAME_PATTERN +")(" + Entities.stopChar + ")",
25+
"@("+ User.SCREEN_NAME_PATTERN +")$"
2626
};
2727

2828
int USER_PROFILE_OUTPUT[] = {
@@ -54,8 +54,8 @@ protected String getFormattedTextForMentions(Set<Mention> mentions, String forma
5454
};
5555

5656
String USER_PROFILE_OUTPUT[] = {
57-
"<a class=\"tweet-action tweet-profile1\" href=\"https://twitter.com/$1\" target=\"_blank\">@$1</a>$2",
58-
"<a class=\"tweet-action tweet-profile2\" href=\"https://twitter.com/$1\" target=\"_blank\">@$1</a> "
57+
" <a class=\"tweet-action tweet-profile1\" href=\"https://twitter.com/$1\" target=\"_blank\">@$1</a>$2",
58+
" <a class=\"tweet-action tweet-profile2\" href=\"https://twitter.com/$1\" target=\"_blank\">@$1</a> "
5959
};
6060

6161
for(int i=0;i<2;i++){
@@ -78,10 +78,10 @@ protected String getFormattedTextForUserProfiles(String formattedText) {
7878
};
7979

8080
String USER_PROFILE_OUTPUT[] = {
81-
"<a class=\"tweet-action tweet-profile1\" href=\"/user/$2\">@$2</a>$3",
82-
"<a class=\"tweet-action tweet-profile2\" href=\"/user/$2\">@$2</a>",
83-
"<a class=\"tweet-action tweet-profile3\" href=\"/user/$1\">@$1</a>$2",
84-
"<a class=\"tweet-action tweet-profile4\" href=\"/user/$1\">@$1</a>"
81+
" <a class=\"tweet-action tweet-profile1\" href=\"/user/$2\">@$2</a>$3",
82+
" <a class=\"tweet-action tweet-profile2\" href=\"/user/$2\">@$2</a>",
83+
" <a class=\"tweet-action tweet-profile3\" href=\"/user/$1\">@$1</a>$2",
84+
" <a class=\"tweet-action tweet-profile4\" href=\"/user/$1\">@$1</a>"
8585
};
8686

8787
for(int i=0;i<4;i++){
@@ -126,8 +126,8 @@ protected String getFormattedTextForHashTags(Set<HashTag> tags, String formatted
126126
};
127127

128128
String USER_PROFILE_OUTPUT[] = {
129-
"<a class=\"tweet-action tweet-hashtag1\" href=\"/hashtag/$1\">#$1</a>$2",
130-
"<a class=\"tweet-action tweet-hashtag2\" href=\"/hashtag/$1\">#$1</a> "
129+
" <a class=\"tweet-action tweet-hashtag1\" href=\"/hashtag/$1\">#$1</a>$2",
130+
" <a class=\"tweet-action tweet-hashtag2\" href=\"/hashtag/$1\">#$1</a> "
131131
};
132132

133133
for(int i=0;i<2;i++){
@@ -332,12 +332,12 @@ protected String getFormattedTextForUrls(Set<Url> urls, String formattedText) {
332332
};
333333

334334
String USER_PROFILE_OUTPUT[] = {
335-
"<a href=\"" + url.getExpanded() + "\" class=\"tw-display1\" target=\"_blank\">" + url.getDisplay() + "</a>$2",
336-
"<a href=\"" + url.getExpanded() + "\" class=\"tw-display2\" target=\"_blank\">" + url.getDisplay() + "</a> ",
337-
"<a href=\"" + url.getExpanded() + "\" class=\"tw-expanded1\" target=\"_blank\">" + url.getDisplay() + "</a>$2",
338-
"<a href=\"" + url.getExpanded() + "\" class=\"tw-expanded2\" target=\"_blank\">" + url.getDisplay() + "</a> ",
339-
"<a href=\"" + url.getExpanded() + "\" class=\"tw-url1\" target=\"_blank\">" + url.getDisplay() + "</a>$2",
340-
"<a href=\"" + url.getExpanded() + "\" class=\"tw-url2\" target=\"_blank\">" + url.getDisplay() + "</a> "
335+
" <a href=\"" + url.getExpanded() + "\" class=\"tw-display1\" target=\"_blank\">" + url.getDisplay() + "</a>$2",
336+
" <a href=\"" + url.getExpanded() + "\" class=\"tw-display2\" target=\"_blank\">" + url.getDisplay() + "</a> ",
337+
" <a href=\"" + url.getExpanded() + "\" class=\"tw-expanded1\" target=\"_blank\">" + url.getDisplay() + "</a>$2",
338+
" <a href=\"" + url.getExpanded() + "\" class=\"tw-expanded2\" target=\"_blank\">" + url.getDisplay() + "</a> ",
339+
" <a href=\"" + url.getExpanded() + "\" class=\"tw-url1\" target=\"_blank\">" + url.getDisplay() + "</a>$2",
340+
" <a href=\"" + url.getExpanded() + "\" class=\"tw-url2\" target=\"_blank\">" + url.getDisplay() + "</a> "
341341
};
342342

343343
for(int i=0;i<6;i++){

src/main/java/org/woehlke/twitterwall/scheduled/service/persist/impl/CreatePersistentMentionImpl.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
import org.woehlke.twitterwall.oodm.entities.User;
1010
import org.woehlke.twitterwall.oodm.entities.Task;
1111
import org.woehlke.twitterwall.oodm.entities.Mention;
12-
import org.woehlke.twitterwall.oodm.service.TaskService;
1312
import org.woehlke.twitterwall.oodm.service.MentionService;
14-
import org.woehlke.twitterwall.scheduled.mq.endoint.StartTask;
1513
import org.woehlke.twitterwall.scheduled.service.persist.StoreTwitterProfileForProxyMentionForUser;
1614
import org.woehlke.twitterwall.scheduled.service.persist.CreatePersistentMention;
1715

@@ -53,7 +51,6 @@ public Mention getPersistentMentionAndUserFor(Mention mention, Task task) {
5351
if(foundUser.getScreenName().compareTo(mention.getScreenName())!=0){
5452
String eventMsg = msg + "KNOWN_BUG - ScreenName user: "+foundUser.getScreenName()+" mention: "+mention.getScreenName();
5553
log.warn(eventMsg);
56-
//taskService.warn(task,eventMsg);
5754
mention.setScreenName(foundUser.getScreenName());
5855
screenName = foundUser.getScreenName();
5956
}
@@ -73,7 +70,6 @@ public Mention getPersistentMentionAndUserFor(Mention mention, Task task) {
7370
return persMention;
7471
} else {
7572
String eventMsg = msg+"ERROR: useful Persistent Mention expectet, but there is none!";
76-
//taskService.error(task,eventMsg);
7773
log.error(eventMsg);
7874
return null;
7975
}
@@ -85,15 +81,9 @@ public Mention getPersistentMentionAndUserFor(Mention mention, Task task) {
8581

8682
private final StoreTwitterProfileForProxyMentionForUser storeTwitterProfileForProxyMentionForUser;
8783

88-
private final StartTask startTask;
89-
90-
private final TaskService taskService;
91-
9284
@Autowired
93-
public CreatePersistentMentionImpl(MentionService mentionService, StoreTwitterProfileForProxyMentionForUser storeTwitterProfileForProxyMentionForUser, StartTask startTask, TaskService taskService) {
85+
public CreatePersistentMentionImpl(MentionService mentionService, StoreTwitterProfileForProxyMentionForUser storeTwitterProfileForProxyMentionForUser) {
9486
this.mentionService = mentionService;
9587
this.storeTwitterProfileForProxyMentionForUser = storeTwitterProfileForProxyMentionForUser;
96-
this.startTask = startTask;
97-
this.taskService = taskService;
9888
}
9989
}

0 commit comments

Comments
 (0)