[protobuf] Issue 676 in protobuf: protoc does not warn for Java keyword super

2014-10-21 Thread protobuf

Status: New
Owner: liuj...@google.com
Labels: Type-Defect Priority-Medium

New issue 676 by klocksve...@gmail.com: protoc does not warn for Java  
keyword super

https://code.google.com/p/protobuf/issues/detail?id=676

What steps will reproduce the problem?
1. Be mindless and forget that super is a keyword and try to use it as an  
enum identifier.

2. Create protofile:
enum SuperEnum {
  super = 1;
}

message SuperMessage {
  required SuperEnum super = 1;
}

3. compile with protoc
4. compile with javac
5. Get confused, because a moment ago before some copy and paste  
acrobatics, everything worked just fine and the cause is obfuscated by  
unrelated errors.



What is the expected output? What do you see instead?
protoc should warn or deny to use identifier super, instead it does not  
show any warning.


javac does not compile with error
SuperEnumMessage.java:13: error: identifier expected
  implements com.google.protobuf.ProtocolMessageEnum {
and tons of subsequent errors.

What version of the product are you using? On what operating system?
protoc 2.5.0, java hotspot 1.8.0_25, Linux 64-bit


--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups Protocol 
Buffers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Protocol Buffers 2.6.1

2014-10-21 Thread Feng Xiao
Hi all,

I just published Protocol Buffers v2.6.1:
https://github.com/google/protobuf/releases/tag/2.6.1

2014-10-20 version 2.6.1:

  C++
  * Added atomicops support for Solaris.
  * Released memory allocated by InitializeDefaultRepeatedFields() and
GetEmptyString(). Some memory sanitizers reported them as memory leaks.

  Java
  * Updated DynamicMessage.setField() to handle repeated enum values
correctly.
  * Fixed a bug that caused NullPointerException to be thrown when
converting manually constructed FileDescriptorProto to
FileDescriptor.

  Python
  * Fixed WhichOneof() to work with de-serialized protobuf messages.
  * Fixed a missing file problem of Python C++ implementation.

I'll soon upload it to Maven and pypi for Java and Python respectively.

Cheers,
Feng

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.