
| Key: |
JRA-2037
|
| Type: |
Improvement
|
| Status: |
Open
|
| Priority: |
Major
|
| Assignee: |
Unassigned
|
| Reporter: |
Damjan Perenic
|
| Votes: |
2
|
| Watchers: |
2
|
|
If you were logged in you would be able to see more operations.
|
|
|
CVSspam ( http://www.badgers-in-foil.co.uk/projects/cvsspam/ ) generates nice html messages on CVS commits. They can include links to viewcvs (and some other web cvs viewers), so you can easily see changes in the code required to fix/implement this issue.
|
|
This is the code in CVSLogHandler that needs to change. I just created my own CvsSpamLogHandler class.
public String getCommentArea(String messageBody) {
if(messageBody == null)
return null;
BufferedReader reader = new BufferedReader(new StringReader(messageBody));
boolean insideComment = false;
StringBuffer comment = new StringBuffer();
try {
for(String line = reader.readLine(); line != null; line = reader.readLine())
if(!insideComment) { if(line.startsWith("<pre class=\"comment\">")) insideComment = true; } else {
if(line.startsWith("</pre>")) { insideComment = false; return comment.toString(); } else { comment.append(line); comment.append("\n"); }
}
}
catch(IOException e) { log.warn("IOException reading Mail body: " + e.getMessage(), e); }
if(insideComment)
log.warn("UnClosed Comment Tag! Not adding comment: [" + comment.substring(0, 15) + "]");
return null;
}