Skip to content

Commit 0c8db62

Browse files
author
Javen
committed
Add nullable from javax.annotation;
Move log4j.properties to test resources, it is only for testing. For production env, app service should have it's own log4j properties file, or use other logging framework.
1 parent ed0d7e4 commit 0c8db62

File tree

5 files changed

+19
-2
lines changed

5 files changed

+19
-2
lines changed

.classpath

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
33
<classpathentry kind="src" path="src/main/java"/>
4+
<classpathentry kind="src" path="src/test/resources"/>
45
<classpathentry kind="src" path="src/main/resources"/>
56
<classpathentry kind="src" path="src/test/java"/>
67
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package cn.jpush.api.utils;
2+
3+
import java.lang.annotation.Documented;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.RetentionPolicy;
6+
7+
/**
8+
* Copied from javax.annotation.Nullable
9+
*/
10+
@Documented
11+
//@TypeQualifierNickname
12+
//@Nonnull(when = When.UNKNOWN)
13+
@Retention(RetentionPolicy.RUNTIME)
14+
public @interface Nullable {
15+
16+
}

src/main/java/cn/jpush/api/utils/Preconditions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
*/
1414
package cn.jpush.api.utils;
1515

16-
import com.sun.istack.internal.Nullable;
17-
1816
/**
17+
* Copied from Google Guava.
18+
*
1919
* Static convenience methods that help a method or constructor check whether it was invoked
2020
* correctly (whether its <i>preconditions</i> have been met). These methods generally accept a
2121
* {@code boolean} expression which is expected to be {@code true} (or in the case of {@code

0 commit comments

Comments
 (0)