Code Review
/
common
/
thrift.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
6f7681f
)
Thrift-1251: Generated java code should indicate which fields are required and which...
author
Jake Farrell
<jfarrell@apache.org>
Sun, 6 Nov 2011 15:02:30 +0000
(15:02 +0000)
committer
Jake Farrell
<jfarrell@apache.org>
Sun, 6 Nov 2011 15:02:30 +0000
(15:02 +0000)
Client: java
Patch: Jake Farrell
Fixes optional/required comments on fields.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@
1198386
13f79535
-47bb-0310-9956-
ffa450edef68
compiler/cpp/src/generate/t_java_generator.cc
patch
|
blob
|
history
diff --git
a/compiler/cpp/src/generate/t_java_generator.cc
b/compiler/cpp/src/generate/t_java_generator.cc
index
7b995f3
..
2b54259
100644
(file)
--- a/
compiler/cpp/src/generate/t_java_generator.cc
+++ b/
compiler/cpp/src/generate/t_java_generator.cc
@@
-3266,7
+3266,7
@@
string t_java_generator::declare_field(t_field* tfield, bool init) {
}
}
result += "; // ";
- if (tfield->get_
xsd_optional()
) {
+ if (tfield->get_
req() == t_field::T_OPTIONAL
) {
result += "optional";
} else {
result += "required";