tracker issue : CF-3288035

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

Fundamental bug in import resolving

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Walter Seethaler / Walter Seethaler (Walter Seethaler)

Created: 07/14/2012

Components: Language

Versions: 9.0.1

Failure Type:

Found In Build/Fixed In Build: 9.0.1 / 288680

Priority/Frequency: Major / All users will encounter

Locale/System: English / Windows 7

Vote Count: 2

Problem Description: The resolving of imported classpaths or packages breaks, when an inherited method is called just before the intstance tries to resolve a path. 

Steps to Reproduce: See the attachment for the full description.

Actual Result: Imports break and can not be trusted. Produces a weird, hard to understand behaviour.

Any Workarounds: Use import XOR extends, never both.

I looked into the cfusion.jar, to understand the behavior. These are the results, as far as I understood it:
- In the Class coldfusion.runtime.TemplateProxyFactory one of the methods that actually resolve imports is: 
-- public static File getResolvedFile(String fullName, NeoPageContext pageContext, String importList) (~ Line: 1201)
This method is used for resolving of returntypes, argumenttypes, classloading (new <import>Name()) and implicitUDFMethod types.

Package imports are resolved in Line 1299: 
> obj = getTemplateFileHelper(completeComponentName, pageContext, "");
Class imports are resolved in Line 1276:
>  obj = getTemplateFileHelper((String)specificImports.get(fullName), pageContext, "");

That method is the end point of the type resolving. A starting point is for type checks, another is coldfusion.runtime.CFPage._createObject() for classloading.

The bug could be around these methods, but at first I would look what happens, when inherited methods are called.

Sorry, if I talked nonsense about that stuff.

These Bugs seem to be a subset of this one:

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

Watson Bug ID:	3288035

External Customer Info:
External Company:  
External Customer Name: Walter Seethaler
External Customer Email:  
External Test Config: My Hardware and Environment details:



InstallKit	 Native Windows

appserver	 JRun4

expiration	 {ts '2012-07-14 07:06:54'}

productlevel	 Developer

productname	 ColdFusion Server

productversion	 9,0,1,274733

rootdir	 C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfusion

supportedlocales	 Chinese (China),Chinese (Hong Kong),Chinese (Taiwan),Dutch (Belgian),Dutch (Standard),English (Australian),English (Canadian),English (New Zealand),English (UK),English (US),French (Belgian),French (Canadian),French (Standard),French (Swiss),German (Austrian),German (Standard),German (Swiss),Italian (Standard),Italian (Swiss),Japanese,Korean,Norwegian (Bokmal),Norwegian (Nynorsk),Portuguese (Brazilian),Portuguese (Standard),Spanish (Mexican),Spanish (Modern),Spanish (Standard),Swedish,ar,ar_AE,ar_BH,ar_DZ,ar_EG,ar_IQ,ar_JO,ar_KW,ar_LB,ar_LY,ar_MA,ar_OM,ar_QA,ar_SA,ar_SD,ar_SY,ar_TN,ar_YE,be,be_BY,bg,bg_BG,ca,ca_ES,cs,cs_CZ,da,da_DK,de,de_AT,de_CH,de_DE,de_LU,el,el_CY,el_GR,en,en_AU,en_CA,en_GB,en_IE,en_IN,en_MT,en_NZ,en_PH,en_SG,en_US,en_ZA,es,es_AR,es_BO,es_CL,es_CO,es_CR,es_DO,es_EC,es_ES,es_GT,es_HN,es_MX,es_NI,es_PA,es_PE,es_PR,es_PY,es_SV,es_US,es_UY,es_VE,et,et_EE,fi,fi_FI,fr,fr_BE,fr_CA,fr_CH,fr_FR,fr_LU,ga,ga_IE,hi_IN,hr,hr_HR,hu,hu_HU,in,in_ID,is,is_IS,it,it_CH,it_IT,iw,iw_IL,ja,ja_JP,ja_JP_JP,ko,ko_KR,lt,lt_LT,lv,lv_LV,mk,mk_MK,ms,ms_MY,mt,mt_MT,nl,nl_BE,nl_NL,no,no_NO,no_NO_NY,pl,pl_PL,pt,pt_BR,pt_PT,ro,ro_RO,ru,ru_RU,sk,sk_SK,sl,sl_SI,sq,sq_AL,sr,sr_BA,sr_CS,sr_ME,sr_RS,sv,sv_SE,th,th_TH,th_TH_TH,tr,tr_TR,uk,uk_UA,vi,vi_VN,zh,zh_CN,zh_HK,zh_SG,zh_TW



additionalinformation	 [empty string]

arch	 amd64

buildnumber	 [empty string]

name	 Windows 7

version	 6.1


  1. July 15, 2012 00:00:00:


illogical behavior for using imports
Vote by External U.
18713 | September 25, 2012 08:06:49 AM GMT
Bug Verified. (Comment added from ex-user id:vnigam)
Comment by Adobe D.
18711 | December 17, 2013 05:34:07 AM GMT
+1 / subscribing. -- Adam /////////////
Vote by External U.
18714 | December 19, 2013 03:29:55 AM GMT
We bind import list inside function invocation which was overwriting parent cfc's import. For the fix we would internally cache this list before invoking the function and push it back on the current cfc object.
Comment by Chandan ..
18712 | February 21, 2014 10:54:36 AM GMT