diff options
author | 2014-07-18 00:47:59 +0000 | |
---|---|---|
committer | 2014-07-18 00:47:59 +0000 | |
commit | 4de8f55113007fdc8e34107950e605fc0209d465 (patch) | |
tree | 92b7da8757a7740d9e1f2d3ead233542947d8c8c /src/google/protobuf/compiler/java/java_doc_comment.cc | |
parent | c5553a3d18f80132b9079c5504bc0aa1f7f950a0 (diff) |
down integrate to svn
Diffstat (limited to 'src/google/protobuf/compiler/java/java_doc_comment.cc')
-rw-r--r-- | src/google/protobuf/compiler/java/java_doc_comment.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/google/protobuf/compiler/java/java_doc_comment.cc b/src/google/protobuf/compiler/java/java_doc_comment.cc index 60b4f2ac..23127b7f 100644 --- a/src/google/protobuf/compiler/java/java_doc_comment.cc +++ b/src/google/protobuf/compiler/java/java_doc_comment.cc @@ -70,12 +70,10 @@ string EscapeJavadoc(const string& input) { } break; case '@': - // "{@" starts Javadoc markup. - if (prev == '{') { - result.append("@"); - } else { - result.push_back(c); - } + // '@' starts javadoc tags including the @deprecated tag, which will + // cause a compile-time error if inserted before a declaration that + // does not have a corresponding @Deprecated annotation. + result.append("@"); break; case '<': // Avoid interpretation as HTML. @@ -117,8 +115,7 @@ static void WriteDocCommentBodyForLocation( // HTML-escape them so that they don't accidentally close the doc comment. comments = EscapeJavadoc(comments); - vector<string> lines; - SplitStringAllowEmpty(comments, "\n", &lines); + vector<string> lines = Split(comments, "\n"); while (!lines.empty() && lines.back().empty()) { lines.pop_back(); } |