Skip to content

Commit c86885c

Browse files
Merge pull request #8 from diffblue/remove-sun-imports
Remove unnecessary sun.* imports
2 parents 6b422b1 + 4d58b73 commit c86885c

File tree

4 files changed

+44
-27
lines changed

4 files changed

+44
-27
lines changed

.travis.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
language: java
2+
3+
script:
4+
- mvn package
5+
6+
notifications:
7+
webhooks:
8+
on_success: always
9+
on_failure: always
10+
on_start: never
11+
on_cancel: never
12+
on_error: always

src/main/java/java/lang/Character.java

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
package java.lang;
2727

28+
import org.cprover.CProver;
29+
2830
import java.util.Arrays;
2931
import java.util.Map;
3032
import java.util.HashMap;
@@ -7217,19 +7219,21 @@ public static char reverseBytes(char ch) {
72177219
* @since 1.7
72187220
*/
72197221
public static String getName(int codePoint) {
7220-
if (!isValidCodePoint(codePoint)) {
7221-
throw new IllegalArgumentException();
7222-
}
7223-
String name = CharacterName.get(codePoint);
7224-
if (name != null)
7225-
return name;
7226-
if (getType(codePoint) == UNASSIGNED)
7227-
return null;
7228-
UnicodeBlock block = UnicodeBlock.of(codePoint);
7229-
if (block != null)
7230-
return block.toString().replace('_', ' ') + " "
7231-
+ Integer.toHexString(codePoint).toUpperCase(Locale.ENGLISH);
7232-
// should never come here
7233-
return Integer.toHexString(codePoint).toUpperCase(Locale.ENGLISH);
7222+
// if (!isValidCodePoint(codePoint)) {
7223+
// throw new IllegalArgumentException();
7224+
// }
7225+
// String name = CharacterName.get(codePoint);
7226+
// if (name != null)
7227+
// return name;
7228+
// if (getType(codePoint) == UNASSIGNED)
7229+
// return null;
7230+
// UnicodeBlock block = UnicodeBlock.of(codePoint);
7231+
// if (block != null)
7232+
// return block.toString().replace('_', ' ') + " "
7233+
// + Integer.toHexString(codePoint).toUpperCase(Locale.ENGLISH);
7234+
// // should never come here
7235+
// return Integer.toHexString(codePoint).toUpperCase(Locale.ENGLISH);
7236+
CProver.notModelled();
7237+
return CProver.nondetWithoutNullForNotModelled();
72347238
}
72357239
}

src/main/java/java/lang/Class.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
import java.util.HashMap;
2929
import java.util.Map;
3030

31-
import sun.reflect.CallerSensitive;
32-
import sun.reflect.Reflection;
31+
// import sun.reflect.CallerSensitive;
32+
// import sun.reflect.Reflection;
3333

3434
import org.cprover.CProver;
3535
import org.cprover.CProverString;
@@ -179,16 +179,17 @@ public String getName() {
179179
* @see SecurityManager#checkPermission
180180
* @see java.lang.RuntimePermission
181181
*/
182-
@CallerSensitive
182+
// @CallerSensitive
183183
public ClassLoader getClassLoader() {
184-
ClassLoader cl = getClassLoader0();
185-
if (cl == null)
186-
return null;
187-
SecurityManager sm = System.getSecurityManager();
188-
if (sm != null) {
189-
ClassLoader.checkClassLoaderPermission(cl, Reflection.getCallerClass());
190-
}
191-
return cl;
184+
// ClassLoader cl = getClassLoader0();
185+
// if (cl == null)
186+
// return null;
187+
// SecurityManager sm = System.getSecurityManager();
188+
// if (sm != null) {
189+
// ClassLoader.checkClassLoaderPermission(cl, Reflection.getCallerClass());
190+
// }
191+
// return cl;
192+
return null;
192193
}
193194

194195
ClassLoader getClassLoader0() {

src/main/java/java/lang/Math.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
package java.lang;
2727
import java.util.Random;
2828

29-
import sun.misc.FloatConsts;
30-
import sun.misc.DoubleConsts;
29+
// import sun.misc.FloatConsts;
30+
// import sun.misc.DoubleConsts;
3131

3232
import org.cprover.CProver;
3333

0 commit comments

Comments
 (0)