diff --git a/api/pom.xml b/api/pom.xml
index 7044b3c5531..b8bdcfdf790 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -16,7 +16,7 @@
com.alibaba.nacos
nacos-all
- 1.0.0-RC2
+ 1.0.0-RC3
4.0.0
diff --git a/api/src/main/java/com/alibaba/nacos/api/PropertyKeyConst.java b/api/src/main/java/com/alibaba/nacos/api/PropertyKeyConst.java
index 3d7e24fd4ae..e22b70948ac 100644
--- a/api/src/main/java/com/alibaba/nacos/api/PropertyKeyConst.java
+++ b/api/src/main/java/com/alibaba/nacos/api/PropertyKeyConst.java
@@ -32,6 +32,8 @@ public class PropertyKeyConst {
public final static String SECRET_KEY = "secretKey";
+ public final static String RAM_ROLE_NAME = "ramRoleName";
+
public final static String SERVER_ADDR = "serverAddr";
public final static String CONTEXT_PATH = "contextPath";
diff --git a/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java b/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java
index 8a42df09192..06cb467daab 100644
--- a/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java
+++ b/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java
@@ -138,6 +138,16 @@ public interface NamingService {
*/
void deregisterInstance(String serviceName, String groupName, String ip, int port, String clusterName) throws NacosException;
+ /**
+ * deregister instance with full instance information
+ *
+ * @param serviceName name of service
+ * @param groupName group of service
+ * @param instance instance information
+ * @throws NacosException
+ */
+ void deregisterInstance(String serviceName, String groupName, Instance instance) throws NacosException;
+
/**
* get all instances of a service
*
diff --git a/api/src/main/java/com/alibaba/nacos/api/naming/PreservedMetadataKeys.java b/api/src/main/java/com/alibaba/nacos/api/naming/PreservedMetadataKeys.java
new file mode 100644
index 00000000000..21dc8ccd220
--- /dev/null
+++ b/api/src/main/java/com/alibaba/nacos/api/naming/PreservedMetadataKeys.java
@@ -0,0 +1,30 @@
+/*
+ * 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.naming;
+
+/**
+ * Some keys of metadata that are recognized by Nacos
+ *
+ * @author nkorange
+ * @since 1.0.0
+ */
+public class PreservedMetadataKeys {
+
+ /**
+ * The key to indicate the registry source of service instance, such as Dubbo, SpringCloud, etc.
+ */
+ public static final String REGISTER_SOURCE = "preserved.register.source";
+}
diff --git a/client/pom.xml b/client/pom.xml
index d68db24e94e..9bfadceb5a5 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -16,7 +16,7 @@
com.alibaba.nacos
nacos-all
- 1.0.0-RC2
+ 1.0.0-RC3
../pom.xml
@@ -85,18 +85,18 @@
- org.codehaus.jackson
- jackson-mapper-lgpl
+ com.fasterxml.jackson.core
+ jackson-core
+
- net.jcip
- jcip-annotations
- true
+ com.fasterxml.jackson.core
+ jackson-databind
- com.github.spotbugs
- spotbugs-annotations
+ net.jcip
+ jcip-annotations
true
diff --git a/client/src/main/java/com/alibaba/nacos/client/config/http/ServerHttpAgent.java b/client/src/main/java/com/alibaba/nacos/client/config/http/ServerHttpAgent.java
index 1b44fce4ef1..f26135c1248 100644
--- a/client/src/main/java/com/alibaba/nacos/client/config/http/ServerHttpAgent.java
+++ b/client/src/main/java/com/alibaba/nacos/client/config/http/ServerHttpAgent.java
@@ -29,10 +29,9 @@
import com.alibaba.nacos.client.utils.LogUtils;
import com.alibaba.nacos.client.utils.ParamUtil;
import com.alibaba.nacos.client.utils.StringUtils;
-import org.codehaus.jackson.annotate.JsonProperty;
-import org.codehaus.jackson.type.TypeReference;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.core.type.TypeReference;
import org.slf4j.Logger;
-
import java.io.IOException;
import java.net.ConnectException;
import java.net.HttpURLConnection;
@@ -222,6 +221,11 @@ public String call() throws Exception {
}
private void initAkSk(Properties properties) {
+ String ramRoleName = properties.getProperty(PropertyKeyConst.RAM_ROLE_NAME);
+ if (!StringUtils.isBlank(ramRoleName)) {
+ STSConfig.getInstance().setRamRoleName(ramRoleName);
+ }
+
String ak = properties.getProperty(PropertyKeyConst.ACCESS_KEY);
if (StringUtils.isBlank(ak)) {
accessKey = SpasAdapter.getAk();
diff --git a/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java b/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java
index 10037d1f715..7490404f6a8 100644
--- a/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java
+++ b/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java
@@ -29,7 +29,6 @@
import com.alibaba.nacos.client.utils.LogUtils;
import com.alibaba.nacos.client.utils.ParamUtil;
import com.alibaba.nacos.client.utils.StringUtils;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.slf4j.Logger;
import java.io.File;
@@ -102,7 +101,6 @@ public void removeTenantListener(String dataId, String group, Listener listener)
}
}
- @SuppressFBWarnings("JLM_JSR166_UTILCONCURRENT_MONITORENTER")
void removeCache(String dataId, String group) {
String groupKey = GroupKey.getKey(dataId, group);
synchronized (cacheMap) {
@@ -115,7 +113,6 @@ void removeCache(String dataId, String group) {
MetricsMonitor.getListenConfigCountMonitor().set(cacheMap.get().size());
}
- @SuppressFBWarnings("JLM_JSR166_UTILCONCURRENT_MONITORENTER")
void removeCache(String dataId, String group, String tenant) {
String groupKey = GroupKey.getKeyTenant(dataId, group, tenant);
synchronized (cacheMap) {
@@ -128,7 +125,6 @@ void removeCache(String dataId, String group, String tenant) {
MetricsMonitor.getListenConfigCountMonitor().set(cacheMap.get().size());
}
- @SuppressFBWarnings("JLM_JSR166_UTILCONCURRENT_MONITORENTER")
public CacheData addCacheDataIfAbsent(String dataId, String group) {
CacheData cache = getCache(dataId, group);
if (null != cache) {
@@ -163,7 +159,6 @@ public CacheData addCacheDataIfAbsent(String dataId, String group) {
return cache;
}
- @SuppressFBWarnings("JLM_JSR166_UTILCONCURRENT_MONITORENTER")
public CacheData addCacheDataIfAbsent(String dataId, String group, String tenant) {
CacheData cache = getCache(dataId, group, tenant);
if (null != cache) {
diff --git a/client/src/main/java/com/alibaba/nacos/client/config/impl/ServerListManager.java b/client/src/main/java/com/alibaba/nacos/client/config/impl/ServerListManager.java
index 6907bec1a7f..d3b48e24adb 100644
--- a/client/src/main/java/com/alibaba/nacos/client/config/impl/ServerListManager.java
+++ b/client/src/main/java/com/alibaba/nacos/client/config/impl/ServerListManager.java
@@ -21,7 +21,6 @@
import com.alibaba.nacos.client.config.impl.HttpSimpleClient.HttpResult;
import com.alibaba.nacos.client.config.utils.IOUtils;
import com.alibaba.nacos.client.utils.*;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.slf4j.Logger;
import java.io.IOException;
@@ -396,7 +395,6 @@ public RandomizedServerAddress(String ip) {
}
@Override
- @SuppressFBWarnings("EQ_COMPARETO_USE_OBJECT_EQUALS")
public int compareTo(RandomizedServerAddress other) {
if (this.priority != other.priority) {
return other.priority - this.priority;
diff --git a/client/src/main/java/com/alibaba/nacos/client/identify/STSConfig.java b/client/src/main/java/com/alibaba/nacos/client/identify/STSConfig.java
index 1398774689f..dfc76b14127 100644
--- a/client/src/main/java/com/alibaba/nacos/client/identify/STSConfig.java
+++ b/client/src/main/java/com/alibaba/nacos/client/identify/STSConfig.java
@@ -25,7 +25,7 @@
@SuppressWarnings("PMD.ClassNamingShouldBeCamelRule")
public class STSConfig {
private static final String RAM_SECURITY_CREDENTIALS_URL
- = "";
+ = "http://100.100.100.200/latest/meta-data/ram/security-credentials/";
private String ramRoleName;
/**
* STS 临时凭证有效期剩余多少时开始刷新(允许本地时间比 STS 服务时间最多慢多久)
diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java b/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java
index dc5b0e7bf97..271a44f4ec0 100644
--- a/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java
+++ b/client/src/main/java/com/alibaba/nacos/client/naming/NacosNamingService.java
@@ -104,14 +104,11 @@ private void init(Properties properties) {
private int initClientBeatThreadCount(Properties properties) {
if (properties == null) {
-
return UtilAndComs.DEFAULT_CLIENT_BEAT_THREAD_COUNT;
}
- int clientBeatThreadCount = NumberUtils.toInt(properties.getProperty(PropertyKeyConst.NAMING_CLIENT_BEAT_THREAD_COUNT),
+ return NumberUtils.toInt(properties.getProperty(PropertyKeyConst.NAMING_CLIENT_BEAT_THREAD_COUNT),
UtilAndComs.DEFAULT_CLIENT_BEAT_THREAD_COUNT);
-
- return clientBeatThreadCount;
}
private int initPollingThreadCount(Properties properties) {
@@ -120,10 +117,8 @@ private int initPollingThreadCount(Properties properties) {
return UtilAndComs.DEFAULT_POLLING_THREAD_COUNT;
}
- int pollingThreadCount = NumberUtils.toInt(properties.getProperty(PropertyKeyConst.NAMING_POLLING_THREAD_COUNT),
+ return NumberUtils.toInt(properties.getProperty(PropertyKeyConst.NAMING_POLLING_THREAD_COUNT),
UtilAndComs.DEFAULT_POLLING_THREAD_COUNT);
-
- return pollingThreadCount;
}
private boolean isLoadCacheAtStart(Properties properties) {
@@ -283,16 +278,18 @@ public void registerInstance(String serviceName, Instance instance) throws Nacos
@Override
public void registerInstance(String serviceName, String groupName, Instance instance) throws NacosException {
- BeatInfo beatInfo = new BeatInfo();
- beatInfo.setServiceName(NamingUtils.getGroupedName(serviceName, groupName));
- beatInfo.setIp(instance.getIp());
- beatInfo.setPort(instance.getPort());
- beatInfo.setCluster(instance.getClusterName());
- beatInfo.setWeight(instance.getWeight());
- beatInfo.setMetadata(instance.getMetadata());
- beatInfo.setScheduled(false);
-
- beatReactor.addBeatInfo(NamingUtils.getGroupedName(serviceName, groupName), beatInfo);
+ if (instance.isEphemeral()) {
+ BeatInfo beatInfo = new BeatInfo();
+ beatInfo.setServiceName(NamingUtils.getGroupedName(serviceName, groupName));
+ beatInfo.setIp(instance.getIp());
+ beatInfo.setPort(instance.getPort());
+ beatInfo.setCluster(instance.getClusterName());
+ beatInfo.setWeight(instance.getWeight());
+ beatInfo.setMetadata(instance.getMetadata());
+ beatInfo.setScheduled(false);
+
+ beatReactor.addBeatInfo(NamingUtils.getGroupedName(serviceName, groupName), beatInfo);
+ }
serverProxy.registerService(NamingUtils.getGroupedName(serviceName, groupName), groupName, instance);
}
@@ -314,8 +311,18 @@ public void deregisterInstance(String serviceName, String ip, int port, String c
@Override
public void deregisterInstance(String serviceName, String groupName, String ip, int port, String clusterName) throws NacosException {
- beatReactor.removeBeatInfo(NamingUtils.getGroupedName(serviceName, groupName), ip, port);
- serverProxy.deregisterService(NamingUtils.getGroupedName(serviceName, groupName), ip, port, clusterName);
+ Instance instance = new Instance();
+ instance.setIp(ip);
+ instance.setPort(port);
+ instance.setClusterName(clusterName);
+
+ deregisterInstance(serviceName, groupName, instance);
+ }
+
+ @Override
+ public void deregisterInstance(String serviceName, String groupName, Instance instance) throws NacosException {
+ beatReactor.removeBeatInfo(NamingUtils.getGroupedName(serviceName, groupName), instance.getIp(), instance.getPort());
+ serverProxy.deregisterService(NamingUtils.getGroupedName(serviceName, groupName), instance);
}
@Override
diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/core/HostReactor.java b/client/src/main/java/com/alibaba/nacos/client/naming/core/HostReactor.java
index 1d93980ae8c..ba5a7a25677 100644
--- a/client/src/main/java/com/alibaba/nacos/client/naming/core/HostReactor.java
+++ b/client/src/main/java/com/alibaba/nacos/client/naming/core/HostReactor.java
@@ -25,7 +25,6 @@
import com.alibaba.nacos.client.naming.net.NamingProxy;
import com.alibaba.nacos.client.naming.utils.StringUtils;
import com.alibaba.nacos.client.naming.utils.UtilAndComs;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.*;
import java.util.concurrent.*;
@@ -267,7 +266,6 @@ public void scheduleUpdateIfAbsent(String serviceName, String clusters) {
}
}
- @SuppressFBWarnings("NN_NAKED_NOTIFY")
public void updateServiceNow(String serviceName, String clusters) {
ServiceInfo oldService = getSerivceInfo0(serviceName, clusters);
try {
diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/net/NamingProxy.java b/client/src/main/java/com/alibaba/nacos/client/naming/net/NamingProxy.java
index 536cca57f3d..5aa070aa66c 100644
--- a/client/src/main/java/com/alibaba/nacos/client/naming/net/NamingProxy.java
+++ b/client/src/main/java/com/alibaba/nacos/client/naming/net/NamingProxy.java
@@ -187,17 +187,18 @@ public void registerService(String serviceName, String groupName, Instance insta
}
- public void deregisterService(String serviceName, String ip, int port, String clusterName) throws NacosException {
+ public void deregisterService(String serviceName, Instance instance) throws NacosException {
- NAMING_LOGGER.info("[DEREGISTER-SERVICE] {} deregistering service {} with instance: {}:{}@{}",
- namespaceId, serviceName, ip, port, clusterName);
+ NAMING_LOGGER.info("[DEREGISTER-SERVICE] {} deregistering service {} with instance: {}",
+ namespaceId, serviceName, instance);
final Map params = new HashMap(8);
params.put(CommonParams.NAMESPACE_ID, namespaceId);
- params.put("ip", ip);
- params.put("port", String.valueOf(port));
params.put(CommonParams.SERVICE_NAME, serviceName);
- params.put(CommonParams.CLUSTER_NAME, clusterName);
+ params.put(CommonParams.CLUSTER_NAME, instance.getClusterName());
+ params.put("ip", instance.getIp());
+ params.put("port", String.valueOf(instance.getPort()));
+ params.put("ephemeral", String.valueOf(instance.isEphemeral()));
reqAPI(UtilAndComs.NACOS_URL_INSTANCE, params, HttpMethod.DELETE);
}
diff --git a/client/src/main/java/com/alibaba/nacos/client/naming/utils/IoUtils.java b/client/src/main/java/com/alibaba/nacos/client/naming/utils/IoUtils.java
index 28e0048b594..f0b4a01c102 100644
--- a/client/src/main/java/com/alibaba/nacos/client/naming/utils/IoUtils.java
+++ b/client/src/main/java/com/alibaba/nacos/client/naming/utils/IoUtils.java
@@ -15,7 +15,6 @@
*/
package com.alibaba.nacos.client.naming.utils;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.*;
import java.nio.channels.FileChannel;
@@ -163,7 +162,6 @@ public static void cleanDirectory(File directory) throws IOException {
}
}
- @SuppressFBWarnings("BIT_IOR_OF_SIGNED_BYTE")
public static boolean isGzipStream(byte[] bytes) {
int minByteArraySize = 2;
diff --git a/client/src/main/java/com/alibaba/nacos/client/utils/JSONUtils.java b/client/src/main/java/com/alibaba/nacos/client/utils/JSONUtils.java
index 2a75beaf9f2..017a05df1e1 100644
--- a/client/src/main/java/com/alibaba/nacos/client/utils/JSONUtils.java
+++ b/client/src/main/java/com/alibaba/nacos/client/utils/JSONUtils.java
@@ -16,11 +16,9 @@
package com.alibaba.nacos.client.utils;
import java.io.IOException;
-
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.DeserializationConfig.Feature;
-import org.codehaus.jackson.type.JavaType;
-import org.codehaus.jackson.type.TypeReference;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
/**
* Json tool
@@ -33,7 +31,7 @@ public class JSONUtils {
static ObjectMapper mapper = new ObjectMapper();
static {
- mapper.disable(Feature.FAIL_ON_UNKNOWN_PROPERTIES);
+ mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
}
public static String serializeObject(Object o) throws IOException {
@@ -49,12 +47,4 @@ public static Object deserializeObject(String s, TypeReference> typeReference)
return mapper.readValue(s, typeReference);
}
- public static JavaType getCollectionType(Class> collectionClass, Class>... elementClasses) {
- return mapper.getTypeFactory().constructParametricType(collectionClass, elementClasses);
- }
-
- public static Object deserializeCollection(String s, JavaType type) throws IOException {
- return mapper.readValue(s, type);
- }
-
}
diff --git a/cmdb/pom.xml b/cmdb/pom.xml
index 8629aee9054..b0f933659de 100644
--- a/cmdb/pom.xml
+++ b/cmdb/pom.xml
@@ -18,7 +18,7 @@
nacos-all
com.alibaba.nacos
- 1.0.0-RC2
+ 1.0.0-RC3
../pom.xml
4.0.0
diff --git a/common/pom.xml b/common/pom.xml
index ce76bc3f98b..1c0aec9f194 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -18,7 +18,7 @@
com.alibaba.nacos
nacos-all
- 1.0.0-RC2
+ 1.0.0-RC3
../pom.xml
4.0.0
diff --git a/common/src/main/java/com/alibaba/nacos/common/util/VersionUtils.java b/common/src/main/java/com/alibaba/nacos/common/util/VersionUtils.java
index 304b33018eb..d877c47ca72 100644
--- a/common/src/main/java/com/alibaba/nacos/common/util/VersionUtils.java
+++ b/common/src/main/java/com/alibaba/nacos/common/util/VersionUtils.java
@@ -30,8 +30,9 @@ public class VersionUtils {
static{
+ InputStream in = null;
try{
- InputStream in = VersionUtils.class.getClassLoader()
+ in = VersionUtils.class.getClassLoader()
.getResourceAsStream("nacos-version.txt");
Properties props = new Properties();
props.load(in);
@@ -41,6 +42,14 @@ public class VersionUtils {
}
} catch(Exception e) {
e.printStackTrace();
+ } finally {
+ try {
+ if (in != null) {
+ in.close();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
}
}
}
diff --git a/config/pom.xml b/config/pom.xml
index e3a34d7b58e..303e41715d4 100644
--- a/config/pom.xml
+++ b/config/pom.xml
@@ -17,7 +17,7 @@
com.alibaba.nacos
nacos-all
- 1.0.0-RC2
+ 1.0.0-RC3
4.0.0
@@ -103,19 +103,20 @@
org.springframework.boot
spring-boot-starter-tomcat
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+
- org.codehaus.jackson
- jackson-mapper-lgpl
+ com.fasterxml.jackson.core
+ jackson-databind
net.jcip
jcip-annotations
true
-
- com.github.spotbugs
- spotbugs-annotations
-
org.mockito
mockito-core
diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java b/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java
index 86f3e32b349..3a69043e2f5 100644
--- a/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java
+++ b/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java
@@ -23,10 +23,9 @@
import com.alibaba.nacos.config.server.utils.RunningConfigUtils;
import com.alibaba.nacos.config.server.utils.ThreadUtil;
import org.apache.commons.lang3.StringUtils;
-import org.codehaus.jackson.type.TypeReference;
+import com.fasterxml.jackson.core.type.TypeReference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-
import java.net.HttpURLConnection;
import java.net.URLEncoder;
import java.util.ArrayList;
diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/DiskUtil.java b/config/src/main/java/com/alibaba/nacos/config/server/service/DiskUtil.java
index 3e35fcdb6e1..838f06d5fcd 100644
--- a/config/src/main/java/com/alibaba/nacos/config/server/service/DiskUtil.java
+++ b/config/src/main/java/com/alibaba/nacos/config/server/service/DiskUtil.java
@@ -157,16 +157,17 @@ static public File targetTagFile(String dataId, String group, String tenant, Str
static public String getConfig(String dataId, String group, String tenant)
throws IOException {
- FileInputStream fis = null;
File file = targetFile(dataId, group, tenant);
if (file.exists()) {
+ FileInputStream fis = null;
try {
fis = new FileInputStream(file);
+ return IOUtils.toString(fis, Constants.ENCODE);
} catch (FileNotFoundException e) {
return StringUtils.EMPTY;
+ } finally {
+ IOUtils.closeQuietly(fis);
}
- String content = IOUtils.toString(fis, Constants.ENCODE);
- return content;
} else {
return StringUtils.EMPTY;
}
diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/PersistService.java b/config/src/main/java/com/alibaba/nacos/config/server/service/PersistService.java
index 28d0256b027..7e1429d6792 100755
--- a/config/src/main/java/com/alibaba/nacos/config/server/service/PersistService.java
+++ b/config/src/main/java/com/alibaba/nacos/config/server/service/PersistService.java
@@ -60,8 +60,6 @@
import com.alibaba.nacos.config.server.utils.event.EventDispatcher;
import com.google.common.collect.Lists;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
/**
* 数据库服务,提供ConfigInfo在数据库的存取
3.0开始增加数据版本号, 并将物理删除改为逻辑删除
3.0增加数据库切换功能
*
@@ -2639,9 +2637,6 @@ private long addConfigInfoAtomic(final String srcIp, final String srcUser, final
try {
jt.update(new PreparedStatementCreator() {
- @SuppressFBWarnings(value = {"OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE",
- "SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING"},
- justification = "findbugs does not trust jdbctemplate, sql is constant in practice")
public PreparedStatement createPreparedStatement(Connection connection) throws SQLException {
PreparedStatement ps = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
ps.setString(1, configInfo.getDataId());
diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/capacity/GroupCapacityPersistService.java b/config/src/main/java/com/alibaba/nacos/config/server/service/capacity/GroupCapacityPersistService.java
index 2dd248c93bc..3fe4e11bf8d 100644
--- a/config/src/main/java/com/alibaba/nacos/config/server/service/capacity/GroupCapacityPersistService.java
+++ b/config/src/main/java/com/alibaba/nacos/config/server/service/capacity/GroupCapacityPersistService.java
@@ -22,7 +22,6 @@
import com.alibaba.nacos.config.server.utils.PropertyUtil;
import com.alibaba.nacos.config.server.utils.TimeUtils;
import com.google.common.collect.Lists;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.CannotGetJdbcConnectionException;
import org.springframework.jdbc.core.JdbcTemplate;
@@ -128,9 +127,6 @@ private boolean insertGroupCapacity(final String sql, final GroupCapacity capaci
GeneratedKeyHolder generatedKeyHolder = new GeneratedKeyHolder();
PreparedStatementCreator preparedStatementCreator = new PreparedStatementCreator() {
@Override
- @SuppressFBWarnings(value = {"OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE",
- "SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING"},
- justification = "findbugs does not trust jdbctemplate, sql is constant in practice")
public PreparedStatement createPreparedStatement(Connection connection) throws SQLException {
PreparedStatement ps = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
String group = capacity.getGroup();
@@ -306,9 +302,6 @@ public boolean deleteGroupCapacity(final String group) {
try {
PreparedStatementCreator preparedStatementCreator = new PreparedStatementCreator() {
@Override
- @SuppressFBWarnings(value = {"OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE",
- "SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING"},
- justification = "findbugs does not trust jdbctemplate, sql is constant in practice")
public PreparedStatement createPreparedStatement(Connection connection) throws SQLException {
PreparedStatement ps = connection.prepareStatement(
"DELETE FROM group_capacity WHERE group_id = ?;");
diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/capacity/TenantCapacityPersistService.java b/config/src/main/java/com/alibaba/nacos/config/server/service/capacity/TenantCapacityPersistService.java
index ac97dc75d17..12ede847bf4 100644
--- a/config/src/main/java/com/alibaba/nacos/config/server/service/capacity/TenantCapacityPersistService.java
+++ b/config/src/main/java/com/alibaba/nacos/config/server/service/capacity/TenantCapacityPersistService.java
@@ -21,7 +21,6 @@
import com.alibaba.nacos.config.server.utils.PropertyUtil;
import com.alibaba.nacos.config.server.utils.TimeUtils;
import com.google.common.collect.Lists;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.CannotGetJdbcConnectionException;
import org.springframework.jdbc.core.JdbcTemplate;
@@ -96,9 +95,6 @@ public boolean insertTenantCapacity(final TenantCapacity tenantCapacity) {
GeneratedKeyHolder generatedKeyHolder = new GeneratedKeyHolder();
PreparedStatementCreator preparedStatementCreator = new PreparedStatementCreator() {
@Override
- @SuppressFBWarnings(value = {"OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE",
- "SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING"},
- justification = "findbugs does not trust jdbctemplate, sql is constant in practice")
public PreparedStatement createPreparedStatement(Connection connection) throws SQLException {
PreparedStatement ps = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
String tenant = tenantCapacity.getTenant();
@@ -257,9 +253,6 @@ public boolean deleteTenantCapacity(final String tenant) {
try {
PreparedStatementCreator preparedStatementCreator = new PreparedStatementCreator() {
@Override
- @SuppressFBWarnings(value = {"OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE",
- "SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING"},
- justification = "findbugs does not trust jdbctemplate, sql is constant in practice")
public PreparedStatement createPreparedStatement(Connection connection) throws SQLException {
PreparedStatement ps = connection.prepareStatement(
"DELETE FROM tenant_capacity WHERE tenant_id = ?;");
diff --git a/config/src/main/java/com/alibaba/nacos/config/server/utils/JSONUtils.java b/config/src/main/java/com/alibaba/nacos/config/server/utils/JSONUtils.java
index 9ae850fb55e..231fd4846ef 100644
--- a/config/src/main/java/com/alibaba/nacos/config/server/utils/JSONUtils.java
+++ b/config/src/main/java/com/alibaba/nacos/config/server/utils/JSONUtils.java
@@ -15,12 +15,11 @@
*/
package com.alibaba.nacos.config.server.utils;
-import org.codehaus.jackson.map.DeserializationConfig.Feature;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.type.JavaType;
-import org.codehaus.jackson.type.TypeReference;
-
import java.io.IOException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
/**
* json util
@@ -33,7 +32,7 @@ public class JSONUtils {
static ObjectMapper mapper = new ObjectMapper();
static {
- mapper.disable(Feature.FAIL_ON_UNKNOWN_PROPERTIES);
+ mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
}
public static String serializeObject(Object o) throws IOException {
@@ -49,12 +48,4 @@ public static Object deserializeObject(String s, TypeReference> typeReference)
return mapper.readValue(s, typeReference);
}
- public static JavaType getCollectionType(Class> collectionClass, Class>... elementClasses) {
- return mapper.getTypeFactory().constructParametricType(collectionClass, elementClasses);
- }
-
- public static Object deserializeCollection(String s, JavaType type) throws IOException {
- return mapper.readValue(s, type);
- }
-
}
diff --git a/console/pom.xml b/console/pom.xml
index cbe64a65431..e6fa7fff3cd 100644
--- a/console/pom.xml
+++ b/console/pom.xml
@@ -18,7 +18,7 @@
com.alibaba.nacos
nacos-all
- 1.0.0-RC2
+ 1.0.0-RC3
nacos-console
diff --git a/console/src/main/resources/static/console-fe/src/i18ndoc.js b/console/src/main/resources/static/console-fe/src/i18ndoc.js
index a5a72802f5e..4f6d4b37373 100644
--- a/console/src/main/resources/static/console-fe/src/i18ndoc.js
+++ b/console/src/main/resources/static/console-fe/src/i18ndoc.js
@@ -161,7 +161,7 @@ module.exports = {
'com.alibaba.nacos.page.newconfig.the_more_advanced': 'Group不能为空',
'nacos.page.namespace.ACM_special_SecretKey_will_be_abandoned,_not_recommended_for_use4':
'ACM专用SecretKey(即将废弃,不建议使用):',
- 'com.alibaba.nacos.page.namespace.public': 'public(保留控件)',
+ 'com.alibaba.nacos.page.namespace.public': 'public(保留空间)',
'com.alibaba.nacos.page.configsync.error': '错误',
'nacos.page.namespace.AccessKey_recommended1': 'AccessKey(开发环境推荐):',
'com.alibaba.nacos.page.pushTrajectory.configuration': '配置',
diff --git a/console/src/main/resources/static/console-fe/src/locales/zh-CN.js b/console/src/main/resources/static/console-fe/src/locales/zh-CN.js
index 772558cea8b..84edb7e22ce 100644
--- a/console/src/main/resources/static/console-fe/src/locales/zh-CN.js
+++ b/console/src/main/resources/static/console-fe/src/locales/zh-CN.js
@@ -64,7 +64,7 @@ const I18N_CONF = {
namespaceDelete: '删除',
details: '详情',
edit: '编辑',
- namespacePublic: 'public(保留控件)',
+ namespacePublic: 'public(保留空间)',
pubNoData: '没有数据',
namespaceAdd: '新建命名空间',
namespaceNames: '命名空间名称',
diff --git a/console/src/main/resources/static/index.html b/console/src/main/resources/static/index.html
index 527553130f6..2354ff5beed 100644
--- a/console/src/main/resources/static/index.html
+++ b/console/src/main/resources/static/index.html
@@ -19,16 +19,19 @@
Nacos
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
+
-
+
+
@@ -36,18 +39,19 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/console/src/main/resources/static/js/main.js b/console/src/main/resources/static/js/main.js
index 463af95993a..99617e497bd 100644
--- a/console/src/main/resources/static/js/main.js
+++ b/console/src/main/resources/static/js/main.js
@@ -47,7 +47,7 @@
*
* Date: 2016-08-08
*/
-function(n){var e,p,b,r,o,h,d,m,M,l,u,w,k,i,S,g,s,c,y,T="sizzle"+1*new Date,_=n.document,x=0,a=0,f=ie(),v=ie(),L=ie(),C=function(e,t){return e===t&&(u=!0),0},D={}.hasOwnProperty,t=[],E=t.pop,O=t.push,N=t.push,Y=t.slice,j=function(e,t){for(var n=0,a=e.length;n+~]|"+I+")"+I+"*"),K=new RegExp("="+I+"*([^\\]'\"]*?)"+I+"*\\]","g"),B=new RegExp(R),U=new RegExp("^"+A+"$"),q={ID:new RegExp("^#("+A+")"),CLASS:new RegExp("^\\.("+A+")"),TAG:new RegExp("^("+A+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,X=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),ee=function(e,t,n){var a="0x"+t-65536;return a!=a||n?t:a<0?String.fromCharCode(a+65536):String.fromCharCode(a>>10|55296,1023&a|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ae=function(){w()},oe=_e(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{N.apply(t=Y.call(_.childNodes),_.childNodes),t[_.childNodes.length].nodeType}catch(e){N={apply:t.length?function(e,t){O.apply(e,Y.call(t))}:function(e,t){for(var n=e.length,a=0;e[n++]=t[a++];);e.length=n-1}}}function re(e,t,n,a){var o,r,i,s,l,u,c,d=t&&t.ownerDocument,f=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==f&&9!==f&&11!==f)return n;if(!a&&((t?t.ownerDocument||t:_)!==k&&w(t),t=t||k,S)){if(11!==f&&(l=Q.exec(e)))if(o=l[1]){if(9===f){if(!(i=t.getElementById(o)))return n;if(i.id===o)return n.push(i),n}else if(d&&(i=d.getElementById(o))&&y(t,i)&&i.id===o)return n.push(i),n}else{if(l[2])return N.apply(n,t.getElementsByTagName(e)),n;if((o=l[3])&&p.getElementsByClassName&&t.getElementsByClassName)return N.apply(n,t.getElementsByClassName(o)),n}if(p.qsa&&!L[e+" "]&&(!g||!g.test(e))){if(1!==f)d=t,c=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(te,ne):t.setAttribute("id",s=T),r=(u=h(e)).length;r--;)u[r]="#"+s+" "+ye(u[r]);c=u.join(","),d=X.test(e)&&me(t.parentNode)||t}if(c)try{return N.apply(n,d.querySelectorAll(c)),n}catch(e){}finally{s===T&&t.removeAttribute("id")}}}return m(e.replace(F,"$1"),t,n,a)}function ie(){var a=[];return function e(t,n){return a.push(t+" ")>b.cacheLength&&delete e[a.shift()],e[t+" "]=n}}function se(e){return e[T]=!0,e}function le(e){var t=k.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ue(e,t){for(var n=e.split("|"),a=n.length;a--;)b.attrHandle[n[a]]=t}function ce(e,t){var n=t&&e,a=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(a)return a;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function fe(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function pe(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&oe(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function he(i){return se(function(r){return r=+r,se(function(e,t){for(var n,a=i([],e.length,r),o=a.length;o--;)e[n=a[o]]&&(e[n]=!(t[n]=e[n]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in p=re.support={},o=re.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},w=re.setDocument=function(e){var t,n,a=e?e.ownerDocument||e:_;return a!==k&&9===a.nodeType&&a.documentElement&&(i=(k=a).documentElement,S=!o(k),_!==k&&(n=k.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ae,!1):n.attachEvent&&n.attachEvent("onunload",ae)),p.attributes=le(function(e){return e.className="i",!e.getAttribute("className")}),p.getElementsByTagName=le(function(e){return e.appendChild(k.createComment("")),!e.getElementsByTagName("*").length}),p.getElementsByClassName=$.test(k.getElementsByClassName),p.getById=le(function(e){return i.appendChild(e).id=T,!k.getElementsByName||!k.getElementsByName(T).length}),p.getById?(b.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&S){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(Z,ee);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&S){var n,a,o,r=t.getElementById(e);if(r){if((n=r.getAttributeNode("id"))&&n.value===e)return[r];for(o=t.getElementsByName(e),a=0;r=o[a++];)if((n=r.getAttributeNode("id"))&&n.value===e)return[r]}return[]}}),b.find.TAG=p.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):p.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,a=[],o=0,r=t.getElementsByTagName(e);if("*"!==e)return r;for(;n=r[o++];)1===n.nodeType&&a.push(n);return a},b.find.CLASS=p.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&S)return t.getElementsByClassName(e)},s=[],g=[],(p.qsa=$.test(k.querySelectorAll))&&(le(function(e){i.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+I+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+T+"-]").length||g.push("~="),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+T+"+*").length||g.push(".#.+[+~]")}),le(function(e){e.innerHTML="";var t=k.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),i.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(p.matchesSelector=$.test(c=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.oMatchesSelector||i.msMatchesSelector))&&le(function(e){p.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",R)}),g=g.length&&new RegExp(g.join("|")),s=s.length&&new RegExp(s.join("|")),t=$.test(i.compareDocumentPosition),y=t||$.test(i.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,a=t&&t.parentNode;return e===a||!(!a||1!==a.nodeType||!(n.contains?n.contains(a):e.compareDocumentPosition&&16&e.compareDocumentPosition(a)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},C=t?function(e,t){if(e===t)return u=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!p.sortDetached&&t.compareDocumentPosition(e)===n?e===k||e.ownerDocument===_&&y(_,e)?-1:t===k||t.ownerDocument===_&&y(_,t)?1:l?j(l,e)-j(l,t):0:4&n?-1:1)}:function(e,t){if(e===t)return u=!0,0;var n,a=0,o=e.parentNode,r=t.parentNode,i=[e],s=[t];if(!o||!r)return e===k?-1:t===k?1:o?-1:r?1:l?j(l,e)-j(l,t):0;if(o===r)return ce(e,t);for(n=e;n=n.parentNode;)i.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;i[a]===s[a];)a++;return a?ce(i[a],s[a]):i[a]===_?-1:s[a]===_?1:0}),k},re.matches=function(e,t){return re(e,null,null,t)},re.matchesSelector=function(e,t){if((e.ownerDocument||e)!==k&&w(e),t=t.replace(K,"='$1']"),p.matchesSelector&&S&&!L[t+" "]&&(!s||!s.test(t))&&(!g||!g.test(t)))try{var n=c.call(e,t);if(n||p.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||re.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&re.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return q.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&B.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=f[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&f(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,a,o){return function(e){var t=re.attr(e,n);return null==t?"!="===a:!a||(t+="","="===a?t===o:"!="===a?t!==o:"^="===a?o&&0===t.indexOf(o):"*="===a?o&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,a){return _(n)?T.grep(e,function(e,t){return!!n.call(e,t,e)!==a}):n.nodeType?T.grep(e,function(e){return e===n!==a}):"string"!=typeof n?T.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(T.fn.init=function(e,t,n){var a,o;if(!e)return this;if(n=n||E,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):_(e)?void 0!==n.ready?n.ready(e):e(T):T.makeArray(e,this);if(!(a="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:O.exec(e))||!a[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(a[1]){if(t=t instanceof T?t[0]:t,T.merge(this,T.parseHTML(a[1],t&&t.nodeType?t.ownerDocument||t:S,!0)),C.test(a[1])&&T.isPlainObject(t))for(a in t)_(this[a])?this[a](t[a]):this.attr(a,t[a]);return this}return(o=S.getElementById(a[2]))&&(this[0]=o,this.length=1),this}).prototype=T.fn,E=T(S);var N=/^(?:parents|prev(?:Until|All))/,Y={children:!0,contents:!0,next:!0,prev:!0};function j(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}T.fn.extend({has:function(e){var t=T(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]+)/i,ce=/^$|^module$|\/(?:java|ecma)script/i,de={option:[1,""],thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};function fe(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&L(e,t)?T.merge([e],n):n}function pe(e,t){for(var n=0,a=e.length;nx",y.noCloneChecked=!!he.cloneNode(!0).lastChild.defaultValue;var _e=S.documentElement,ve=/^key/,be=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Me=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function ke(){return!1}function Se(){try{return S.activeElement}catch(e){}}function Te(e,t,n,a,o,r){var i,s;if("object"==typeof t){for(s in"string"!=typeof n&&(a=a||n,n=void 0),t)Te(e,s,n,a,t[s],r);return e}if(null==a&&null==o?(o=n,a=n=void 0):null==o&&("string"==typeof n?(o=a,a=void 0):(o=a,a=n,n=void 0)),!1===o)o=ke;else if(!o)return e;return 1===r&&(i=o,(o=function(e){return T().off(e),i.apply(this,arguments)}).guid=i.guid||(i.guid=T.guid++)),e.each(function(){T.event.add(this,t,o,a,n)})}T.event={global:{},add:function(t,e,n,a,o){var r,i,s,l,u,c,d,f,p,h,m,g=J.get(t);if(g)for(n.handler&&(n=(r=n).handler,o=r.selector),o&&T.find.matchesSelector(_e,o),n.guid||(n.guid=T.guid++),(l=g.events)||(l=g.events={}),(i=g.handle)||(i=g.handle=function(e){return void 0!==T&&T.event.triggered!==e.type?T.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(P)||[""]).length;u--;)p=m=(s=Me.exec(e[u])||[])[1],h=(s[2]||"").split(".").sort(),p&&(d=T.event.special[p]||{},p=(o?d.delegateType:d.bindType)||p,d=T.event.special[p]||{},c=T.extend({type:p,origType:m,data:a,handler:n,guid:n.guid,selector:o,needsContext:o&&T.expr.match.needsContext.test(o),namespace:h.join(".")},r),(f=l[p])||((f=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,a,h,i)||t.addEventListener&&t.addEventListener(p,i)),d.add&&(d.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),o?f.splice(f.delegateCount++,0,c):f.push(c),T.event.global[p]=!0)},remove:function(e,t,n,a,o){var r,i,s,l,u,c,d,f,p,h,m,g=J.hasData(e)&&J.get(e);if(g&&(l=g.events)){for(u=(t=(t||"").match(P)||[""]).length;u--;)if(p=m=(s=Me.exec(t[u])||[])[1],h=(s[2]||"").split(".").sort(),p){for(d=T.event.special[p]||{},f=l[p=(a?d.delegateType:d.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=r=f.length;r--;)c=f[r],!o&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||a&&a!==c.selector&&("**"!==a||!c.selector)||(f.splice(r,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(e,c));i&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,h,g.handle)||T.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)T.event.remove(e,p+t[u],n,a,!0);T.isEmptyObject(l)&&J.remove(e,"handle events")}},dispatch:function(e){var t,n,a,o,r,i,s=T.event.fix(e),l=new Array(arguments.length),u=(J.get(this,"events")||{})[s.type]||[],c=T.event.special[s.type]||{};for(l[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,Le=/