Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-2699

EnsembleRemove.applyEnsembleConfiguration() Throws StringIndexOutOfBoundsException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: jboss-fuse-6.1
    • Fix Version/s: None
    • Component/s: Fabric8 v1
    • Labels:
      None
    • Sprint:
      6.3 Sprint 4 (Mar 28 - Apr 29)

      Description

      In the EnsembleRemove.applyEnsembleConfiguration() method, the following code snippet throws a StringIndexOutOfBoundsException:

      String currentDataDir = currentConfig.get("dataDir");
      currentDataDir = currentDataDir.substring(0, currentDataDir.lastIndexOf("/"));
      

      In some cases, the currentDataDir String variable's value does not contain the '/' character; therefore a -1 is returned, resulting in a StringIndexOutOfBoundsException.

      The code should check for this.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                oscerd Andrea Cosentino
                Reporter:
                joef551 Joe Fernandez
                Tester:
                Emil Cervenan
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: