Skip to content

Commit c9af41f

Browse files
author
alafighting
committed
去除无用代码
1 parent 767e16a commit c9af41f

File tree

1 file changed

+0
-54
lines changed
  • library/src/main/java/com/im4j/kakacache/rxjava/common/utils

1 file changed

+0
-54
lines changed

library/src/main/java/com/im4j/kakacache/rxjava/common/utils/Utils.java

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
/**
2525
* 工具类
26-
* @version alafighting 2016-04
2726
*/
2827
public final class Utils {
2928

@@ -64,58 +63,6 @@ public static void checkOffsetAndCount(int arrayLength, int offset, int count) {
6463
}
6564
}
6665

67-
/**
68-
* 取父类泛型
69-
* @param clazz
70-
* @return 没有则返回null
71-
*/
72-
@SuppressWarnings("rawtypes")
73-
public static Type[] getGenericSuperclass(Class<?> clazz) {
74-
try {
75-
Type typeGeneric = clazz.getGenericSuperclass();
76-
if (typeGeneric != null) {
77-
if (typeGeneric instanceof ParameterizedType) {
78-
return getGeneric((ParameterizedType) typeGeneric);
79-
}
80-
}
81-
} catch (Exception e) {
82-
}
83-
return null;
84-
}
85-
/**
86-
* 取父接口泛型
87-
* @param clazz
88-
* @return 没有则返回null
89-
*/
90-
@SuppressWarnings("rawtypes")
91-
public static Type[] getGenericInterfaces(Class<?> clazz) {
92-
try {
93-
Type typeGeneric = clazz.getGenericInterfaces()[0];
94-
if (typeGeneric != null) {
95-
if (typeGeneric instanceof ParameterizedType) {
96-
return getGeneric((ParameterizedType) typeGeneric);
97-
}
98-
}
99-
} catch (Exception e) {
100-
}
101-
return null;
102-
}
103-
/**
104-
* 取泛型
105-
* @param type
106-
* @return 没有则返回null
107-
*/
108-
@SuppressWarnings("rawtypes")
109-
public static Type[] getGeneric(ParameterizedType type) {
110-
try {
111-
if (type != null) {
112-
return type.getActualTypeArguments();
113-
}
114-
} catch (Exception e) {
115-
}
116-
return null;
117-
}
118-
11966
public static Class<?> getRawType(Type type) {
12067
if (type == null) throw new NullPointerException("type == null");
12168

@@ -173,7 +120,6 @@ public static String buildKey(Request request) {
173120
str.append(request.url());
174121
str.append(']');
175122

176-
177123
try {
178124
Buffer buffer = new Buffer();
179125
request.body().writeTo(buffer);

0 commit comments

Comments
 (0)