A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/3184 below:

[apex] Prevent classes from shadowing System Namespace · Issue #3184 · pmd/pmd · GitHub

We brainstormed about this rule in #2322. Believe it or not, I had the issue the other day, in a real environment. Salesforce Developers Blog has a 2012 post about it, so it's an official "feature", but pretty bad design.

Proposed Rule Name: ClassShadowsSystemNamespace TypeShadowsBuiltInNamespace

Proposed Category: Code Style Error Prone

Description:

Code Sample:

public class Database {
    public static String query() {
        return 'wherefore art thou namespace?';
    }
}

Since Database is also in System this is a violation.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4