Bug 34652 - JspC does not support Smap generation
Summary: JspC does not support Smap generation
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Jasper (show other bugs)
Version: Nightly Build
Hardware: All Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2005-04-27 21:11 UTC by Daryl Robbins
Modified: 2005-04-29 11:51 UTC (History)
0 users



Attachments
Patch (1.66 KB, patch)
2005-04-27 21:12 UTC, Daryl Robbins
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daryl Robbins 2005-04-27 21:11:17 UTC
The values for the supressSmap and dumpSmap options are hard coded. This makes
it impossible to include line mapping information when precompiling a JSP. The
included patch should resolve this issue.

--- JspC.java.orig	Tue Mar 29 17:43:37 2005
+++ JspC.java	Wed Apr 27 14:50:21 2005
@@ -114,6 +114,8 @@
     private static final String SWITCH_DIE = "-die";
     private static final String SWITCH_POOLING = "-poolingEnabled";
     private static final String SWITCH_ENCODING = "-javaEncoding";
+    private static final String SWITCH_SMAP = "-smap";
+    private static final String SWITCH_DUMP_SMAP = "-dumpsmap";
 
     private static final String SHOW_SUCCESS ="-s";
     private static final String LIST_ERRORS = "-l";
@@ -147,6 +149,8 @@
     private int dieLevel;
     private boolean helpNeeded = false;
     private boolean compile = false;
+    private boolean supressSmap = true;
+    private boolean dumpSmap = false;
 
     private String compiler = null;
 
@@ -293,6 +297,10 @@
                 setCompilerSourceVM(nextArg());
             } else if (tok.equals(SWITCH_TARGET)) {
                 setCompilerTargetVM(nextArg());
+            } else if (tok.equals(SWITCH_SMAP)) {
+                supressSmap = false;
+            } else if (tok.equals(SWITCH_DUMP_SMAP)) {
+                dumpSmap = true;
             } else {
                 if (tok.startsWith("-")) {
                     throw new JasperException("Unrecognized option: " + tok +
@@ -406,14 +414,14 @@
      * Is the generation of SMAP info for JSR45 debuggin suppressed?
      */
     public boolean isSmapSuppressed() {
-        return true;
+        return supressSmap;
     }
 
     /**
      * Should SMAP info for JSR45 debugging be dumped to a file?
      */
     public boolean isSmapDumped() {
-        return false;
+        return dumpSmap;
     }
 
     /**
Comment 1 Daryl Robbins 2005-04-27 21:12:13 UTC
Created attachment 14861 [details]
Patch
Comment 2 Remy Maucherat 2005-04-29 19:51:58 UTC
I have applied the patch.