Skip to content

Remove unnecessary sun.* imports #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
language: java

script:
- mvn package

notifications:
webhooks:
on_success: always
on_failure: always
on_start: never
on_cancel: never
on_error: always
32 changes: 18 additions & 14 deletions src/main/java/java/lang/Character.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

package java.lang;

import org.cprover.CProver;

import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
Expand Down Expand Up @@ -7217,19 +7219,21 @@ public static char reverseBytes(char ch) {
* @since 1.7
*/
public static String getName(int codePoint) {
if (!isValidCodePoint(codePoint)) {
throw new IllegalArgumentException();
}
String name = CharacterName.get(codePoint);
if (name != null)
return name;
if (getType(codePoint) == UNASSIGNED)
return null;
UnicodeBlock block = UnicodeBlock.of(codePoint);
if (block != null)
return block.toString().replace('_', ' ') + " "
+ Integer.toHexString(codePoint).toUpperCase(Locale.ENGLISH);
// should never come here
return Integer.toHexString(codePoint).toUpperCase(Locale.ENGLISH);
// if (!isValidCodePoint(codePoint)) {
// throw new IllegalArgumentException();
// }
// String name = CharacterName.get(codePoint);
// if (name != null)
// return name;
// if (getType(codePoint) == UNASSIGNED)
// return null;
// UnicodeBlock block = UnicodeBlock.of(codePoint);
// if (block != null)
// return block.toString().replace('_', ' ') + " "
// + Integer.toHexString(codePoint).toUpperCase(Locale.ENGLISH);
// // should never come here
// return Integer.toHexString(codePoint).toUpperCase(Locale.ENGLISH);
CProver.notModelled();
return CProver.nondetWithoutNullForNotModelled();
}
}
23 changes: 12 additions & 11 deletions src/main/java/java/lang/Class.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import java.util.HashMap;
import java.util.Map;

import sun.reflect.CallerSensitive;
import sun.reflect.Reflection;
// import sun.reflect.CallerSensitive;
// import sun.reflect.Reflection;

import org.cprover.CProver;
import org.cprover.CProverString;
Expand Down Expand Up @@ -179,16 +179,17 @@ public String getName() {
* @see SecurityManager#checkPermission
* @see java.lang.RuntimePermission
*/
@CallerSensitive
// @CallerSensitive
public ClassLoader getClassLoader() {
ClassLoader cl = getClassLoader0();
if (cl == null)
return null;
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
ClassLoader.checkClassLoaderPermission(cl, Reflection.getCallerClass());
}
return cl;
// ClassLoader cl = getClassLoader0();
// if (cl == null)
// return null;
// SecurityManager sm = System.getSecurityManager();
// if (sm != null) {
// ClassLoader.checkClassLoaderPermission(cl, Reflection.getCallerClass());
// }
// return cl;
return null;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be CProver.notModelled();

}

ClassLoader getClassLoader0() {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/java/lang/Math.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
package java.lang;
import java.util.Random;

import sun.misc.FloatConsts;
import sun.misc.DoubleConsts;
// import sun.misc.FloatConsts;
// import sun.misc.DoubleConsts;

import org.cprover.CProver;

Expand Down