Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-93

AbstractResource.getFullyQualifiedName() returns wrong file path on Windows

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 1.0.6.Final
    • Fix Version/s: 1.4.0.Final
    • Component/s: Resources
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      1,Run forge
      2,Execute "cd /Users" produces error of "[cd] no such resources:Users"

      Show
      1,Run forge 2,Execute "cd /Users" produces error of " [cd] no such resources:Users"
    • Estimated Difficulty:
      Low

      Description

      1,cd to C:\Users
      2,Get path use AbstractResource.getFullyQualifiedName() and it returns /Users
      3,Execute "cd /Users" produces error of "[cd] no such resources:Users"

      So,the following test failed:

      org.junit.ComparisonFailure: expected:</Users[/Administrator]> but was:</Users[]>
      at org.junit.Assert.assertEquals(Assert.java:123)
      at org.junit.Assert.assertEquals(Assert.java:145)
      at org.jboss.forge.shell.test.plugins.builtin.ChangeDirectoryPluginTest.testAbsolutePath(ChangeDirectoryPluginTest.java:137)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:251)
      at org.jboss.arquillian.protocol.local.LocalMethodExecutor.invoke(LocalMethodExecutor.java:40)
      at org.jboss.arquillian.impl.handler.ContainerTestExecuter.callback(ContainerTestExecuter.java:50)
      at org.jboss.arquillian.impl.handler.ContainerTestExecuter.callback(ContainerTestExecuter.java:40)
      at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)
      at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)
      at org.jboss.arquillian.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:157)
      at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:244)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:207)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
      at org.jboss.arquillian.junit.Arquillian$5$1.evaluate(Arquillian.java:225)
      at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)
      at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:221)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:163)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
      at org.jboss.arquillian.junit.Arquillian$3$1.evaluate(Arquillian.java:186)
      at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)
      at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:182)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:127)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                vineet.reynolds Vineet Reynolds
                Reporter:
                includeeasy Liu Jianhong
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 hour
                  1h
                  Remaining:
                  Remaining Estimate - 1 hour
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified