This is an automated email from the ASF dual-hosted git repository.
huxing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new 66afe96 Modified to lower camel case (#3003)
66afe96 is described below
commit 66afe965280373142e64fe969c434740a92a373e
Author: huazhongming <[email protected]>
AuthorDate: Wed Jan 16 10:05:52 2019 +0800
Modified to lower camel case (#3003)
---
.../apache/dubbo/common/compiler/support/ClassUtils.java | 8 ++++----
.../common/threadpool/support/AbortPolicyWithReport.java | 4 ++--
.../dubbo/qos/server/handler/HttpProcessHandler.java | 14 +++++++-------
.../org/apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java | 6 +++---
.../dubbo/rpc/protocol/dubbo/telnet/LogTelnetHandler.java | 8 ++++----
5 files changed, 20 insertions(+), 20 deletions(-)
diff --git
a/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/ClassUtils.java
b/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/ClassUtils.java
index 1c55208..133ece5 100644
---
a/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/ClassUtils.java
+++
b/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/ClassUtils.java
@@ -56,12 +56,12 @@ public class ClassUtils {
public static Class<?> forName(String[] packages, String className) {
try {
- return _forName(className);
+ return classForName(className);
} catch (ClassNotFoundException e) {
if (packages != null && packages.length > 0) {
for (String pkg : packages) {
try {
- return _forName(pkg + "." + className);
+ return classForName(pkg + "." + className);
} catch (ClassNotFoundException e2) {
}
}
@@ -72,13 +72,13 @@ public class ClassUtils {
public static Class<?> forName(String className) {
try {
- return _forName(className);
+ return classForName(className);
} catch (ClassNotFoundException e) {
throw new IllegalStateException(e.getMessage(), e);
}
}
- public static Class<?> _forName(String className) throws
ClassNotFoundException {
+ public static Class<?> classForName(String className) throws
ClassNotFoundException {
switch (className) {
case "boolean":
return boolean.class;
diff --git
a/dubbo-common/src/main/java/org/apache/dubbo/common/threadpool/support/AbortPolicyWithReport.java
b/dubbo-common/src/main/java/org/apache/dubbo/common/threadpool/support/AbortPolicyWithReport.java
index 7aef31c..0f4f72a 100644
---
a/dubbo-common/src/main/java/org/apache/dubbo/common/threadpool/support/AbortPolicyWithReport.java
+++
b/dubbo-common/src/main/java/org/apache/dubbo/common/threadpool/support/AbortPolicyWithReport.java
@@ -85,10 +85,10 @@ public class AbortPolicyWithReport extends
ThreadPoolExecutor.AbortPolicy {
SimpleDateFormat sdf;
- String OS = System.getProperty("os.name").toLowerCase();
+ String os = System.getProperty("os.name").toLowerCase();
// window system don't support ":" in file name
- if(OS.contains("win")){
+ if(os.contains("win")){
sdf = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss");
}else {
sdf = new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss");
diff --git
a/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/server/handler/HttpProcessHandler.java
b/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/server/handler/HttpProcessHandler.java
index 9a36c97..408e185 100644
---
a/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/server/handler/HttpProcessHandler.java
+++
b/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/server/handler/HttpProcessHandler.java
@@ -58,27 +58,27 @@ public class HttpProcessHandler extends
SimpleChannelInboundHandler<HttpRequest>
// return 404 when fail to construct command context
if (commandContext == null) {
log.warn("can not found commandContext url: " + msg.getUri());
- FullHttpResponse response = http_404();
+ FullHttpResponse response = http404();
ctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE);
} else {
commandContext.setRemote(ctx.channel());
try {
String result = commandExecutor.execute(commandContext);
- FullHttpResponse response = http_200(result);
+ FullHttpResponse response = http200(result);
ctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE);
} catch (NoSuchCommandException ex) {
log.error("can not find commandContext: " + commandContext,
ex);
- FullHttpResponse response = http_404();
+ FullHttpResponse response = http404();
ctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE);
} catch (Exception qosEx) {
log.error("execute commandContext: " + commandContext + " got
exception", qosEx);
- FullHttpResponse response = http_500(qosEx.getMessage());
+ FullHttpResponse response = http500(qosEx.getMessage());
ctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE);
}
}
}
- private static final FullHttpResponse http_200(String result) {
+ private static final FullHttpResponse http200(String result) {
FullHttpResponse response = new
DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK,
Unpooled.wrappedBuffer(result.getBytes()));
HttpHeaders httpHeaders = response.headers();
@@ -87,7 +87,7 @@ public class HttpProcessHandler extends
SimpleChannelInboundHandler<HttpRequest>
return response;
}
- private static final FullHttpResponse http_404() {
+ private static final FullHttpResponse http404() {
FullHttpResponse response = new
DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.NOT_FOUND);
HttpHeaders httpHeaders = response.headers();
httpHeaders.set(HttpHeaders.Names.CONTENT_TYPE, "text/plain");
@@ -95,7 +95,7 @@ public class HttpProcessHandler extends
SimpleChannelInboundHandler<HttpRequest>
return response;
}
- private static final FullHttpResponse http_500(String errorMessage) {
+ private static final FullHttpResponse http500(String errorMessage) {
FullHttpResponse response = new
DefaultFullHttpResponse(HttpVersion.HTTP_1_1,
HttpResponseStatus.INTERNAL_SERVER_ERROR
, Unpooled.wrappedBuffer(errorMessage.getBytes()));
HttpHeaders httpHeaders = response.headers();
diff --git
a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java
b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java
index d3ac220..7a0be74 100644
---
a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java
+++
b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java
@@ -364,17 +364,17 @@ public class DubboProtocol extends AbstractProtocol {
private ExchangeClient[] getClients(URL url) {
// whether to share connection
- boolean service_share_connect = false;
+ boolean serviceShareConnect = false;
int connections = url.getParameter(Constants.CONNECTIONS_KEY, 0);
// if not configured, connection is shared, otherwise, one connection
for one service
if (connections == 0) {
- service_share_connect = true;
+ serviceShareConnect = true;
connections = 1;
}
ExchangeClient[] clients = new ExchangeClient[connections];
for (int i = 0; i < clients.length; i++) {
- if (service_share_connect) {
+ if (serviceShareConnect) {
clients[i] = getSharedClient(url);
} else {
clients[i] = initClient(url);
diff --git
a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/telnet/LogTelnetHandler.java
b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/telnet/LogTelnetHandler.java
index ac23797..5ab3c27 100644
---
a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/telnet/LogTelnetHandler.java
+++
b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/telnet/LogTelnetHandler.java
@@ -52,7 +52,7 @@ public class LogTelnetHandler implements TelnetHandler {
if (!StringUtils.isInteger(str[0])) {
LoggerFactory.setLevel(Level.valueOf(message.toUpperCase()));
} else {
- int SHOW_LOG_LENGTH = Integer.parseInt(str[0]);
+ int showLogLength = Integer.parseInt(str[0]);
if (file != null && file.exists()) {
try {
@@ -60,12 +60,12 @@ public class LogTelnetHandler implements TelnetHandler {
FileChannel filechannel = fis.getChannel();
size = filechannel.size();
ByteBuffer bb;
- if (size <= SHOW_LOG_LENGTH) {
+ if (size <= showLogLength) {
bb = ByteBuffer.allocate((int) size);
filechannel.read(bb, 0);
} else {
- int pos = (int) (size - SHOW_LOG_LENGTH);
- bb = ByteBuffer.allocate(SHOW_LOG_LENGTH);
+ int pos = (int) (size - showLogLength);
+ bb = ByteBuffer.allocate(showLogLength);
filechannel.read(bb, pos);
}
bb.flip();