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

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

Attachments (Terms of Use)

Description Daniel Berrange 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

* 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:

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

Actual Results:  Complaints about wildcard imports

Expected Results:  No complaints about wildcard imports

Additional info:

Comment 1 Daniel Berrange 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.