Uploaded image for project: 'JBoss Web'
  1. JBoss Web
  2. JBWEB-122

TypeCasting not properly handled in Substitution class .

    Details

      Description

      This patch should work.

      Index: java/org/jboss/web/rewrite/Substitution.java
      ===================================================================
      — java/org/jboss/web/rewrite/Substitution.java (revision 409)
      +++ java/org/jboss/web/rewrite/Substitution.java (working copy)
      @@ -202,10 +202,10 @@
      ((ServerVariableEnvElement) newElement).key = sub.substring(colon + 1, close);
      } else if (type.equals("SSL"))

      { newElement = new ServerVariableSslElement(); - ((ServerVariableEnvElement) newElement).key = sub.substring(colon + 1, close); + ((ServerVariableSslElement) newElement).key = sub.substring(colon + 1, close); }

      else if (type.equals("HTTP"))

      { newElement = new ServerVariableHttpElement(); - ((ServerVariableEnvElement) newElement).key = sub.substring(colon + 1, close); + ((ServerVariableHttpElement) newElement).key = sub.substring(colon + 1, close); }

      else

      { throw new IllegalArgumentException(sub + ": Bad type: " + type); }

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  vickyk Vicky Kak
                  Reporter:
                  vickyk Vicky Kak
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: