-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure all code runs in "empty" classloader.
Hide JGrab's classes. Better error handling.
- Loading branch information
1 parent
323b667
commit b22586f
Showing
5 changed files
with
54 additions
and
22 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
jgrab-runner/src/main/java/com/athaydes/jgrab/runner/EmptyClassLoaderContext.java
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,20 @@ | ||
package com.athaydes.jgrab.runner; | ||
|
||
import com.athaydes.osgiaas.api.env.ClassLoaderContext; | ||
|
||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
enum EmptyClassLoaderContext implements ClassLoaderContext { | ||
INSTANCE; | ||
|
||
@Override | ||
public ClassLoader getClassLoader() { | ||
return ClassLoader.getPlatformClassLoader(); | ||
} | ||
|
||
@Override | ||
public Collection<String> getClassesIn( String s ) { | ||
return List.of(); | ||
} | ||
} |
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
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