You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by GitBox <gi...@apache.org> on 2022/11/16 18:49:54 UTC
[GitHub] [thrift] Jens-G opened a new pull request, #2727: THRIFT-3956 Java keywords that are legal in IDL can lead to generated code that will not compile
Jens-G opened a new pull request, #2727:
URL: https://github.com/apache/thrift/pull/2727
I might have overlooked a few cases. I used the test case from that ticket.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@thrift.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [thrift] Jens-G commented on a diff in pull request #2727: THRIFT-3956 Java keywords that are legal in IDL can lead to generated code that will not compile
Posted by GitBox <gi...@apache.org>.
Jens-G commented on code in PR #2727:
URL: https://github.com/apache/thrift/pull/2727#discussion_r1024695447
##########
compiler/cpp/src/thrift/generate/t_java_generator.cc:
##########
@@ -503,6 +510,89 @@ string t_java_generator::java_override_annotation() {
return "@Override";
}
+map<string, int> t_java_generator::get_keywords_list() const
+{
+ return java_keywords;
+}
+
+void t_java_generator::init_keywords()
+{
+ java_keywords.clear();
+
+ // according to Oracle docs
+ java_keywords["abstract"] = 1;
Review Comment:
sure. in netstd there is a simikliar place that you could handle the same way
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [thrift] Jimexist commented on a diff in pull request #2727: THRIFT-3956 Java keywords that are legal in IDL can lead to generated code that will not compile
Posted by GitBox <gi...@apache.org>.
Jimexist commented on code in PR #2727:
URL: https://github.com/apache/thrift/pull/2727#discussion_r1024651621
##########
compiler/cpp/src/thrift/generate/t_java_generator.cc:
##########
@@ -503,6 +510,89 @@ string t_java_generator::java_override_annotation() {
return "@Override";
}
+map<string, int> t_java_generator::get_keywords_list() const
+{
+ return java_keywords;
+}
+
+void t_java_generator::init_keywords()
+{
+ java_keywords.clear();
+
+ // according to Oracle docs
+ java_keywords["abstract"] = 1;
Review Comment:
can we just create an array and populate the map from that?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [thrift] Jens-G merged pull request #2727: THRIFT-3956 Java keywords that are legal in IDL can lead to generated code that will not compile
Posted by GitBox <gi...@apache.org>.
Jens-G merged PR #2727:
URL: https://github.com/apache/thrift/pull/2727
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@thrift.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [thrift] Jens-G commented on a diff in pull request #2727: THRIFT-3956 Java keywords that are legal in IDL can lead to generated code that will not compile
Posted by GitBox <gi...@apache.org>.
Jens-G commented on code in PR #2727:
URL: https://github.com/apache/thrift/pull/2727#discussion_r1024695447
##########
compiler/cpp/src/thrift/generate/t_java_generator.cc:
##########
@@ -503,6 +510,89 @@ string t_java_generator::java_override_annotation() {
return "@Override";
}
+map<string, int> t_java_generator::get_keywords_list() const
+{
+ return java_keywords;
+}
+
+void t_java_generator::init_keywords()
+{
+ java_keywords.clear();
+
+ // according to Oracle docs
+ java_keywords["abstract"] = 1;
Review Comment:
sure. in netstd there is a similar place that you could be handled the same way => DONE c# will follow later
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org