You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2014/05/31 23:02:47 UTC

git commit: THRIFT-2435 Java compiler doesn't like struct member names that are identical to an existing enum or struct type Client: java Patch: Jens Geyer

Repository: thrift
Updated Branches:
  refs/heads/master a3350b48e -> cf18e9183


THRIFT-2435 Java compiler doesn't like struct member names that are identical to an existing enum or struct type
Client: java
Patch: Jens Geyer

Fixed a potential nullptr dereference introduced by that patch (Coverity ID 1216835)


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/cf18e918
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/cf18e918
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/cf18e918

Branch: refs/heads/master
Commit: cf18e91831507f20ac777262174288d64e3f5bbe
Parents: a3350b4
Author: Jens Geyer <je...@apache.org>
Authored: Sat May 31 22:58:15 2014 +0200
Committer: Jens Geyer <je...@apache.org>
Committed: Sat May 31 22:58:15 2014 +0200

----------------------------------------------------------------------
 compiler/cpp/src/generate/t_java_generator.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/cf18e918/compiler/cpp/src/generate/t_java_generator.cc
----------------------------------------------------------------------
diff --git a/compiler/cpp/src/generate/t_java_generator.cc b/compiler/cpp/src/generate/t_java_generator.cc
index 2814099..1da60d9 100644
--- a/compiler/cpp/src/generate/t_java_generator.cc
+++ b/compiler/cpp/src/generate/t_java_generator.cc
@@ -3530,7 +3530,7 @@ string t_java_generator::type_name(t_type* ttype, bool in_container, bool in_ini
 
   // Check for namespacing
   t_program* program = ttype->get_program();
-  if ((program != NULL && program != program_) || force_namespace) {
+  if ((program != NULL) && ((program != program_) || force_namespace)) {
     string package = program->get_namespace("java");
     if (!package.empty()) {
       return package + "." + ttype->get_name();