Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-11165

BrowserSIm: StringIndexOutOfBoundsException on Linux when emty URL is entered

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.3.0.Beta3
    • 3.3.0.Beta1
    • browsersim
    • None

      Steps to reproduce:

      1. Run BrowserSim on Linux
      2. Remove all characters from the address bar and press Enter

      Actual result:
      BrowserSim closes, and the following exception is printed to the console:

      Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 0
      	at java.lang.String.charAt(String.java:694)
      	at org.eclipse.swt.browser.WebKit.setUrl(WebKit.java:1300)
      	at org.eclipse.swt.browser.Browser.setUrl(Browser.java:1061)
      	at org.jboss.tools.vpe.browsersim.browser.AbstractWebKitBrowser.setUrl(AbstractWebKitBrowser.java:30)
      	at org.eclipse.swt.browser.Browser.setUrl(Browser.java:1029)
      	at org.jboss.tools.vpe.browsersim.ui.BrowserSim$ControlHandlerImpl.goToAddress(BrowserSim.java:540)
      	at org.jboss.tools.vpe.browsersim.ui.skin.NativeSkin$1.handleEvent(NativeSkin.java:128)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
      	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
      	at org.jboss.tools.vpe.browsersim.ui.BrowserSim.main(BrowserSim.java:98)
      

            yradtsevich Yahor Radtsevich (Inactive)
            yradtsevich Yahor Radtsevich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: