From 3f067a86ebea6e4919fb4cc67192b2b5f386fbdf Mon Sep 17 00:00:00 2001 From: Roger Meier Date: Fri, 4 Mar 2011 13:35:05 +0000 Subject: [PATCH] THRIFT-1084 Typo fixes Patch: Bruce Mitchener git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1077939 13f79535-47bb-0310-9956-ffa450edef68 --- NEWS | 4 ++-- README.SSL | 10 +++++----- doc/thrift.tex | 12 ++++++------ .../org/apache/thrift/protocol/TCompactProtocol.java | 6 +++--- .../org/apache/thrift/protocol/TProtocolUtil.java | 4 ++-- .../apache/thrift/protocol/TSimpleJSONProtocol.java | 2 +- .../org/apache/thrift/server/TNonblockingServer.java | 8 ++++---- .../org/apache/thrift/transport/TFileTransport.java | 4 ++-- .../apache/thrift/transport/TFramedTransport.java | 4 ++-- .../src/org/apache/thrift/transport/THttpClient.java | 2 +- .../org/apache/thrift/transport/TMemoryBuffer.java | 2 +- .../thrift/transport/TNonblockingServerSocket.java | 2 +- .../org/apache/thrift/transport/TSaslTransport.java | 4 ++-- .../org/apache/thrift/transport/TServerSocket.java | 2 +- .../src/org/apache/thrift/transport/TTransport.java | 2 +- .../apache/thrift/transport/TestTSaslTransports.java | 2 +- tutorial/java/src/JavaClient.java | 2 +- 17 files changed, 36 insertions(+), 36 deletions(-) diff --git a/NEWS b/NEWS index 2369f61d..d7d0c4cb 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,8 @@ Release Notes for Thrift 20080411 -.equals and .hashCode() for Java scturcts (developed by dreiss). +.equals and .hashCode() for Java structs (developed by dreiss). -Improvments to the C++ TSocketPool (developed by akhil). +Improvements to the C++ TSocketPool (developed by akhil). PHP (de)serialization extension (developed by dweatherford). diff --git a/README.SSL b/README.SSL index 33a4dfec..a928057d 100644 --- a/README.SSL +++ b/README.SSL @@ -31,12 +31,12 @@ Author: Ping Li factory->loadPrivateKey("my-private-key.pem"); // server: optionally setup access manager // shared_ptr accessManager(new MyAccessManager); - // factory->access(acessManager); + // factory->access(accessManager); ... } // client code sample - shared_ptr factory = getSSLScoketFactory(); + shared_ptr factory = getSSLSocketFactory(); shared_ptr socket = factory.createSocket(host, port); shared_ptr transport(new TBufferedTransport(socket)); ... @@ -57,7 +57,7 @@ Author: Ping Li After SSL handshake completes, additional checks are conducted. Application is given the chance to decide whether or not to continue the conversation - with the remote. Application is inqueried through the above three "verify" + with the remote. Application is queried through the above three "verify" method. They are called at different points of the verification process. Decisions can be one of ALLOW, DENY, and SKIP. ALLOW and DENY means the @@ -74,7 +74,7 @@ Author: Ping Li field is extracted, (c) is called. The "host" in (b) is the value from TSocket::getHost() if this is a client - side socket, or TScoket::getPeerHost() if this is a server side socket. The + side socket, or TSocket::getPeerHost() if this is a server side socket. The reason is client side socket initiates the connection. TSocket::getHost() is the remote host name. On server side, the remote host name is unknown unless it's retrieved through TSocket::getPeerHost(). Either way, "host" @@ -132,4 +132,4 @@ Author: Ping Li OpenSSL's RAND_poll() when OpenSSL library is first initialized. The PRNG seed is key to the application security. This method should be - overriden if it's not strong enough for you. + overridden if it's not strong enough for you. diff --git a/doc/thrift.tex b/doc/thrift.tex index d20b7377..a706fcbb 100644 --- a/doc/thrift.tex +++ b/doc/thrift.tex @@ -151,7 +151,7 @@ how to safely transport the objects across languages. The type system rests upon a few base types. In considering which types to support, we aimed for clarity and simplicity over abundance, focusing -on the key types available in all programming languages, ommitting any +on the key types available in all programming languages, omitting any niche types available only in specific languages. The base types supported by Thrift are: @@ -299,8 +299,8 @@ socket, a segment of shared memory, or a file on the local disk. The Thrift transport interface supports the following methods: \begin{itemize} -\item \texttt{open} Opens the tranpsort -\item \texttt{close} Closes the tranport +\item \texttt{open} Opens the transport +\item \texttt{close} Closes the transport \item \texttt{isOpen} Indicates whether the transport is open \item \texttt{read} Reads from the transport \item \texttt{write} Writes to the transport @@ -345,7 +345,7 @@ post-processing or for reproduction and/or simulation of past events. \subsubsection{Utilities} The Transport interface is designed to support easy extension using common -OOP techniques, such as composition. Some simple utilites include the +OOP techniques, such as composition. Some simple utilities include the \texttt{TBufferedTransport}, which buffers the writes and reads on an underlying transport, the \texttt{TFramedTransport}, which transmits data with frame size headers for chunking optimization or nonblocking operation, and the @@ -873,7 +873,7 @@ possible that our thread create call, \texttt{ThreadFactory::newThread()} could return to the caller well before that time. To ensure that the returned \texttt{Thread} object is not prematurely cleaned up if the caller gives up its reference prior to the -\texttt{ThreadMain} call, the \texttt{Thread} object makes a weak referenence to +\texttt{ThreadMain} call, the \texttt{Thread} object makes a weak reference to itself in its \texttt{start} method. With the weak reference in hand the \texttt{ThreadMain} function can attempt to get @@ -1023,7 +1023,7 @@ described: XML parsing overhead. \item \textit{CORBA.} Relatively comprehensive, debatably overdesigned and heavyweight. Comparably cumbersome software installation. -\item \textit{COM.} Embraced mainly in Windows client softare. Not an entirely +\item \textit{COM.} Embraced mainly in Windows client software. Not an entirely open solution. \item \textit{Pillar.} Lightweight and high-performance, but missing versioning and abstraction. diff --git a/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java b/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java index 4c2cfc0f..0fc3d3bc 100755 --- a/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java +++ b/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java @@ -291,7 +291,7 @@ public final class TCompactProtocol extends TProtocol { } /** - * Write a string to the wire with a varint size preceeding. + * Write a string to the wire with a varint size preceding. */ public void writeString(String str) throws TException { try { @@ -415,7 +415,7 @@ public final class TCompactProtocol extends TProtocol { } /** - * Writes a byte without any possiblity of all that field header nonsense. + * Writes a byte without any possibility of all that field header nonsense. * Used internally by other writing methods that know they need to write a byte. */ private byte[] byteDirectBuffer = new byte[1]; @@ -425,7 +425,7 @@ public final class TCompactProtocol extends TProtocol { } /** - * Writes a byte without any possiblity of all that field header nonsense. + * Writes a byte without any possibility of all that field header nonsense. */ private void writeByteDirect(int n) throws TException { writeByteDirect((byte)n); diff --git a/lib/java/src/org/apache/thrift/protocol/TProtocolUtil.java b/lib/java/src/org/apache/thrift/protocol/TProtocolUtil.java index d957dec2..752520a1 100644 --- a/lib/java/src/org/apache/thrift/protocol/TProtocolUtil.java +++ b/lib/java/src/org/apache/thrift/protocol/TProtocolUtil.java @@ -53,7 +53,7 @@ public class TProtocolUtil { * Skips over the next data element from the provided input TProtocol object. * * @param prot the protocol object to read from - * @param type the next value will be intepreted as this TType value. + * @param type the next value will be interpreted as this TType value. */ public static void skip(TProtocol prot, byte type) throws TException { @@ -64,7 +64,7 @@ public class TProtocolUtil { * Skips over the next data element from the provided input TProtocol object. * * @param prot the protocol object to read from - * @param type the next value will be intepreted as this TType value. + * @param type the next value will be interpreted as this TType value. * @param maxDepth this function will only skip complex objects to this * recursive depth, to prevent Java stack overflow. */ diff --git a/lib/java/src/org/apache/thrift/protocol/TSimpleJSONProtocol.java b/lib/java/src/org/apache/thrift/protocol/TSimpleJSONProtocol.java index 83a25329..33cad24d 100644 --- a/lib/java/src/org/apache/thrift/protocol/TSimpleJSONProtocol.java +++ b/lib/java/src/org/apache/thrift/protocol/TSimpleJSONProtocol.java @@ -264,7 +264,7 @@ public class TSimpleJSONProtocol extends TProtocol { escape.append('t'); break; default: - // Control characeters! According to JSON RFC u0020 (space) + // Control characters! According to JSON RFC u0020 (space) if (c < ' ') { String hex = Integer.toHexString(c); escape.append('\\'); diff --git a/lib/java/src/org/apache/thrift/server/TNonblockingServer.java b/lib/java/src/org/apache/thrift/server/TNonblockingServer.java index 3587bf7d..39177a3f 100644 --- a/lib/java/src/org/apache/thrift/server/TNonblockingServer.java +++ b/lib/java/src/org/apache/thrift/server/TNonblockingServer.java @@ -136,7 +136,7 @@ public class TNonblockingServer extends TServer { } /** - * Stop listening for conections. + * Stop listening for connections. */ protected void stopListening() { serverTransport_.close(); @@ -273,7 +273,7 @@ public class TNonblockingServer extends TServer { * Select and process IO events appropriately: * If there are connections to be accepted, accept them. * If there are existing connections with data waiting to be read, read it, - * bufferring until a whole frame has been read. + * buffering until a whole frame has been read. * If there are any pending responses, buffer them until their target client * is available, and then send the data. */ @@ -397,7 +397,7 @@ public class TNonblockingServer extends TServer { * Class that implements a sort of state machine around the interaction with * a client and an invoker. It manages reading the frame size and frame data, * getting it handed off as wrapped transports, and then the writing of - * reponse data back to the client. In the process it manages flipping the + * response data back to the client. In the process it manages flipping the * read and write bits on the selection key for its client. */ protected class FrameBuffer { @@ -483,7 +483,7 @@ public class TNonblockingServer extends TServer { return true; } - // incremement the amount of memory allocated to read buffers + // increment the amount of memory allocated to read buffers readBufferBytesAllocated += frameSize; // reallocate the readbuffer as a frame-sized buffer diff --git a/lib/java/src/org/apache/thrift/transport/TFileTransport.java b/lib/java/src/org/apache/thrift/transport/TFileTransport.java index 630fb99b..24a884fa 100644 --- a/lib/java/src/org/apache/thrift/transport/TFileTransport.java +++ b/lib/java/src/org/apache/thrift/transport/TFileTransport.java @@ -451,7 +451,7 @@ public class TFileTransport extends TTransport { /** - * Reads up to len bytes into buffer buf, starting att offset off. + * Reads up to len bytes into buffer buf, starting at offset off. * * @param buf Array to read into * @param off Index to start reading at @@ -515,7 +515,7 @@ public class TFileTransport extends TTransport { chunk += numChunks; } - // too large a value for reverse seek, just seek to beginnin + // too large a value for reverse seek, just seek to beginning if (chunk < 0) { chunk = 0; } diff --git a/lib/java/src/org/apache/thrift/transport/TFramedTransport.java b/lib/java/src/org/apache/thrift/transport/TFramedTransport.java index 32483ee1..eb5b0c2e 100644 --- a/lib/java/src/org/apache/thrift/transport/TFramedTransport.java +++ b/lib/java/src/org/apache/thrift/transport/TFramedTransport.java @@ -23,7 +23,7 @@ import org.apache.thrift.TByteArrayOutputStream; /** * TFramedTransport is a buffered TTransport that ensures a fully read message - * every time by preceeding messages with a 4-byte frame size. + * every time by preceding messages with a 4-byte frame size. */ public class TFramedTransport extends TTransport { @@ -65,7 +65,7 @@ public class TFramedTransport extends TTransport { } /** - * Constructor wraps around another tranpsort + * Constructor wraps around another transport */ public TFramedTransport(TTransport transport, int maxLength) { transport_ = transport; diff --git a/lib/java/src/org/apache/thrift/transport/THttpClient.java b/lib/java/src/org/apache/thrift/transport/THttpClient.java index 0d39ff04..550d76d1 100644 --- a/lib/java/src/org/apache/thrift/transport/THttpClient.java +++ b/lib/java/src/org/apache/thrift/transport/THttpClient.java @@ -240,7 +240,7 @@ public class THttpClient extends TTransport { // Read the responses into a byte array so we can release the connection // early. This implies that the whole content will have to be read in - // memory, and that momentarly we might use up twice the memory (while the + // memory, and that momentarily we might use up twice the memory (while the // thrift struct is being read up the chain). // Proceeding differently might lead to exhaustion of connections and thus // to app failure. diff --git a/lib/java/src/org/apache/thrift/transport/TMemoryBuffer.java b/lib/java/src/org/apache/thrift/transport/TMemoryBuffer.java index 9b906db3..53354afa 100644 --- a/lib/java/src/org/apache/thrift/transport/TMemoryBuffer.java +++ b/lib/java/src/org/apache/thrift/transport/TMemoryBuffer.java @@ -28,7 +28,7 @@ import java.io.UnsupportedEncodingException; public class TMemoryBuffer extends TTransport { /** * Create a TMemoryBuffer with an initial buffer size of size. The - * internal buffer will grow as necessary to accomodate the size of the data + * internal buffer will grow as necessary to accommodate the size of the data * being written to it. */ public TMemoryBuffer(int size) { diff --git a/lib/java/src/org/apache/thrift/transport/TNonblockingServerSocket.java b/lib/java/src/org/apache/thrift/transport/TNonblockingServerSocket.java index 3e8b3520..25b487e6 100644 --- a/lib/java/src/org/apache/thrift/transport/TNonblockingServerSocket.java +++ b/lib/java/src/org/apache/thrift/transport/TNonblockingServerSocket.java @@ -45,7 +45,7 @@ public class TNonblockingServerSocket extends TNonblockingServerTransport { private ServerSocketChannel serverSocketChannel = null; /** - * Underlying serversocket object + * Underlying ServerSocket object */ private ServerSocket serverSocket_ = null; diff --git a/lib/java/src/org/apache/thrift/transport/TSaslTransport.java b/lib/java/src/org/apache/thrift/transport/TSaslTransport.java index 515b09b8..0c648506 100644 --- a/lib/java/src/org/apache/thrift/transport/TSaslTransport.java +++ b/lib/java/src/org/apache/thrift/transport/TSaslTransport.java @@ -200,7 +200,7 @@ abstract class TSaslTransport extends TTransport { } /** - * Send a Thrift SASL message with the given status (usaully BAD or ERROR) and + * Send a Thrift SASL message with the given status (usually BAD or ERROR) and * string message, and then throw a TTransportException with the given * message. * @@ -235,7 +235,7 @@ abstract class TSaslTransport extends TTransport { /** * Opens the underlying transport if it's not already open and then performs - * SASL negotiation. If a QOP is negoiated during this SASL handshake, it used + * SASL negotiation. If a QOP is negotiated during this SASL handshake, it used * for all communication on this transport after this call is complete. */ @Override diff --git a/lib/java/src/org/apache/thrift/transport/TServerSocket.java b/lib/java/src/org/apache/thrift/transport/TServerSocket.java index 9dad36d1..147074a4 100644 --- a/lib/java/src/org/apache/thrift/transport/TServerSocket.java +++ b/lib/java/src/org/apache/thrift/transport/TServerSocket.java @@ -37,7 +37,7 @@ public class TServerSocket extends TServerTransport { private static final Logger LOGGER = LoggerFactory.getLogger(TServerSocket.class.getName()); /** - * Underlying serversocket object + * Underlying ServerSocket object */ private ServerSocket serverSocket_ = null; diff --git a/lib/java/src/org/apache/thrift/transport/TTransport.java b/lib/java/src/org/apache/thrift/transport/TTransport.java index c4086ba2..c9f3e93f 100644 --- a/lib/java/src/org/apache/thrift/transport/TTransport.java +++ b/lib/java/src/org/apache/thrift/transport/TTransport.java @@ -56,7 +56,7 @@ public abstract class TTransport { public abstract void close(); /** - * Reads up to len bytes into buffer buf, starting att offset off. + * Reads up to len bytes into buffer buf, starting at offset off. * * @param buf Array to read into * @param off Index to start reading at diff --git a/lib/java/test/org/apache/thrift/transport/TestTSaslTransports.java b/lib/java/test/org/apache/thrift/transport/TestTSaslTransports.java index dfd087f0..e12d6fe2 100644 --- a/lib/java/test/org/apache/thrift/transport/TestTSaslTransports.java +++ b/lib/java/test/org/apache/thrift/transport/TestTSaslTransports.java @@ -313,7 +313,7 @@ public class TestTSaslTransports extends TestCase { /** * Implementation of SASL ANONYMOUS, used for testing client-side - * intial responses. + * initial responses. */ private static class AnonymousClient implements SaslClient { private final String username; diff --git a/tutorial/java/src/JavaClient.java b/tutorial/java/src/JavaClient.java index ad4730a1..2e35d412 100644 --- a/tutorial/java/src/JavaClient.java +++ b/tutorial/java/src/JavaClient.java @@ -45,7 +45,7 @@ public class JavaClient { } else { /* - * Similar to the server, you can use the parametrs to setup client parameters or + * Similar to the server, you can use the parameters to setup client parameters or * use the default settings. On the client side, you will need a TrustStore which * contains the trusted certificate along with the public key. * For this example it's a self-signed cert. -- 2.17.1