Skip to content

Commit

Permalink
Merge pull request #2964 from alibaba/develop
Browse files Browse the repository at this point in the history
update version to 1.3.0
  • Loading branch information
yanlinly authored Jun 5, 2020
2 parents 0ddbe7d + 8423e33 commit c648249
Show file tree
Hide file tree
Showing 277 changed files with 7,607 additions and 3,922 deletions.
7 changes: 2 additions & 5 deletions address/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
<parent>
<artifactId>nacos-all</artifactId>
<groupId>com.alibaba.nacos</groupId>
<version>1.3.0-BETA</version>
<version>1.3.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>nacos-address</artifactId>
<packaging>jar</packaging>

<name>nacos-address ${project.version}</name>
<url>http://maven.apache.org</url>
<url>http://nacos.io</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -56,13 +56,11 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -80,7 +78,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.4</version>
</plugin>
</plugins>
</reporting>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import com.alibaba.nacos.address.misc.Loggers;
import com.alibaba.nacos.address.util.AddressServerParamCheckUtil;
import com.alibaba.nacos.api.common.Constants;
import com.alibaba.nacos.api.naming.pojo.AbstractHealthChecker;
import com.alibaba.nacos.api.naming.pojo.healthcheck.AbstractHealthChecker;
import com.alibaba.nacos.naming.core.Cluster;
import com.alibaba.nacos.naming.core.Instance;
import com.alibaba.nacos.naming.core.Service;
Expand Down
12 changes: 8 additions & 4 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>1.3.0-BETA</version>
<version>1.3.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand All @@ -25,7 +25,7 @@
<packaging>jar</packaging>

<name>nacos-api ${project.version}</name>
<url>http://maven.apache.org</url>
<url>http://nacos.io</url>
<build>
<plugins>
<plugin>
Expand All @@ -45,8 +45,12 @@

<dependencies>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.alibaba.nacos.api.exception.runtime;

/**
* Nacos deserialization exception.
*
* @author yangyi
*/
public class NacosDeserializationException extends NacosRuntimeException {

public static final int ERROR_CODE = 101;

private static final long serialVersionUID = -2742350751684273728L;

private static final String DEFAULT_MSG = "Nacos deserialize failed. ";

private static final String MSG_FOR_SPECIFIED_CLASS = "Nacos deserialize for class [%s] failed. ";

private Class<?> targetClass;

public NacosDeserializationException() {
super(ERROR_CODE);
}

public NacosDeserializationException(Class<?> targetClass) {
super(ERROR_CODE, String.format(MSG_FOR_SPECIFIED_CLASS, targetClass.getName()));
this.targetClass = targetClass;
}

public NacosDeserializationException(Throwable throwable) {
super(ERROR_CODE, DEFAULT_MSG, throwable);
}

public NacosDeserializationException(Class<?> targetClass, Throwable throwable) {
super(ERROR_CODE, String.format(MSG_FOR_SPECIFIED_CLASS, targetClass.getName()), throwable);
this.targetClass = targetClass;
}

public Class<?> getTargetClass() {
return targetClass;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.alibaba.nacos.api.exception.runtime;

/**
* Nacos runtime exception.
*
* @author yangyi
*/
public class NacosRuntimeException extends RuntimeException {

private static final long serialVersionUID = 3513491993982293262L;

public static final String ERROR_MESSAGE_FORMAT = "errCode: %d, errMsg: %s ";

private int errCode;

public NacosRuntimeException(int errCode) {
super();
this.errCode = errCode;
}

public NacosRuntimeException(int errCode, String errMsg) {
super(String.format(ERROR_MESSAGE_FORMAT, errCode, errMsg));
this.errCode = errCode;
}

public NacosRuntimeException(int errCode, Throwable throwable) {
super(throwable);
this.errCode = errCode;
}

public NacosRuntimeException(int errCode, String errMsg, Throwable throwable) {
super(String.format(ERROR_MESSAGE_FORMAT, errCode, errMsg), throwable);
this.errCode = errCode;
}

public int getErrCode() {
return errCode;
}

public void setErrCode(int errCode) {
this.errCode = errCode;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.alibaba.nacos.api.exception.runtime;

/**
* Nacos serialization exception.
*
* @author yangyi
*/
public class NacosSerializationException extends NacosRuntimeException {

public static final int ERROR_CODE = 100;

private static final long serialVersionUID = -4308536346316915612L;

private static final String DEFAULT_MSG = "Nacos serialize failed. ";

private static final String MSG_FOR_SPECIFIED_CLASS = "Nacos serialize for class [%s] failed. ";

private Class<?> serializedClass;

public NacosSerializationException() {
super(ERROR_CODE);
}

public NacosSerializationException(Class<?> serializedClass) {
super(ERROR_CODE, String.format(MSG_FOR_SPECIFIED_CLASS, serializedClass.getName()));
this.serializedClass = serializedClass;
}

public NacosSerializationException(Throwable throwable) {
super(ERROR_CODE, DEFAULT_MSG, throwable);
}

public NacosSerializationException(Class<?> serializedClass, Throwable throwable) {
super(ERROR_CODE, String.format(MSG_FOR_SPECIFIED_CLASS, serializedClass.getName()), throwable);
this.serializedClass = serializedClass;
}

public Class<?> getSerializedClass() {
return serializedClass;
}
}
Loading

0 comments on commit c648249

Please sign in to comment.