tracker issue : CF-4126713

select a category, or use search below
(searches all categories and all time range)
Title:

expandPath(".") causes exception

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 03/09/2016

Components: CLI

Versions: 2016

Failure Type:

Found In Build/Fixed In Build: Alpha_v12 /

Priority/Frequency: Normal / Some users will encounter

Locale/System: English / Win All

Vote Count: 1

Repro:
<cfset thisPath = expandPath(".")>


Error:

Jul 14, 2015 22:44:34 PM Error [main] - String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1954)
        at coldfusion.util.Utils.expandPath(Utils.java:495)
        at coldfusion.runtime.CFPage.ExpandPath(CFPage.java:4057)
        at cfexpandPath2ecfm570097109.runPage(expandPath.cfm:2)
        at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:250)
        at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:73
6)
        at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:572)
        at coldfusion.tools.CLI.compileAndRun(CLI.java:310)
        at coldfusion.tools.CLI.main(CLI.java:187)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at coldfusion.tools.CLIInvoker.main(CLIInvoker.java:142)
C:\src\CF12\cli>cf expandPath.cfm
Jul 14, 2015 22:44:52 PM Error [main] - String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1954)
        at coldfusion.util.Utils.expandPath(Utils.java:495)
        at coldfusion.runtime.CFPage.ExpandPath(CFPage.java:4057)
        at cfexpandPath2ecfm570097109.runPage(expandPath.cfm:1)
        at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:250)
        at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:73
6)
        at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:572)
        at coldfusion.tools.CLI.compileAndRun(CLI.java:310)
        at coldfusion.tools.CLI.main(CLI.java:187)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at coldfusion.tools.CLIInvoker.main(CLIInvoker.java:142)

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4126713

External Customer Info:
External Company: Straker Interactive
External Customer Name: Adam Cameron
External Customer Email: CAMERON.ADAM@GMAIL.COM
External Test Config:

Attachments:

Comments:

Adding BUG AUDIT TRAIL ********action: updated fieldName: Date Closed newValue: 2015-09-21 08:17:02.0 oldValue: Blank oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-09-21 15:17:02.0 action: updated fieldName: Closed By newValue: hkallae oldValue: Blank oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-09-21 15:17:02.0 action: updated fieldName: Owner newValue: Blank oldValue: hkallae oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-09-21 15:17:02.0 action: updated fieldName: Reason newValue: Blank oldValue: Fixed oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-09-21 15:17:02.0 action: updated fieldName: State newValue: Closed oldValue: Open oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-09-21 15:17:02.0 action: updated fieldName: Status newValue: Fixed oldValue: ToTest oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-09-21 15:17:02.0 action: updated fieldName: Reason newValue: Fixed oldValue: Blank oprid: himar recordName: RQ_DEFECT timpestamp: 2015-09-21 07:29:22.0 action: updated fieldName: Date Fixed newValue: 2015-09-21 00:29:22.0 oldValue: Blank oprid: himar recordName: RQ_DEFECT timpestamp: 2015-09-21 07:29:22.0 action: updated fieldName: Fixed By newValue: himar oldValue: Blank oprid: himar recordName: RQ_DEFECT timpestamp: 2015-09-21 07:29:22.0 action: updated fieldName: Owner newValue: hkallae oldValue: himar oprid: himar recordName: RQ_DEFECT timpestamp: 2015-09-21 07:29:22.0 action: updated fieldName: Status newValue: ToTest oldValue: ToFix oprid: himar recordName: RQ_DEFECT timpestamp: 2015-09-21 07:29:22.0 action: updated fieldName: Changelist newValue: 295575 oldValue: Blank oprid: himar recordName: RQ_DEFECT timpestamp: 2015-09-21 07:29:22.0 action: updated fieldName: Fix By Milestone newValue: Beta oldValue: Blank oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-09-08 08:07:44.0 action: updated fieldName: Fix By Product Milestone newValue: Beta oldValue: Blank oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-09-08 08:07:44.0 action: updated fieldName: Priority newValue: 2 oldValue: 0 oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-09-08 08:07:44.0 action: updated fieldName: Status newValue: ToFix oldValue: ToTrack oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-09-08 08:07:44.0 action: updated fieldName: Owner newValue: himar oldValue: hkallae oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-09-08 08:07:44.0 action: updated fieldName: Reason newValue: Blank oldValue: PRHaveInfo oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-09-08 08:07:44.0 action: updated fieldName: Status newValue: ToTrack oldValue: ToTrack oprid: prerelease recordName: RQ_DEFECT timpestamp: 2015-07-21 05:52:12.0 action: updated fieldName: Reason newValue: PRHaveInfo oldValue: PRNeedInfo oprid: prerelease recordName: RQ_DEFECT timpestamp: 2015-07-21 05:52:12.0 action: updated fieldName: State newValue: Open oldValue: Open oprid: prerelease recordName: RQ_DEFECT timpestamp: 2015-07-21 05:52:12.0 action: updated fieldName: Status newValue: ToTrack oldValue: Unverified oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-07-21 03:15:31.0 action: updated fieldName: Reason newValue: PRNeedInfo oldValue: Blank oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-07-21 03:15:31.0 action: added fieldName: Vote Type newValue: BETA oldValue: Blank oprid: prerelease recordName: AD_DEFECT_VOTE timpestamp: 2015-07-14 22:58:42.0
Comment by CFwatson U.
3424 | March 09, 2016 04:44:58 AM GMT
expandPath("foo") also fails. expandPath("/foo") works. As far as I can tell from my testing, any path that does not begin with "/" throws an index out of range exception.
Vote by External U.
3426 | March 09, 2016 04:44:59 AM GMT
Added By:hkallae Note Added: This is again the same issue, it works with "./something.cfm" and doesn't when invoked as "something.cfm". Date Added :2015-09-08 08:07:44.0 Added By: PreRelease User User Name:Adam Cameron Note Added: Right... so you're leaving it at that? You don't want to ask me for more info so you can replicate it? What's your plan of attack here, other than doing nothing? Date Added :2015-08-14 07:36:32.0 Added By:hkallae Note Added: Mac has a issue(which is already reported) I am also on windows too. But I don't see this error. Date Added :2015-07-21 05:57:11.0 Added By: PreRelease User User Name:Adam Cameron Note Added: NB: Sean's had it too. Not sure what platform he's on for his testing, but he's mentioned issues with MacOS when getting the CLI running, so presume that's it. Are you not seeing it? Date Added :2015-07-21 05:53:07.0 Added By: PreRelease User User Name:Adam Cameron Note Added: Windows 7 Date Added :2015-07-21 05:52:11.0 Added By:hkallae Note Added: Hey Adam, On which platform did you try this? Date Added :2015-07-21 03:15:33.0 Added By: PreRelease User User Name:Adam Cameron Note Added: I meant to add: any other path seems fine. Just not "." Date Added :2015-07-14 21:46:55.0 Added By: PreRelease User User Name:Adam Cameron Note Added: Entered Bug. Date Added :2015-07-14 21:45:37.0
Comment by CFwatson U.
3425 | March 09, 2016 04:45:00 AM GMT