Suppress Warnings

Constants for @SuppressWarnings annotations

License

License

GroupId

GroupId

com.github.sebhoss
ArtifactId

ArtifactId

suppress-warnings
Last Version

Last Version

3.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Suppress Warnings
Constants for @SuppressWarnings annotations
Project URL

Project URL

https://github.com/sebhoss/suppress-warnings
Project Organization

Project Organization

sebhoss
Source Code Management

Source Code Management

https://github.com/sebhoss/suppress-warnings

Download suppress-warnings

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.sebhoss/suppress-warnings/ -->
<dependency>
    <groupId>com.github.sebhoss</groupId>
    <artifactId>suppress-warnings</artifactId>
    <version>3.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.sebhoss/suppress-warnings/
implementation 'com.github.sebhoss:suppress-warnings:3.0.0'
// https://jarcasting.com/artifacts/com.github.sebhoss/suppress-warnings/
implementation ("com.github.sebhoss:suppress-warnings:3.0.0")
'com.github.sebhoss:suppress-warnings:jar:3.0.0'
<dependency org="com.github.sebhoss" name="suppress-warnings" rev="3.0.0">
  <artifact name="suppress-warnings" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.sebhoss', module='suppress-warnings', version='3.0.0')
)
libraryDependencies += "com.github.sebhoss" % "suppress-warnings" % "3.0.0"
[com.github.sebhoss/suppress-warnings "3.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Suppress-Warnings Discuss on Google Groups Chat on IRC

CC Zero Maven Central Read JavaDocs Repository size Open Hub statistics

Build Status Coverity Scan Result Codacy Code Quality Can this project be forked? Is this thing still maintained? Bounties on open tickets

Java utility library which contains constants for @SuppressWarnings annotations.

Usage

Use the CompilerWarnings class to suppress compiler warnings like this:

@SuppressWarnings(CompilerWarnings.NLS)
final String myText = "hello world!";

Add de.xn__ho_hia.quality.suppression.CompilerWarnings.* as a favorite to your IDE, e.g. use Java > Editor > Content Assist > Favorites in Eclipse. This allows will instruct Eclipse to auto import the constant you specified statically which reduces the code to this:

@SuppressWarnings(NLS)
final String myText = "hello world!";

Take a look at the JavaDoc to see a list of all available constants. All of them contain a (short) description which should help out developers who have not seen those suppressions before. Referencing those constants instead of using plain strings will make sure that all suppressions are correct.

Integration

To use this project just declare the following dependency inside your POM:

<dependency>
  <groupId>de.xn--ho-hia.quality</groupId>
  <artifactId>suppress-warnings</artifactId>
  <version>${version.suppress-warnings}</version>
</dependency

Replace ${version.suppress-warnings} with the latest release. This project follows the semantic versioning guidelines.

Compatibility

This project is compatible with the following Java versions:

Table 1. Java compatibility
4.X.Y

Java 8

License

To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.

You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see http://creativecommons.org/publicdomain/zero/1.0/.

Versions

Version
3.0.0
2.0.0
1.0.0