Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WebGUI
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kieker
WebGUI
Commits
efaeb4ad
Commit
efaeb4ad
authored
12 years ago
by
Nils Christian Ehmke
Browse files
Options
Downloads
Patches
Plain Diff
corrected an error
parent
6bb09c62
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Kieker.WebGUI/src/main/java/kieker/webgui/common/PluginClassLoader.java
+14
-16
14 additions, 16 deletions
...src/main/java/kieker/webgui/common/PluginClassLoader.java
with
14 additions
and
16 deletions
Kieker.WebGUI/src/main/java/kieker/webgui/common/PluginClassLoader.java
+
14
−
16
View file @
efaeb4ad
...
@@ -26,10 +26,9 @@ import java.net.URLClassLoader;
...
@@ -26,10 +26,9 @@ import java.net.URLClassLoader;
import
java.security.AccessController
;
import
java.security.AccessController
;
import
java.security.PrivilegedAction
;
import
java.security.PrivilegedAction
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.logging.Level
;
import
java.util.logging.Logger
;
import
kieker.analysis.AnalysisController
;
import
kieker.analysis.AnalysisController
;
import
kieker.analysis.model.analysisMetaModel.MIDependency
;
import
kieker.analysis.model.analysisMetaModel.MIDependency
;
...
@@ -53,17 +52,16 @@ public final class PluginClassLoader extends ClassLoader {
...
@@ -53,17 +52,16 @@ public final class PluginClassLoader extends ClassLoader {
* The singleton instance of this class.
* The singleton instance of this class.
*/
*/
private
static
PluginClassLoader
instance
;
private
static
PluginClassLoader
instance
;
private
final
List
<
URL
>
list
=
new
ArrayList
<
URL
>();
private
final
List
<
URL
>
list
=
new
ArrayList
<
URL
>();
private
URLClassLoader
classLoader
=
null
;
private
URLClassLoader
classLoader
=
null
;
/**
/**
* The default constructor of this class. During the creation all available libraries will be added to the class loader.
* The default constructor of this class. During the creation all available libraries will be added to the class loader.
*/
*/
private
PluginClassLoader
()
{
private
PluginClassLoader
()
{
classLoader
=
AnalysisController
.
class
.
getClassLoader
();
this
.
classLoader
=
new
URLClassLoader
(
new
URL
[]{},
AnalysisController
.
class
.
getClassLoader
()
)
;
/* Make sure that all libs are loaded. */
/* Make sure that all libs are loaded. */
final
List
<
MIDependency
>
libs
=
FileManager
.
getInstance
().
loadAllDependencies
();
final
List
<
MIDependency
>
libs
=
FileManager
.
getInstance
().
loadAllDependencies
();
for
(
final
MIDependency
lib
:
libs
)
{
for
(
final
MIDependency
lib
:
libs
)
{
...
@@ -82,9 +80,9 @@ public final class PluginClassLoader extends ClassLoader {
...
@@ -82,9 +80,9 @@ public final class PluginClassLoader extends ClassLoader {
* The URL of the dependency to be added.
* The URL of the dependency to be added.
*/
*/
public
void
addURL
(
final
URL
url
)
{
public
void
addURL
(
final
URL
url
)
{
list
.
add
(
url
);
this
.
list
.
add
(
url
);
classLoader
=
new
URLClassLoader
(
list
.
toArray
(
new
URL
[
list
.
size
()]),
AnalysisController
.
class
.
getClassLoader
());
this
.
classLoader
=
new
URLClassLoader
(
this
.
list
.
toArray
(
new
URL
[
this
.
list
.
size
()]),
AnalysisController
.
class
.
getClassLoader
());
}
}
/**
/**
...
@@ -94,9 +92,9 @@ public final class PluginClassLoader extends ClassLoader {
...
@@ -94,9 +92,9 @@ public final class PluginClassLoader extends ClassLoader {
* The URL of the dependency to be added.
* The URL of the dependency to be added.
*/
*/
public
void
removeURL
(
final
URL
url
)
{
public
void
removeURL
(
final
URL
url
)
{
list
.
remove
(
url
);
this
.
list
.
remove
(
url
);
classLoader
=
new
URLClassLoader
(
list
.
toArray
(
new
URL
[
list
.
size
()]),
AnalysisController
.
class
.
getClassLoader
());
this
.
classLoader
=
new
URLClassLoader
(
this
.
list
.
toArray
(
new
URL
[
this
.
list
.
size
()]),
AnalysisController
.
class
.
getClassLoader
());
}
}
/**
/**
...
@@ -130,6 +128,6 @@ public final class PluginClassLoader extends ClassLoader {
...
@@ -130,6 +128,6 @@ public final class PluginClassLoader extends ClassLoader {
*/
*/
@Override
@Override
public
Class
<?>
loadClass
(
final
String
name
)
throws
ClassNotFoundException
{
public
Class
<?>
loadClass
(
final
String
name
)
throws
ClassNotFoundException
{
return
classLoader
.
loadClass
(
name
);
return
this
.
classLoader
.
loadClass
(
name
);
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment