This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 233310

Summary: Patch for: [Spring] Detection of springbeans XML files doesn't work for files within subdirectories - only files in source root are detected
Product: javaee Reporter: markiewb
Component: SpringAssignee: Martin Fousek <marfous>
Status: VERIFIED FIXED    
Severity: normal Keywords: PATCH_AVAILABLE
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Sample project
Shows the issue
Proposed patch

Description markiewb 2013-07-24 12:09:37 UTC
Created attachment 137688 [details]
Sample project

* See the attached simple maven project
* in the Project Properties invoke "Detect Files..."

ACTUAL:
* the spring beans XML files aren't detected, when in subdir (<- issue, see screenshot)
* the spring beans XML files are detected, when in rootdir

EXPECTED:
* the spring beans XML files are detected, when in rootdir OR in subdir

Product Version: NetBeans IDE Dev (Build 201307212300)
Java: 1.7.0_21; Java HotSpot(TM) Client VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: Windows XP version 5.1 running on x86; Cp1252; de_DE (nb)
Comment 1 markiewb 2013-07-24 12:11:06 UTC
Created attachment 137689 [details]
Shows the issue
Comment 2 markiewb 2013-07-24 20:21:15 UTC
Created attachment 137732 [details]
Proposed patch

I like to propose a one-line patch to solve this issue. The patch introduces the recursive searching for Spring Beans XML files. The code was originally taken from org.netbeans.modules.maven.spring.MavenSpringConfigProviderImpl.addFilesInRoot()

Please review and commit. 

PS: I already signed the CA.
Comment 3 Martin Fousek 2013-07-25 07:21:05 UTC
Thanks a lot for the contribution!

Your patch looks well. It was applied in web-main #6aa69cc25a6e.
Comment 4 Quality Engineering 2013-07-26 02:50:38 UTC
Integrated into 'main-silver', will be available in build *201307252300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/6aa69cc25a6e
User: Martin Fousek <marfous@netbeans.org>
Log: #233310 - Patch for: [Spring] Detection of springbeans XML files doesn't work for files within subdirectories - only files in source root are detected
Comment 5 markiewb 2013-08-12 20:58:34 UTC
verified at least in 201308092300