Click here to Skip to main content
15,397,084 members
Home / Discussions / Free Tools

Free Tools

This forum is for discussing and recommending Free tools for software development. Please post direct links to tools, and not just links to pages that review or list tools.No shareware and no commercial products allowed. Please report spammers by voting to remove their messages and reporting their accounts.

AnswerRe: Free File Explorer Component For Vb.NET - Repost Pin
Richard MacCutchan22-Jan-18 6:12
mveRichard MacCutchan22-Jan-18 6:12 
Generali want suggestion for vba password recovery Pin
romantrump12-Jan-18 3:20
Memberromantrump12-Jan-18 3:20 
GeneralRe: i want suggestion for vba password recovery Pin
jschell20-Jan-18 6:00
Memberjschell20-Jan-18 6:00 
GeneralRe: i want suggestion for vba password recovery Pin
A_Griffin20-Jan-18 7:13
MemberA_Griffin20-Jan-18 7:13 
GeneralTFS Release Notes Powershell Module Pin
vbjay.net14-Dec-17 20:16
Membervbjay.net14-Dec-17 20:16 
GeneralWorkspace Manager for Visual Studio Pin
phil.o22-Nov-17 9:08
mvephil.o22-Nov-17 9:08 
QuestionNeed a system to control endpoints in a network Pin
alsecc15-Nov-17 8:18
Memberalsecc15-Nov-17 8:18 
GeneralEnforcing null-checks in Java/Android applications Pin
Member 1351285711-Nov-17 19:52
MemberMember 1351285711-Nov-17 19:52 

1. Rationale

Null references are considered to be one of the most expensive mistakes in IT design. It's not surprising that there are numerous efforts to solve it. Here are a couple of examples from the Java world:
* Kotlin fights it at the language level
* many tools try to report it as early as possible, for example, IntelliJ IDEA can be configured to warn us about a possible NPE.

Moreover, when the code below is compiled by the IDE, it automatically inserts null-checks, i.e. given the code snippet below
public void service(@NotNull String input) {
    // Process the input

Resulting bytecode looks like if it's compiled from the following source:
public void service(@NotNull String input) {
    if (input == null) {
        throw new NullPointerException("Argument for <a href="">@NotNull</a> parameter 'input' must not be null");
    // Process the input

Kotlin really solves the problem but Java is still a very popular language, so, we have to deal with nullable values. It's not always convenient to use IntelliJ build system for compiling sources to get that null-checks and the code which explicitly ensures preconditions via checkNotNull() or explicit if (input == null) { throw new NullPointerException("<description>") } also looks not that appealing.

More common setup is to configure a build through Gradle/Maven/Ant. It would not harm to get IDE tips on possible null-related problems and that auto-generated runtime checks without explicitly putting them into code.

Current tool solves the second problem - it allows to add null-checks into *.class files during compilation based on source code annotations.

2. License

The project is licensed by MIT.

3. Design

The whole project is based on a Javac extension. It plugs into the compilation process and automatically inserts null-checks into the resulting bytecode. That can be used either explicitly from the command line or from Maven/Ant. Also, there is a Gradle plugin which simplifies the configuration for Gradle projects.

4. Usage

5. Settings

Even though it's possible to use the plugin with the default setup, there are a number of configuration options. They are described here

6. Project Resources

The documentation is available here.

The project is hosted on GitHub.

modified 14-Nov-17 1:43am.

GeneralRe: Enforcing null-checks in Java/Android applications Pin
jschell13-Nov-17 7:52
Memberjschell13-Nov-17 7:52 
GeneralRe: Enforcing null-checks in Java/Android applications Pin
Member 1351285713-Nov-17 19:45
MemberMember 1351285713-Nov-17 19:45 
GeneralRe: Enforcing null-checks in Java/Android applications Pin
jschell15-Nov-17 6:08
Memberjschell15-Nov-17 6:08 
GeneralToDo list & time tracker with Jira and GitHub integration Pin
Member 1351484810-Nov-17 11:35
MemberMember 1351484810-Nov-17 11:35 
GeneralWhich is the most reliable free antivirus for USB flash drives? Pin
priyamtheone9-Oct-17 9:29
Memberpriyamtheone9-Oct-17 9:29 
GeneralRe: Which is the most reliable free antivirus for USB flash drives? Pin
Eddy Vluggen29-Oct-17 23:38
professionalEddy Vluggen29-Oct-17 23:38 
GeneralDOSBOX Pin
RedDk19-Sep-17 7:45
MemberRedDk19-Sep-17 7:45 
GeneralAtom Pin
Joan M12-Sep-17 8:58
professionalJoan M12-Sep-17 8:58 
General7zip Pin
Joan M29-Aug-17 9:52
professionalJoan M29-Aug-17 9:52 
GeneralChange the mouse cursor to another monitor fast using keys or mouse buttons Pin
Joan M15-Aug-17 23:35
professionalJoan M15-Aug-17 23:35 
GeneralQuickhash GUI and Image USB Pin
Michael Martin6-Jul-17 22:35
professionalMichael Martin6-Jul-17 22:35 
GeneralAdobe Scan turns your documents, receipts & more into editable PDFs Pin
Kent Sharkey1-Jun-17 9:18
staffKent Sharkey1-Jun-17 9:18 
RedDk25-May-17 10:21
MemberRedDk25-May-17 10:21 
GeneralRe: EXIFTOOL Pin
Richard MacCutchan25-May-17 21:00
mveRichard MacCutchan25-May-17 21:00 
GeneralRe: EXIFTOOL Pin
Michael Haephrati11-Jun-17 10:00
mvaMichael Haephrati11-Jun-17 10:00 
GeneralRe: EXIFTOOL Pin
Richard MacCutchan11-Jun-17 21:45
mveRichard MacCutchan11-Jun-17 21:45 
GeneralProgram to Play Wave File in Batch File, with Bonus for Programmers Pin
David A. Gray9-May-17 21:25
MemberDavid A. Gray9-May-17 21:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.