Skip to content
This repository was archived by the owner on Aug 17, 2018. It is now read-only.

Commit cee0f34

Browse files
author
Jan Luehe
committed
Fix for CR 6900384 ("jpsName is missing in probe signatures in jsp related probes")
Tests run: QL svn path=/trunk/; revision=1206
1 parent 058d014 commit cee0f34

3 files changed

Lines changed: 14 additions & 15 deletions

File tree

impl/src/main/java/org/apache/jasper/servlet/JspServlet.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -373,25 +373,25 @@ public void service(HttpServletRequest request,
373373
serviceJspFile(request, response, jspUri, null, precompile);
374374
} catch (RuntimeException e) {
375375
// STARTS S1AS
376-
incrementErrorCount();
376+
incrementErrorCount(jspUri);
377377
// END S1AS
378378
throw e;
379379
} catch (Error e) {
380-
incrementErrorCount();
380+
incrementErrorCount(jspUri);
381381
throw e;
382382
} catch (ServletException e) {
383383
// STARTS S1AS
384-
incrementErrorCount();
384+
incrementErrorCount(jspUri);
385385
// END S1AS
386386
throw e;
387387
} catch (IOException e) {
388388
// STARTS S1AS
389-
incrementErrorCount();
389+
incrementErrorCount(jspUri);
390390
// END S1AS
391391
throw e;
392392
} catch (Throwable e) {
393393
// STARTS S1AS
394-
incrementErrorCount();
394+
incrementErrorCount(jspUri);
395395
// END S1AS
396396
throw new ServletException(e);
397397
}
@@ -486,11 +486,11 @@ private void serviceJspFile(HttpServletRequest request,
486486

487487

488488
// STARTS S1AS
489-
private void incrementErrorCount() {
489+
private void incrementErrorCount(String jspUri) {
490490
countErrors.incrementAndGet();
491491
// Fire the jspErrorEvent probe event
492492
if (jspProbeEmitter != null) {
493-
jspProbeEmitter.jspErrorEvent();
493+
jspProbeEmitter.jspErrorEvent(jspUri);
494494
}
495495
}
496496
// END S1AS

impl/src/main/java/org/apache/jasper/servlet/JspServletWrapper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,15 @@ public Servlet getServlet()
211211
ctxt.getRuntimeContext().incrementJspReloadCount();
212212
// Fire the jspReloadedEvent probe event
213213
if (jspProbeEmitter != null) {
214-
jspProbeEmitter.jspReloadedEvent(theServlet);
214+
jspProbeEmitter.jspReloadedEvent(jspUri);
215215
}
216216
}
217217

218218
reload = false;
219219

220220
// Fire the jspLoadedEvent probe event
221221
if (jspProbeEmitter != null) {
222-
jspProbeEmitter.jspLoadedEvent(theServlet);
222+
jspProbeEmitter.jspLoadedEvent(jspUri);
223223
}
224224
}
225225
}
@@ -443,7 +443,7 @@ public void destroy() {
443443
theServlet.destroy();
444444
// Fire the jspDestroyedEvent probe event
445445
if (jspProbeEmitter != null) {
446-
jspProbeEmitter.jspDestroyedEvent(theServlet);
446+
jspProbeEmitter.jspDestroyedEvent(jspUri);
447447
}
448448
}
449449
}

impl/src/main/java/org/glassfish/jsp/api/JspProbeEmitter.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,11 @@
4747

4848
public interface JspProbeEmitter {
4949

50-
public void jspLoadedEvent(Servlet jspServlet);
50+
public void jspLoadedEvent(String jspUri);
5151

52-
public void jspReloadedEvent(Servlet jspServlet);
52+
public void jspReloadedEvent(String jspUri);
5353

54-
public void jspDestroyedEvent(Servlet jspServlet);
54+
public void jspDestroyedEvent(String jspUri);
5555

56-
public void jspErrorEvent();
56+
public void jspErrorEvent(String jspUri);
5757
}
58-

0 commit comments

Comments
 (0)