Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Explicit Scoping #31

Open
FMCalisto opened this issue Mar 1, 2016 · 0 comments
Open

Explicit Scoping #31

FMCalisto opened this issue Mar 1, 2016 · 0 comments

Comments

@FMCalisto
Copy link

Use explicit scoping instead of the default package private level.

34
35 public class Geolocation extends CordovaPlugin {
36
37     String TAG = "GeolocationPlugin";
38     CallbackContext context;
39

Why is this an issue?

Use explicit scoping instead of the default package private level. What this means it that you should do is make all the fields within your classes private to enforce better encapsulation.

Ex:

public class Foo {
    /* private missing */ Object bar;
}

Source

Related code pattern

Enforces the use of explicit scoping

Use explicit scoping instead of the default package private level.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant