forked from javapathfinder/jpf-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the failing tests belonging to Simple(DateFormatTest) classes as …
…part of javapathfinder#274
- Loading branch information
Showing
201 changed files
with
6,455 additions
and
1,220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
language: java | ||
|
||
jdk: | ||
- oraclejdk11 | ||
|
||
script: | ||
- ./gradlew check | ||
|
||
before_cache: | ||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock | ||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/ | ||
|
||
cache: | ||
directories: | ||
- $HOME/.gradle/caches/ | ||
- $HOME/.gradle/wrapper/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,11 +23,11 @@ | |
import java.net.URL; | ||
import java.nio.ByteBuffer; | ||
import java.security.ProtectionDomain; | ||
import java.util.Collection; | ||
import java.util.Enumeration; | ||
import java.util.Iterator; | ||
import java.util.Vector; | ||
|
||
import sun.misc.CompoundEnumeration; | ||
|
||
/** | ||
* @author Nastaran Shafiei <[email protected]> | ||
* | ||
|
@@ -102,16 +102,28 @@ private Enumeration<URL> getResourcesURL(String name) { | |
|
||
@SuppressWarnings({"unchecked","rawtypes"}) | ||
public Enumeration<URL> getResources(String name) throws IOException { | ||
Enumeration<URL>[] resEnum = new Enumeration[2]; | ||
Vector<URL> collection = new Vector<>(); | ||
|
||
if(parent == null) { | ||
resEnum[0] = getSystemClassLoader().getResourcesURL(name); | ||
} else{ | ||
resEnum[0] = parent.getResources(name); | ||
if (parent == null) { | ||
Enumeration<URL> urls = getSystemClassLoader().getResourcesURL(name); | ||
|
||
while (urls.hasMoreElements()) { | ||
collection.add(urls.nextElement()); | ||
} | ||
resEnum[1] = findResources(name); | ||
} else { | ||
Enumeration<URL> resources = parent.getResources(name); | ||
|
||
return new CompoundEnumeration<URL>(resEnum); | ||
while (resources.hasMoreElements()) { | ||
collection.add(resources.nextElement()); | ||
} | ||
} | ||
Enumeration<URL> resources = findResources(name); | ||
|
||
while (resources.hasMoreElements()) { | ||
collection.add(resources.nextElement()); | ||
} | ||
|
||
return collection.elements(); | ||
} | ||
|
||
/** | ||
|
@@ -135,9 +147,11 @@ public InputStream getResourceAsStream (String name){ | |
return null; | ||
} | ||
|
||
public native static ClassLoader getSystemClassLoader (); | ||
public native static ClassLoader getSystemClassLoader(); | ||
|
||
public static URL getSystemResource(String name){ | ||
public native static ClassLoader getPlatformClassLoader(); | ||
|
||
public static URL getSystemResource(String name) { | ||
return getSystemClassLoader().getResource(name); | ||
} | ||
|
||
|
@@ -254,4 +268,29 @@ protected Package definePackage(String name, String specTitle, String specVersio | |
throws IllegalArgumentException { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
/** | ||
* Written as a replacement for the auxiliary class {@link CompoundEnumeration} | ||
*/ | ||
final class EnumerationAdapter<E> implements Enumeration<E> { | ||
private final Iterator<E> iterator; | ||
|
||
public EnumerationAdapter(Collection<E> collection) { | ||
iterator = collection.iterator(); | ||
} | ||
|
||
@Override | ||
public boolean hasMoreElements() { | ||
return iterator.hasNext(); | ||
} | ||
|
||
@Override | ||
public E nextElement() { | ||
return iterator.next(); | ||
} | ||
} | ||
|
||
public native final Package getDefinedPackage(final String name); | ||
|
||
public native final Package[] getDefinedPackages(); | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.