[GRADLE-3539] NullPointerException from gradle --status or gradle --stop on Solaris Created: 29/Aug/16  Updated: 07/Sep/16  Resolved: 07/Sep/16

Status: Resolved
Project: Gradle
Affects Version/s: 3.0
Fix Version/s: 3.2-rc-1

Type: Bug
Reporter: Eric Wendelin Assignee: Jendrik Johannes (Inactive)
Resolution: Fixed Votes: 0


 Description   

https://discuss.gradle.org/t/nullpointerexception-with-gradle-3-0-on-solaris/19193/2

OS is Solaris 10. Started breaking after 2.12, probably in 3.0.

Seems like non-build commands sent to Daemon result in NPE.



 Comments   
Comment by Jendrik Johannes (Inactive) [ 06/Sep/16 ]

@wolf and me investigated the exception stack traces.

Looks like this is caused by an automatic unboxing of

    private final Long pid;

    public Long getPid() {
        return pid;
    }

in DefaultDaemonContext. It looks like it is only happening in exception handling cases where PID is a primitive long (DaemonStopEvent and Status). If null is valid value for PID (which seems to be the case) it Long should probably be used everywhere.

Generated at Wed Jun 30 12:51:26 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.