The two lines making up the if and the throw are wasted. They serve only to make the program fatter and slower. In Java, new is not permitted to return null . If it does, the JVM is most likely crashing and the test isn't going to help. This 'if' test won't compile.
Many classes override the default equals method to do something more useful.
The String class, for example, tests whether the two Strings contain the same characters in the same order. The Integer class overrides equals to test whether the contained int values are the same. Thus, these reads and writes need not be synchronized. The guarantee applies only to reading and writing, however. Read current setting of 'value'.