Skip to content

Commit

Permalink
Fix spelling in strings and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ottok committed Jul 3, 2016
1 parent cae3b0c commit 3808d09
Show file tree
Hide file tree
Showing 39 changed files with 67 additions and 67 deletions.
4 changes: 2 additions & 2 deletions cmake/examples.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ mark_as_advanced(protobuf_BUILD_EXAMPLES_MULTITEST)
if(protobuf_BUILD_EXAMPLES_MULTITEST)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

#Build using the legacy compatiblity module.
#Build using the legacy compatibility module.
add_examples_build(examples-legacy
"-Dprotobuf_DIR:PATH=${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_CMAKEDIR}"
"-Dprotobuf_MODULE_COMPATIBLE:BOOL=TRUE"
Expand All @@ -49,7 +49,7 @@ if(protobuf_BUILD_EXAMPLES_MULTITEST)
"-Dprotobuf_DIR:PATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_CMAKEDIR}"
)

#Build using the installed library in legacy compatiblity mode.
#Build using the installed library in legacy compatibility mode.
add_examples_build(examples-installed-legacy
"-Dprotobuf_DIR:PATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_CMAKEDIR}"
"-Dprotobuf_MODULE_COMPATIBLE:BOOL=TRUE"
Expand Down
4 changes: 2 additions & 2 deletions conformance/ConformanceJavaLite.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private Conformance.ConformanceResponse doTest(Conformance.ConformanceRequest re
}
case JSON_PAYLOAD: {
return Conformance.ConformanceResponse.newBuilder().setSkipped(
"Lite runtime does not suport Json Formant.").build();
"Lite runtime does not support JSON format.").build();
}
case PAYLOAD_NOT_SET: {
throw new RuntimeException("Request didn't have payload.");
Expand All @@ -78,7 +78,7 @@ private Conformance.ConformanceResponse doTest(Conformance.ConformanceRequest re

case JSON:
return Conformance.ConformanceResponse.newBuilder().setSkipped(
"Lite runtime does not suport Json Formant.").build();
"Lite runtime does not support JSON format.").build();

default: {
throw new RuntimeException("Unexpected request output.");
Expand Down
4 changes: 2 additions & 2 deletions java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Compatibility Notice

* Protobuf minor version releases are backwards-compatible. If your code
can build/run against the old version, it's expected to build/run against
the new version as well. Both binary compatibility and source compatbility
the new version as well. Both binary compatibility and source compatibility
are guaranteed for minor version releases if the user follows the guideline
described in this section.

Expand All @@ -98,7 +98,7 @@ Compatibility Notice

* APIs marked with the @ExperimentalApi annotation are subject to change. They
can be modified in any way, or even removed, at any time. Don't use them if
compatiblity is needed. If your code is a library itself (i.e. it is used on
compatibility is needed. If your code is a library itself (i.e. it is used on
the CLASSPATH of users outside your own control), you should not use
experimental APIs, unless you repackage them (e.g. using ProGuard).

Expand Down
4 changes: 2 additions & 2 deletions java/compatibility_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ previously released versions.

## Directory Layout

For each released protobuf version we are testing compatiblity with, there
For each released protobuf version we are testing compatibility with, there
is a sub-directory with the following layout (take v2.5.0 as an example):

* v2.5.0
Expand Down Expand Up @@ -47,4 +47,4 @@ For each version, the test script will test:
* only upgrading more_protos to the new version

and see whether everything builds/runs fine. Both source compatibility and
binary compatiblity will be tested.
binary compatibility will be tested.
8 changes: 4 additions & 4 deletions java/compatibility_tests/v2.5.0/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ TEST_VERSION=`grep "^ <version>.*</version>" pom.xml | sed "s| <version>\(.*\)

# The old version of protobuf that we are testing compatibility against. This
# is usually the same as TEST_VERSION (i.e., we use the tests extracted from
# that version to test compatibilty of the newest runtime against it), but it
# that version to test compatibility of the newest runtime against it), but it
# is also possible to use this same test set to test the compatibiilty of the
# latest version against other versions.
case "$1" in
Expand Down Expand Up @@ -40,7 +40,7 @@ esac
# Extract the latest protobuf version number.
VERSION_NUMBER=`grep "^ <version>.*</version>" ../../pom.xml | sed "s| <version>\(.*\)</version>|\1|"`

echo "Running compatibilty tests between $VERSION_NUMBER and $OLD_VERSION"
echo "Running compatibility tests between $VERSION_NUMBER and $OLD_VERSION"

# Check protoc
[ -f ../../../src/protoc ] || {
Expand All @@ -55,7 +55,7 @@ echo "Running compatibilty tests between $VERSION_NUMBER and $OLD_VERSION"
popd
}

# Download old version source for the compatiblity test
# Download old version source for the compatibility test
[ -d protobuf ] || {
git clone https://github.com/google/protobuf.git
cd protobuf
Expand Down Expand Up @@ -92,7 +92,7 @@ mvn clean test \
# jar against the new runtime directly without recompile.

# Collect all test dependencies in a single jar file (except for protobuf) to
# make it easier to run binary compatibilty test (where we will need to run
# make it easier to run binary compatibility test (where we will need to run
# the jar files directly).
cd deps
mvn assembly:single
Expand Down
12 changes: 6 additions & 6 deletions java/core/src/main/java/com/google/protobuf/AbstractMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ public String toString() {
* override this method.
*/
void markClean() {
throw new IllegalStateException("Should be overriden by subclasses.");
throw new IllegalStateException("Should be overridden by subclasses.");
}

/**
Expand All @@ -510,7 +510,7 @@ void markClean() {
* override this method.
*/
void dispose() {
throw new IllegalStateException("Should be overriden by subclasses.");
throw new IllegalStateException("Should be overridden by subclasses.");
}

// ===============================================================
Expand Down Expand Up @@ -605,7 +605,7 @@ public boolean mergeDelimitedFrom(
}

/**
* @deprecated from v3.0.0-beta-3+, for compatiblity with v2.5.0 and v2.6.1
* @deprecated from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1
* generated code.
*/
@Deprecated
Expand All @@ -614,7 +614,7 @@ protected static int hashLong(long n) {
}
//
/**
* @deprecated from v3.0.0-beta-3+, for compatiblity with v2.5.0 and v2.6.1
* @deprecated from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1
* generated code.
*/
@Deprecated
Expand All @@ -623,7 +623,7 @@ protected static int hashBoolean(boolean b) {
}
//
/**
* @deprecated from v3.0.0-beta-3+, for compatiblity with v2.5.0 and v2.6.1
* @deprecated from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1
* generated code.
*/
@Deprecated
Expand All @@ -632,7 +632,7 @@ protected static int hashEnum(EnumLite e) {
}
//
/**
* @deprecated from v3.0.0-beta-3+, for compatiblity with v2.5.0 and v2.6.1
* @deprecated from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1
* generated code.
*/
@Deprecated
Expand Down
28 changes: 14 additions & 14 deletions java/core/src/main/java/com/google/protobuf/ByteString.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,25 @@ public abstract class ByteString implements Iterable<Byte>, Serializable {
* Empty {@code ByteString}.
*/
public static final ByteString EMPTY = new LiteralByteString(Internal.EMPTY_BYTE_ARRAY);
/**

/**
* An interface to efficiently copy {@code byte[]}.
*
* <p>One of the noticable costs of copying a byte[] into a new array using
* {@code System.arraycopy} is nullification of a new buffer before the copy. It has been shown
*
* <p>One of the noticeable costs of copying a byte[] into a new array using
* {@code System.arraycopy} is nullification of a new buffer before the copy. It has been shown
* the Hotspot VM is capable to intrisicfy {@code Arrays.copyOfRange} operation to avoid this
* expensive nullification and provide substantial performance gain. Unfortunately this does not
* hold on Android runtimes and could make the copy slightly slower due to additional code in
* the {@code Arrays.copyOfRange}. Thus we provide two different implementation for array copier
* for Hotspot and Android runtimes.
* for Hotspot and Android runtimes.
*/
private interface ByteArrayCopier {
/**
* Copies the specified range of the specified array into a new array
*/
byte[] copyFrom(byte[] bytes, int offset, int size);
}

/** Implementation of {@code ByteArrayCopier} which uses {@link System#arraycopy}. */
private static final class SystemByteArrayCopier implements ByteArrayCopier {
@Override
Expand All @@ -115,15 +115,15 @@ public byte[] copyFrom(byte[] bytes, int offset, int size) {
return copy;
}
}

/** Implementation of {@code ByteArrayCopier} which uses {@link Arrays#copyOfRange}. */
private static final class ArraysByteArrayCopier implements ByteArrayCopier {
@Override
public byte[] copyFrom(byte[] bytes, int offset, int size) {
return Arrays.copyOfRange(bytes, offset, offset + size);
}
}

private static final ByteArrayCopier byteArrayCopier;
static {
boolean isAndroid = true;
Expand All @@ -132,7 +132,7 @@ public byte[] copyFrom(byte[] bytes, int offset, int size) {
} catch (ClassNotFoundException e) {
isAndroid = false;
}

byteArrayCopier = isAndroid ? new SystemByteArrayCopier() : new ArraysByteArrayCopier();
}

Expand Down Expand Up @@ -309,7 +309,7 @@ public static ByteString copyFrom(byte[] bytes, int offset, int size) {
public static ByteString copyFrom(byte[] bytes) {
return copyFrom(bytes, 0, bytes.length);
}

/**
* Wraps the given bytes into a {@code ByteString}. Intended for internal only
* usage to force a classload of ByteString before LiteralByteString.
Expand Down Expand Up @@ -402,7 +402,7 @@ public static ByteString copyFromUtf8(String text) {
* immutable tree of byte arrays ("chunks") of the stream data. The
* first chunk is small, with subsequent chunks each being double
* the size, up to 8K.
*
*
* <p>Each byte read from the input stream will be copied twice to ensure
* that the resulting ByteString is truly immutable.
*
Expand Down Expand Up @@ -1226,7 +1226,7 @@ public final String toString() {
return String.format("<ByteString@%s size=%d>",
Integer.toHexString(System.identityHashCode(this)), size());
}

/**
* This class implements a {@link com.google.protobuf.ByteString} backed by a
* single array of bytes, contiguous in memory. It supports substring by
Expand Down Expand Up @@ -1450,7 +1450,7 @@ protected int getOffsetIntoBytes() {
return 0;
}
}

/**
* This class is used to represent the substring of a {@link ByteString} over a
* single byte array. In terms of the public API of {@link ByteString}, you end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void testEquals() throws Exception {
// correctly when linked only against the lite library.

// We do however do some basic testing to make sure that equals is actually
// overriden to test for value equality rather than simple object equality.
// overridden to test for value equality rather than simple object equality.

// Check that two identical objs are equal.
Foo foo1a = Foo.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ private static void print(String identifier, Object object,
} catch (NoSuchMethodException e) {
continue;
}
// If hazzer does't exist or returns false, no need to continue
// If hazzer doesn't exist or returns false, no need to continue
if (!(Boolean) hazzer.invoke(object)) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion php/ext/google/protobuf/upb.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
** store pointers or integers of at least 32 bits (upb isn't really useful on
** systems where sizeof(void*) < 4).
**
** The table must be homogenous (all values of the same type). In debug
** The table must be homogeneous (all values of the same type). In debug
** mode, we check this on insert and lookup.
*/

Expand Down
6 changes: 3 additions & 3 deletions python/google/protobuf/descriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def CopyToProto(self, proto):
Args:
proto: An empty descriptor_pb2.DescriptorProto.
"""
# This function is overriden to give a better doc comment.
# This function is overridden to give a better doc comment.
super(Descriptor, self).CopyToProto(proto)


Expand Down Expand Up @@ -626,7 +626,7 @@ def CopyToProto(self, proto):
Args:
proto: An empty descriptor_pb2.EnumDescriptorProto.
"""
# This function is overriden to give a better doc comment.
# This function is overridden to give a better doc comment.
super(EnumDescriptor, self).CopyToProto(proto)


Expand Down Expand Up @@ -747,7 +747,7 @@ def CopyToProto(self, proto):
Args:
proto: An empty descriptor_pb2.ServiceDescriptorProto.
"""
# This function is overriden to give a better doc comment.
# This function is overridden to give a better doc comment.
super(ServiceDescriptor, self).CopyToProto(proto)


Expand Down
2 changes: 1 addition & 1 deletion python/google/protobuf/internal/_parameterized.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ class TestGeneratorMetaclass(type):
iterable conforms to the test pattern, the injected methods will be picked
up as tests by the unittest framework.
In general, it is supposed to be used in conjuction with the
In general, it is supposed to be used in conjunction with the
Parameters decorator.
"""

Expand Down
2 changes: 1 addition & 1 deletion ruby/ext/google/protobuf_c/upb.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
** store pointers or integers of at least 32 bits (upb isn't really useful on
** systems where sizeof(void*) < 4).
**
** The table must be homogenous (all values of the same type). In debug
** The table must be homogeneous (all values of the same type). In debug
** mode, we check this on insert and lookup.
*/

Expand Down
2 changes: 1 addition & 1 deletion ruby/lib/google/protobuf/repeated_field.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def each(*args, &block)
external_enumerator.each_with_index do |val, i|
result = yield(val)
results << result
#nil means no change occured from yield; usually occurs when #to_a is called
#nil means no change occurred from yield; usually occurs when #to_a is called
if result
repeated_field[i] = result if result != val
end
Expand Down
2 changes: 1 addition & 1 deletion src/google/protobuf/compiler/command_line_interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ CommandLineInterface::MemoryOutputStream::~MemoryOutputStream() {
} else {
// This was an OpenForInsert().

// If the data doens't end with a clean line break, add one.
// If the data doesn't end with a clean line break, add one.
if (!data_.empty() && data_[data_.size() - 1] != '\n') {
data_.push_back('\n');
}
Expand Down
2 changes: 1 addition & 1 deletion src/google/protobuf/compiler/cpp/cpp_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class MessageGenerator {

// Header stuff.

// Return names for foward declarations of this class and all its nested
// Return names for forward declarations of this class and all its nested
// types. A given key in {class,enum}_names will map from a class name to the
// descriptor that was responsible for its inclusion in the map. This can be
// used to associate the descriptor with the code generated for it.
Expand Down
2 changes: 1 addition & 1 deletion src/google/protobuf/compiler/java/java_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ inline bool HasGenericServices(const FileDescriptor *file, bool enforce_lite) {
}

inline bool IsLazy(const FieldDescriptor* descriptor, bool enforce_lite) {
// Currently, the proto-lite version suports lazy field.
// Currently, the proto-lite version supports lazy field.
// TODO(niwasaki): Support lazy fields also for other proto runtimes.
if (HasDescriptorMethods(descriptor->file(), enforce_lite)) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/google/protobuf/compiler/java/java_string_field.cc
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ GenerateInterfaceMembers(io::Printer* printer) const {
// NOTE: the same method in the implementation class actually returns
// com.google.protobuf.ProtocolStringList (a subclass of List). It's
// changed between protobuf 2.5.0 release and protobuf 2.6.1 release.
// To retain binary compatibilty with both 2.5.0 and 2.6.1 generated
// To retain binary compatibility with both 2.5.0 and 2.6.1 generated
// code, we make this interface method return List so both methods
// with different return types exist in the compiled byte code.
"$deprecation$java.util.List<java.lang.String>\n"
Expand Down
2 changes: 1 addition & 1 deletion src/google/protobuf/compiler/js/js_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ string StripProto(const string& filename) {
return StripSuffixString(filename, suffix);
}

// Given a filename like foo/bar/baz.proto, returns the correspoding JavaScript
// Given a filename like foo/bar/baz.proto, returns the corresponding JavaScript
// file foo/bar/baz.js.
string GetJSFilename(const string& filename) {
return StripProto(filename) + "_pb.js";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ int FieldGenerator::ExtraRuntimeHasBitsNeeded(void) const {
void FieldGenerator::SetExtraRuntimeHasBitsBase(int index_base) {
// NOTE: src/google/protobuf/compiler/plugin.cc makes use of cerr for some
// error cases, so it seems to be ok to use as a back door for errors.
cerr << "Error: should have overriden SetExtraRuntimeHasBitsBase()." << endl;
cerr << "Error: should have overridden SetExtraRuntimeHasBitsBase()." << endl;
cerr.flush();
abort();
}
Expand Down
2 changes: 1 addition & 1 deletion src/google/protobuf/compiler/parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class LIBPROTOBUF_EXPORT Parser {
// it. Returns true if no errors occurred, false otherwise.
bool Parse(io::Tokenizer* input, FileDescriptorProto* file);

// Optional fetaures:
// Optional features:

// DEPRECATED: New code should use the SourceCodeInfo embedded in the
// FileDescriptorProto.
Expand Down
Loading

0 comments on commit 3808d09

Please sign in to comment.