Skip to content
/ uncheck Public

Disables exception checking in javac and IntelliJ IDEA. Stop trying today.

License

Notifications You must be signed in to change notification settings

nnym/uncheck

Repository files navigation

This project comprises a Java compiler plugin and an IntelliJ plugin. The former modifies javac and the latter fixes the IDE's error reporting.

Features

  • no exception checking
  • statements before delegating constructor calls
  • reassigned variable capture in lambdas and inner classes
  • final field reassignment in initializers

Example

These plugins extend Java to make the following example legal.

class Example {
    final String a, b;

    Example(String a, String b) {
        this.a = a = "not effectively final";
        this.b = b;
        Runnable capturingRunnable = () -> System.out.println(a);
        Runnable throwingRunnable = Thread.currentThread()::join;
    }

    Example(String s) {
        var ab = s.split(":");
        this(ab[0], ab[1]);
    }

    void evilMethod() {
        Files.writeString(Path.of("file.txt"), "text");
        throw new IOException();
    }
}

Using the IntelliJ plugin

JetBrains Marketplace

GitHub releases: download and install manually

Using the compiler plugin

It requires Java 17 or later and is hosted as net.auoeke:uncheck at Central.

Gradle

repositories {
    mavenCentral()
}

dependencies {
    annotationProcessor("net.auoeke:uncheck:latest.release")
}

About

Disables exception checking in javac and IntelliJ IDEA. Stop trying today.

Resources

License

Stars

Watchers

Forks

Languages