Bug 108114 - Remove all wildcard imports from WAF & CMS
Summary: Remove all wildcard imports from WAF & CMS
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Web Application Framework
Classification: Retired
Component: other
Version: nightly
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: ccm-bugs-list
QA Contact: Jon Orris
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-10-27 18:38 UTC by Daniel Berrangé
Modified: 2007-04-18 16:58 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-09-02 17:39:32 UTC
Embargoed:


Attachments (Terms of Use)

Description Daniel Berrangé 2003-10-27 18:38:19 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.9 (X11; Linux i686; U;) Gecko/20030314

Description of problem:
Wildcard imports have a number of negative consequences.

* If you are importing two packages, com.example.foo.*, com.example.bar.* and
using Wibble.java from com.example.bar. If someone then adds a Wibble.java to
com.example.foo package your build will break.

* If you are importing a package com.example.foo.*, using Wibble.java from it,
and then someone adds a Wibble.java in the local package, your build will break.

Neither of these breakages need occurr since adding a new class does not change
existing functionality.

Two other consequences of wildcard imports:

* When reading through unfamiliar code, wildcard imports make it very hard to
track down exactly which classes are referencing which packages. eg, you see a
class 'Wibble' be using, and there are 15 wildcard imports in the file, you'll
need to inspect all of these packages to figure out where the class Wibble comes
from.

* The acs-java-style.el script complains bitterly because we are violating our
own recommended coding standards, with the result that developers start ignoring
all messages reported by the style checker since weeding out those not relating
to wildcards is impractical 


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Run acs-java-style.el across any file in WAF / CMS
2.
3.
    

Actual Results:  Complaints about wildcard imports

Expected Results:  No complaints about wildcard imports

Additional info:

Comment 1 Daniel Berrangé 2006-09-02 17:25:09 UTC
Closing old tickets



Note You need to log in before you can comment on or make changes to this bug.