File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/runtime Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -103,17 +103,13 @@ private JavaAgent[] initializeAgents(List<String> agentOptions) {
103
103
104
104
private void onLoad (String javaAgentName , String agentOptions , List <JavaAgent > addedAgents ) {
105
105
Path jarPath = Paths .get (javaAgentName );
106
- if (jarPath .isAbsolute ()) {
107
- try {
108
- JavaAgent javaAgent = addAgent (jarPath , agentOptions );
109
- if (javaAgent != null ) {
110
- addedAgents .add (javaAgent );
111
- }
112
- } catch (IOException e ) {
113
- throw getContext ().abort ("Error opening zip file or JAR manifest missing : " + jarPath + " due to: " + e .getMessage ());
106
+ try {
107
+ JavaAgent javaAgent = addAgent (jarPath , agentOptions );
108
+ if (javaAgent != null ) {
109
+ addedAgents .add (javaAgent );
114
110
}
115
- } else {
116
- throw getContext ().abort ("Please use an absolute path for java agent : " + jarPath );
111
+ } catch ( IOException e ) {
112
+ throw getContext ().abort ("Error opening zip file or JAR manifest missing : " + jarPath + " due to: " + e . getMessage () );
117
113
}
118
114
}
119
115
You can’t perform that action at this time.
0 commit comments