Skip to content

Commit

Permalink
简化依赖,感谢阿里云工程师的贡献 #489
Browse files Browse the repository at this point in the history
定义 UnsupportedDataTypeException 类代替 javax.activation.UnsupportedDataTypeException,并移除 javax.activation 依赖
  • Loading branch information
TommyLemon authored Dec 15, 2022
2 parents 8efd38e + 76cf980 commit 007dd65
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 14 deletions.
5 changes: 0 additions & 5 deletions APIJSONORM/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
<artifactId>fastjson</artifactId>
<version>1.2.83</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import java.util.List;
import java.util.Map;

import javax.activation.UnsupportedDataTypeException;
import javax.script.Invocable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
Expand All @@ -27,6 +26,7 @@
import apijson.NotNull;
import apijson.RequestMethod;
import apijson.StringUtil;
import apijson.orm.exception.UnsupportedDataTypeException;

/**可远程调用的函数类
* @author Lemon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
import apijson.orm.exception.ConflictException;
import apijson.orm.exception.CommonException;
import apijson.orm.exception.NotExistException;
import apijson.orm.exception.UnsupportedDataTypeException;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

import javax.activation.UnsupportedDataTypeException;
import java.rmi.ServerException;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/AbstractParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import java.util.SortedMap;
import java.util.TreeMap;

import javax.activation.UnsupportedDataTypeException;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import javax.management.Query;
Expand All @@ -38,6 +37,7 @@
import apijson.RequestMethod;
import apijson.StringUtil;
import apijson.orm.exception.CommonException;
import apijson.orm.exception.UnsupportedDataTypeException;

import static apijson.JSONObject.KEY_EXPLAIN;
import static apijson.RequestMethod.CRUD;
Expand Down
3 changes: 1 addition & 2 deletions APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import java.util.Set;
import java.util.regex.Pattern;

import javax.activation.UnsupportedDataTypeException;

import apijson.JSON;
import apijson.JSONResponse;
import apijson.Log;
Expand All @@ -31,6 +29,7 @@
import apijson.StringUtil;
import apijson.orm.Join.On;
import apijson.orm.exception.NotExistException;
import apijson.orm.exception.UnsupportedDataTypeException;
import apijson.orm.model.Access;
import apijson.orm.model.AllColumn;
import apijson.orm.model.AllColumnComment;
Expand Down
3 changes: 1 addition & 2 deletions APIJSONORM/src/main/java/apijson/orm/AbstractVerifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
import java.util.SortedMap;
import java.util.regex.Pattern;

import javax.activation.UnsupportedDataTypeException;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

Expand All @@ -56,6 +54,7 @@
import apijson.orm.AbstractSQLConfig.IdCallback;
import apijson.orm.exception.ConflictException;
import apijson.orm.exception.NotLoggedInException;
import apijson.orm.exception.UnsupportedDataTypeException;
import apijson.orm.model.Access;
import apijson.orm.model.Column;
import apijson.orm.model.Document;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import java.sql.SQLException;
import java.util.concurrent.TimeoutException;

import javax.activation.UnsupportedDataTypeException;

import apijson.JSONResponse;
import apijson.Log;
import apijson.StringUtil;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
This source code is licensed under the Apache License Version 2.0.*/


package apijson.orm.exception;

import java.io.IOException;

/**
* 给定的数据类型不被支持
*
* @author cnscoo
*/

public class UnsupportedDataTypeException extends IOException {
private static final long serialVersionUID = 1L;

public UnsupportedDataTypeException() {
super();
}

public UnsupportedDataTypeException(String s) {
super(s);
}
}

0 comments on commit 007dd65

Please sign in to comment.