---
title: Check variable assignment language
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > Code Security > Static Code Analysis (SAST) > SAST
  Rules > Check variable assignment language
---

# Check variable assignment language

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ().
{% /alert %}

{% /callout %}

## Metadata{% #metadata %}

**ID:** `java-inclusive/variable-assignment`

**Language:** Java

**Severity:** Notice

**Category:** Best Practices

## Description{% #description %}

Ensure that certain words are not used in the codebase and suggest alternatives when appropriate.

Examples of alternative suggestions:

- `blacklist` with `denylist`
- `whitelist` with `allowlist`
- `master` with `primary`
- `slave` with `secondary`

## Non-Compliant Code Examples{% #non-compliant-code-examples %}

```java
class Blacklist {
    void blacklist() {
        whitelist = 1;
        this.whitelist = 1;
    }

    int BlackList(int WhiteList) {
        int blacklist = 42;
    }
}
```

## Compliant Code Examples{% #compliant-code-examples %}

```java
class AllowList {
    void allowlist() {
        allowlist = 1;
    }

    int AllowList(int AllowList) {
        int denylist = 42;
    }
}
```
  Seamless integrations. Try Datadog Code SecurityDatadog Code Security 
{% icon name="icon-external-link" /%}
 