Skip to content

Commit fe6a9ba

Browse files
author
Larry McQueary
committed
Merge conflicts from jnats-0.4.1
2 parents a43f312 + 895d980 commit fe6a9ba

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
<groupId>io.nats</groupId>
1515
<artifactId>jnats</artifactId>
1616
<version>0.5.0-SNAPSHOT</version>
17-
1817
<name>jnats</name>
1918
<description>Java client library for NATS Messaging System</description>
2019
<url>https://github.com/nats-io/jnats</url>
@@ -349,7 +348,7 @@
349348
<profile>
350349
<id>ossrh</id>
351350
<properties>
352-
<gpg.executable>gpg</gpg.executable>
351+
<gpg.executable>gpg2</gpg.executable>
353352
<gpg.keyname>${env.GPG_KEYNAME}</gpg.keyname>
354353
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
355354
<gpg.defaultKeyring>false</gpg.defaultKeyring>

src/main/java/io/nats/client/ConnectionImpl.java

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import static io.nats.client.Constants.ERR_TIMEOUT;
2222
import static io.nats.client.Constants.TLS_SCHEME;
2323

24+
import io.nats.client.Constants.ConnState;
25+
2426
import org.slf4j.Logger;
2527
import org.slf4j.LoggerFactory;
2628

@@ -55,8 +57,6 @@
5557
import java.util.concurrent.locks.Lock;
5658
import java.util.concurrent.locks.ReentrantLock;
5759

58-
import io.nats.client.Constants.ConnState;
59-
6060
class ConnectionImpl implements Connection {
6161
final Logger logger = LoggerFactory.getLogger(ConnectionImpl.class);
6262

@@ -1994,16 +1994,10 @@ void _publish(byte[] subject, byte[] reply, byte[] data) throws IOException {
19941994
}
19951995
}
19961996

1997-
// int pubProtoLen;
19981997
// write our pubProtoBuf buffer to the buffered writer.
19991998
try {
2000-
// pubProtoLen = writePublishProto(pubProtoBuf, subject,
2001-
// reply, msgSize);
20021999
writePublishProto(pubProtoBuf, subject, reply, msgSize);
20032000
} catch (BufferOverflowException e) {
2004-
// logger.trace("Overflowed buffer, buffer={}, subject.length={}, reply.length={}",
2005-
// pubProtoBuf, subject.length, reply.length);
2006-
20072001
// We can get here if we have very large subjects.
20082002
// Expand with some room to spare.
20092003
int resizeAmount = Parser.MAX_CONTROL_LINE_SIZE + subject.length
@@ -2012,19 +2006,14 @@ void _publish(byte[] subject, byte[] reply, byte[] data) throws IOException {
20122006
buildPublishProtocolBuffer(resizeAmount);
20132007

20142008
writePublishProto(pubProtoBuf, subject, reply, msgSize);
2015-
2016-
// pubProtoLen = writePublishProto(pubProtoBuf, subject,
2017-
// reply, msgSize);
20182009
}
20192010

20202011
try {
20212012
bw.write(pubProtoBuf.array(), 0, pubProtoBuf.position());
20222013
pubProtoBuf.position(pubPrimBytesLen);
2023-
logger.trace("=> {}", new String(pubProtoBuf.array()).trim());
20242014

20252015
if (msgSize > 0) {
20262016
bw.write(data, 0, msgSize);
2027-
// logger.trace("=> {}", new String(data, 0, msgSize).trim() );
20282017
}
20292018

20302019
bw.write(crlfProtoBytes, 0, crlfProtoBytesLen);
@@ -2037,9 +2026,6 @@ void _publish(byte[] subject, byte[] reply, byte[] data) throws IOException {
20372026

20382027
stats.incrementOutMsgs();
20392028
stats.incrementOutBytes(msgSize);
2040-
2041-
// logger.trace("Successfully published to {}",
2042-
// subject);
20432029
} finally {
20442030
mu.unlock();
20452031
}

0 commit comments

Comments
 (0)