aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--java/src/main/java/com/google/protobuf/DynamicMessage.java2
-rw-r--r--java/src/main/java/com/google/protobuf/RepeatedFieldBuilder.java2
-rw-r--r--java/src/main/java/com/google/protobuf/SingleFieldBuilder.java2
-rw-r--r--java/src/main/java/com/google/protobuf/TextFormat.java8
-rwxr-xr-xpython/google/protobuf/internal/generator_test.py2
-rwxr-xr-xpython/google/protobuf/internal/service_reflection_test.py2
-rw-r--r--python/google/protobuf/pyext/message.h2
-rw-r--r--python/google/protobuf/pyext/repeated_composite_container.h2
-rw-r--r--python/google/protobuf/pyext/scoped_pyobject_ptr.h2
-rwxr-xr-xpython/mox.py2
-rw-r--r--src/google/protobuf/compiler/command_line_interface.h2
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_unittest.cc2
-rw-r--r--src/google/protobuf/compiler/java/java_helpers.h2
-rw-r--r--src/google/protobuf/descriptor.cc2
-rw-r--r--src/google/protobuf/descriptor.h4
-rw-r--r--src/google/protobuf/io/tokenizer.h2
-rw-r--r--src/google/protobuf/stubs/common.h4
-rw-r--r--src/google/protobuf/stubs/template_util.h2
-rw-r--r--src/google/protobuf/text_format.cc38
-rw-r--r--src/google/protobuf/text_format_unittest.cc12
-rw-r--r--src/google/protobuf/unittest_import.proto2
21 files changed, 49 insertions, 49 deletions
diff --git a/java/src/main/java/com/google/protobuf/DynamicMessage.java b/java/src/main/java/com/google/protobuf/DynamicMessage.java
index 06b30fff..9c5e6c61 100644
--- a/java/src/main/java/com/google/protobuf/DynamicMessage.java
+++ b/java/src/main/java/com/google/protobuf/DynamicMessage.java
@@ -59,7 +59,7 @@ public final class DynamicMessage extends AbstractMessage {
* oneofCases stores the FieldDescriptor for each oneof to indicate
* which field is set. Caller should make sure the array is immutable.
*
- * This contructor is package private and will be used in
+ * This constructor is package private and will be used in
* {@code DynamicMutableMessage} to convert a mutable message to an immutable
* message.
*/
diff --git a/java/src/main/java/com/google/protobuf/RepeatedFieldBuilder.java b/java/src/main/java/com/google/protobuf/RepeatedFieldBuilder.java
index 63535ac8..be737b1a 100644
--- a/java/src/main/java/com/google/protobuf/RepeatedFieldBuilder.java
+++ b/java/src/main/java/com/google/protobuf/RepeatedFieldBuilder.java
@@ -54,7 +54,7 @@ import java.util.List;
* that desires a Message instead of a Builder. In terms of the implementation,
* the {@code SingleFieldBuilder} and {@code RepeatedFieldBuilder}
* classes cache messages that were created so that messages only need to be
- * created when some change occured in its builder or a builder for one of its
+ * created when some change occurred in its builder or a builder for one of its
* descendants.
*
* @param <MType> the type of message for the field
diff --git a/java/src/main/java/com/google/protobuf/SingleFieldBuilder.java b/java/src/main/java/com/google/protobuf/SingleFieldBuilder.java
index 13a36d47..aba65e32 100644
--- a/java/src/main/java/com/google/protobuf/SingleFieldBuilder.java
+++ b/java/src/main/java/com/google/protobuf/SingleFieldBuilder.java
@@ -47,7 +47,7 @@ package com.google.protobuf;
* that desires a Message instead of a Builder. In terms of the implementation,
* the {@code SingleFieldBuilder} and {@code RepeatedFieldBuilder}
* classes cache messages that were created so that messages only need to be
- * created when some change occured in its builder or a builder for one of its
+ * created when some change occurred in its builder or a builder for one of its
* descendants.
*
* @param <MType> the type of message for the field
diff --git a/java/src/main/java/com/google/protobuf/TextFormat.java b/java/src/main/java/com/google/protobuf/TextFormat.java
index 44674811..63e62fc6 100644
--- a/java/src/main/java/com/google/protobuf/TextFormat.java
+++ b/java/src/main/java/com/google/protobuf/TextFormat.java
@@ -1387,7 +1387,7 @@ public final class TextFormat {
// Try to guess the type of this field.
// If this field is not a message, there should be a ":" between the
// field name and the field value and also the field value should not
- // start with "{" or "<" which indicates the begining of a message body.
+ // start with "{" or "<" which indicates the beginning of a message body.
// If there is no ":" or there is a "{" or "<" after ":", this field has
// to be a message or the input is ill-formed.
if (tokenizer.tryConsume(":") && !tokenizer.lookingAt("{") &&
@@ -1574,7 +1574,7 @@ public final class TextFormat {
// Try to guess the type of this field.
// If this field is not a message, there should be a ":" between the
// field name and the field value and also the field value should not
- // start with "{" or "<" which indicates the begining of a message body.
+ // start with "{" or "<" which indicates the beginning of a message body.
// If there is no ":" or there is a "{" or "<" after ":", this field has
// to be a message or the input is ill-formed.
if (tokenizer.tryConsume(":") && !tokenizer.lookingAt("<") &&
@@ -1591,8 +1591,8 @@ public final class TextFormat {
}
/**
- * Skips the whole body of a message including the beginning delimeter and
- * the ending delimeter.
+ * Skips the whole body of a message including the beginning delimiter and
+ * the ending delimiter.
*/
private void skipFieldMessage(Tokenizer tokenizer) throws ParseException {
final String delimiter;
diff --git a/python/google/protobuf/internal/generator_test.py b/python/google/protobuf/internal/generator_test.py
index 14b05cca..303d3e03 100755
--- a/python/google/protobuf/internal/generator_test.py
+++ b/python/google/protobuf/internal/generator_test.py
@@ -149,7 +149,7 @@ class GeneratorTest(basetest.TestCase):
proto = unittest_custom_options_pb2.TestMessageWithCustomOptions()
enum_options = proto.DESCRIPTOR.enum_types_by_name['AnEnum'].GetOptions()
self.assertTrue(enum_options is not None)
- # TODO(gps): We really should test for the presense of the enum_opt1
+ # TODO(gps): We really should test for the presence of the enum_opt1
# extension and for its value to be set to -789.
def testNestedTypes(self):
diff --git a/python/google/protobuf/internal/service_reflection_test.py b/python/google/protobuf/internal/service_reflection_test.py
index 07dcf445..d066ae70 100755
--- a/python/google/protobuf/internal/service_reflection_test.py
+++ b/python/google/protobuf/internal/service_reflection_test.py
@@ -118,7 +118,7 @@ class FooUnitTest(basetest.TestCase):
rpc_controller = 'controller'
request = 'request'
- # GetDescriptor now static, still works as instance method for compatability
+ # GetDescriptor now static, still works as instance method for compatibility
self.assertEqual(unittest_pb2.TestService_Stub.GetDescriptor(),
stub.GetDescriptor())
diff --git a/python/google/protobuf/pyext/message.h b/python/google/protobuf/pyext/message.h
index 73e5a7d3..0fef92a0 100644
--- a/python/google/protobuf/pyext/message.h
+++ b/python/google/protobuf/pyext/message.h
@@ -142,7 +142,7 @@ PyObject* InternalGetSubMessage(
//
// Releases messages to the provided cmessage_list if it is not NULL rather
// than just removing them from the underlying proto. This cmessage_list must
-// have a CMessage for each underlying submessage. The CMessages refered to
+// have a CMessage for each underlying submessage. The CMessages referred to
// by slice will be removed from cmessage_list by this function.
//
// Corresponds to reflection api method RemoveLast.
diff --git a/python/google/protobuf/pyext/repeated_composite_container.h b/python/google/protobuf/pyext/repeated_composite_container.h
index a76a5d6a..0969af08 100644
--- a/python/google/protobuf/pyext/repeated_composite_container.h
+++ b/python/google/protobuf/pyext/repeated_composite_container.h
@@ -61,7 +61,7 @@ struct CMessage;
//
// When in the attached state all modifications to the container are
// done both on the 'message' and on the 'child_messages'
-// list. In this state all Messages refered to by the children in
+// list. In this state all Messages referred to by the children in
// 'child_messages' are owner by the 'owner'.
//
// When in the released state 'message', 'owner', 'parent', and
diff --git a/python/google/protobuf/pyext/scoped_pyobject_ptr.h b/python/google/protobuf/pyext/scoped_pyobject_ptr.h
index fefebb6a..18ddd5cd 100644
--- a/python/google/protobuf/pyext/scoped_pyobject_ptr.h
+++ b/python/google/protobuf/pyext/scoped_pyobject_ptr.h
@@ -40,7 +40,7 @@
namespace google {
class ScopedPyObjectPtr {
public:
- // Constructor. Defaults to intializing with NULL.
+ // Constructor. Defaults to initializing with NULL.
// There is no way to create an uninitialized ScopedPyObjectPtr.
explicit ScopedPyObjectPtr(PyObject* p = NULL) : ptr_(p) { }
diff --git a/python/mox.py b/python/mox.py
index ce80ba50..257468e5 100755
--- a/python/mox.py
+++ b/python/mox.py
@@ -31,7 +31,7 @@ If an unexpected method (or an expected method with unexpected
parameters) is called, then an exception will be raised.
Once you are done interacting with the mock, you need to verify that
-all the expected interactions occured. (Maybe your code exited
+all the expected interactions occurred. (Maybe your code exited
prematurely without calling some cleanup method!) The verify phase
ensures that every expected method was called; otherwise, an exception
will be raised.
diff --git a/src/google/protobuf/compiler/command_line_interface.h b/src/google/protobuf/compiler/command_line_interface.h
index 47f28919..74a0adb4 100644
--- a/src/google/protobuf/compiler/command_line_interface.h
+++ b/src/google/protobuf/compiler/command_line_interface.h
@@ -214,7 +214,7 @@ class LIBPROTOC_EXPORT CommandLineInterface {
// true if the next argument in the argv should be used as the value,
// false otherwise.
//
- // Exmaples:
+ // Examples:
// "-Isrc/protos" ->
// name = "-I", value = "src/protos"
// "--cpp_out=src/foo.pb2.cc" ->
diff --git a/src/google/protobuf/compiler/cpp/cpp_unittest.cc b/src/google/protobuf/compiler/cpp/cpp_unittest.cc
index c509a6a9..74a277e0 100644
--- a/src/google/protobuf/compiler/cpp/cpp_unittest.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_unittest.cc
@@ -1690,7 +1690,7 @@ TEST_F(OneofTest, SwapBothHasFields) {
EXPECT_EQ(message2.foo_string(), "FOO");
}
-TEST_F(OneofTest, CopyContructor) {
+TEST_F(OneofTest, CopyConstructor) {
unittest::TestOneof2 message1;
message1.set_foo_bytes("FOO");
diff --git a/src/google/protobuf/compiler/java/java_helpers.h b/src/google/protobuf/compiler/java/java_helpers.h
index 2707fa0a..d957fdc4 100644
--- a/src/google/protobuf/compiler/java/java_helpers.h
+++ b/src/google/protobuf/compiler/java/java_helpers.h
@@ -132,7 +132,7 @@ string FieldConstantName(const FieldDescriptor *field);
// Returns the type of the FieldDescriptor.
// This does nothing interesting for the open source release, but is used for
-// hacks that improve compatability with version 1 protocol buffers at Google.
+// hacks that improve compatibility with version 1 protocol buffers at Google.
FieldDescriptor::Type GetType(const FieldDescriptor* field);
enum JavaType {
diff --git a/src/google/protobuf/descriptor.cc b/src/google/protobuf/descriptor.cc
index ab8691fd..06184820 100644
--- a/src/google/protobuf/descriptor.cc
+++ b/src/google/protobuf/descriptor.cc
@@ -3600,7 +3600,7 @@ const FileDescriptor* DescriptorBuilder::BuildFile(
// Note: This only works if the input is canonical -- that is, it
// fully-qualifies all type names, has no UninterpretedOptions, etc.
// This is fine, because this idempotency "feature" really only exists to
- // accomodate one hack in the proto1->proto2 migration layer.
+ // accommodate one hack in the proto1->proto2 migration layer.
const FileDescriptor* existing_file = tables_->FindFile(filename_);
if (existing_file != NULL) {
// File already in pool. Compare the existing one to the input.
diff --git a/src/google/protobuf/descriptor.h b/src/google/protobuf/descriptor.h
index b7ea756c..0e9d88a8 100644
--- a/src/google/protobuf/descriptor.h
+++ b/src/google/protobuf/descriptor.h
@@ -1348,7 +1348,7 @@ class LIBPROTOBUF_EXPORT DescriptorPool {
};
// Reports an error in the FileDescriptorProto. Use this function if the
- // problem occured should interrupt building the FileDescriptorProto.
+ // problem occurred should interrupt building the FileDescriptorProto.
virtual void AddError(
const string& filename, // File name in which the error occurred.
const string& element_name, // Full name of the erroneous element.
@@ -1358,7 +1358,7 @@ class LIBPROTOBUF_EXPORT DescriptorPool {
) = 0;
// Reports a warning in the FileDescriptorProto. Use this function if the
- // problem occured should NOT interrupt building the FileDescriptorProto.
+ // problem occurred should NOT interrupt building the FileDescriptorProto.
virtual void AddWarning(
const string& /*filename*/, // File name in which the error occurred.
const string& /*element_name*/, // Full name of the erroneous element.
diff --git a/src/google/protobuf/io/tokenizer.h b/src/google/protobuf/io/tokenizer.h
index 8c6220a1..98576f56 100644
--- a/src/google/protobuf/io/tokenizer.h
+++ b/src/google/protobuf/io/tokenizer.h
@@ -350,7 +350,7 @@ class LIBPROTOBUF_EXPORT Tokenizer {
// -----------------------------------------------------------------
// These helper methods make the parsing code more readable. The
- // "character classes" refered to are defined at the top of the .cc file.
+ // "character classes" referred to are defined at the top of the .cc file.
// Basically it is a C++ class with one method:
// static bool InClass(char c);
// The method returns true if c is a member of this "class", like "Letter"
diff --git a/src/google/protobuf/stubs/common.h b/src/google/protobuf/stubs/common.h
index ca7be71f..55deb125 100644
--- a/src/google/protobuf/stubs/common.h
+++ b/src/google/protobuf/stubs/common.h
@@ -450,7 +450,7 @@ class scoped_ptr {
// The element type
typedef C element_type;
- // Constructor. Defaults to intializing with NULL.
+ // Constructor. Defaults to initializing with NULL.
// There is no way to create an uninitialized scoped_ptr.
// The input parameter must be allocated with new.
explicit scoped_ptr(C* p = NULL) : ptr_(p) { }
@@ -537,7 +537,7 @@ class scoped_array {
// The element type
typedef C element_type;
- // Constructor. Defaults to intializing with NULL.
+ // Constructor. Defaults to initializing with NULL.
// There is no way to create an uninitialized scoped_array.
// The input parameter must be allocated with new [].
explicit scoped_array(C* p = NULL) : array_(p) { }
diff --git a/src/google/protobuf/stubs/template_util.h b/src/google/protobuf/stubs/template_util.h
index 4f30ffa3..feef904b 100644
--- a/src/google/protobuf/stubs/template_util.h
+++ b/src/google/protobuf/stubs/template_util.h
@@ -37,7 +37,7 @@
// any changes here, make sure that you're not breaking any platforms.
//
//
-// The names choosen here reflect those used in tr1 and the boost::mpl
+// The names chosen here reflect those used in tr1 and the boost::mpl
// library, there are similar operations used in the Loki library as
// well. I prefer the boost names for 2 reasons:
// 1. I think that portions of the Boost libraries are more likely to
diff --git a/src/google/protobuf/text_format.cc b/src/google/protobuf/text_format.cc
index fd04bef1..8e867c09 100644
--- a/src/google/protobuf/text_format.cc
+++ b/src/google/protobuf/text_format.cc
@@ -320,16 +320,16 @@ class TextFormat::Parser::ParserImpl {
message);
}
- // Consumes the specified message with the given starting delimeter.
- // This method checks to see that the end delimeter at the conclusion of
- // the consumption matches the starting delimeter passed in here.
- bool ConsumeMessage(Message* message, const string delimeter) {
+ // Consumes the specified message with the given starting delimiter.
+ // This method checks to see that the end delimiter at the conclusion of
+ // the consumption matches the starting delimiter passed in here.
+ bool ConsumeMessage(Message* message, const string delimiter) {
while (!LookingAt(">") && !LookingAt("}")) {
DO(ConsumeField(message));
}
- // Confirm that we have a valid ending delimeter.
- DO(Consume(delimeter));
+ // Confirm that we have a valid ending delimiter.
+ DO(Consume(delimiter));
return true;
}
@@ -429,7 +429,7 @@ class TextFormat::Parser::ParserImpl {
// Try to guess the type of this field.
// If this field is not a message, there should be a ":" between the
// field name and the field value and also the field value should not
- // start with "{" or "<" which indicates the begining of a message body.
+ // start with "{" or "<" which indicates the beginning of a message body.
// If there is no ":" or there is a "{" or "<" after ":", this field has
// to be a message or the input is ill-formed.
if (TryConsume(":") && !LookingAt("{") && !LookingAt("<")) {
@@ -527,7 +527,7 @@ class TextFormat::Parser::ParserImpl {
// Try to guess the type of this field.
// If this field is not a message, there should be a ":" between the
// field name and the field value and also the field value should not
- // start with "{" or "<" which indicates the begining of a message body.
+ // start with "{" or "<" which indicates the beginning of a message body.
// If there is no ":" or there is a "{" or "<" after ":", this field has
// to be a message or the input is ill-formed.
if (TryConsume(":") && !LookingAt("{") && !LookingAt("<")) {
@@ -552,19 +552,19 @@ class TextFormat::Parser::ParserImpl {
parse_info_tree_ = CreateNested(parent, field);
}
- string delimeter;
+ string delimiter;
if (TryConsume("<")) {
- delimeter = ">";
+ delimiter = ">";
} else {
DO(Consume("{"));
- delimeter = "}";
+ delimiter = "}";
}
if (field->is_repeated()) {
- DO(ConsumeMessage(reflection->AddMessage(message, field), delimeter));
+ DO(ConsumeMessage(reflection->AddMessage(message, field), delimiter));
} else {
DO(ConsumeMessage(reflection->MutableMessage(message, field),
- delimeter));
+ delimiter));
}
// Reset the parse information tree.
@@ -572,20 +572,20 @@ class TextFormat::Parser::ParserImpl {
return true;
}
- // Skips the whole body of a message including the begining delimeter and
- // the ending delimeter.
+ // Skips the whole body of a message including the beginning delimiter and
+ // the ending delimiter.
bool SkipFieldMessage() {
- string delimeter;
+ string delimiter;
if (TryConsume("<")) {
- delimeter = ">";
+ delimiter = ">";
} else {
DO(Consume("{"));
- delimeter = "}";
+ delimiter = "}";
}
while (!LookingAt(">") && !LookingAt("}")) {
DO(SkipField());
}
- DO(Consume(delimeter));
+ DO(Consume(delimiter));
return true;
}
diff --git a/src/google/protobuf/text_format_unittest.cc b/src/google/protobuf/text_format_unittest.cc
index 55732688..477fdcbd 100644
--- a/src/google/protobuf/text_format_unittest.cc
+++ b/src/google/protobuf/text_format_unittest.cc
@@ -263,7 +263,7 @@ TEST_F(TextFormatTest, PrintUnknownFields) {
}
TEST_F(TextFormatTest, PrintUnknownFieldsHidden) {
- // Test printing of unknown fields in a message when supressed.
+ // Test printing of unknown fields in a message when suppressed.
unittest::OneString message;
message.set_data("data");
@@ -586,7 +586,7 @@ TEST_F(TextFormatTest, ParseConcatenatedString) {
// Compare.
EXPECT_EQ("foobar", proto_.optional_string());
- // Create a parse string with multiple parts on seperate lines.
+ // Create a parse string with multiple parts on separate lines.
parse_string = "optional_string: \"foo\"\n"
"\"bar\"\n";
@@ -1324,12 +1324,12 @@ TEST_F(TextFormatParserTest, InvalidFieldValues) {
"Expected \":\", found \"{\".", 1, 22);
}
-TEST_F(TextFormatParserTest, MessageDelimeters) {
- // Non-matching delimeters.
+TEST_F(TextFormatParserTest, MessageDelimiters) {
+ // Non-matching delimiters.
ExpectFailure("OptionalGroup <\n \n}\n", "Expected \">\", found \"}\".",
3, 1);
- // Invalid delimeters.
+ // Invalid delimiters.
ExpectFailure("OptionalGroup [\n \n]\n", "Expected \"{\", found \"[\".",
1, 15);
@@ -1340,7 +1340,7 @@ TEST_F(TextFormatParserTest, MessageDelimeters) {
}
TEST_F(TextFormatParserTest, UnknownExtension) {
- // Non-matching delimeters.
+ // Non-matching delimiters.
ExpectFailure("[blahblah]: 123",
"Extension \"blahblah\" is not defined or is not an "
"extension of \"protobuf_unittest.TestAllTypes\".",
diff --git a/src/google/protobuf/unittest_import.proto b/src/google/protobuf/unittest_import.proto
index c1289e38..4ae8e337 100644
--- a/src/google/protobuf/unittest_import.proto
+++ b/src/google/protobuf/unittest_import.proto
@@ -44,7 +44,7 @@ package protobuf_unittest_import;
option optimize_for = SPEED;
-// Excercise the java_package option.
+// Exercise the java_package option.
option java_package = "com.google.protobuf.test";
// Do not set a java_outer_classname here to verify that Proto2 works without