Bug 108114 - Remove all wildcard imports from WAF & CMS
Remove all wildcard imports from WAF & CMS
Status: CLOSED WONTFIX
Product: Red Hat Web Application Framework
Classification: Retired
Component: other (Show other bugs)
nightly
All Linux
medium Severity medium
: ---
: ---
Assigned To: ccm-bugs-list
Jon Orris
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-10-27 13:38 EST by Daniel Berrange
Modified: 2007-04-18 12:58 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-09-02 13:39:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daniel Berrange 2003-10-27 13:38:19 EST
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 Berrange 2006-09-02 13:25:09 EDT
Closing old tickets

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