Oops: No Copied Java Code Or Weapons Of Mass Destruction Found In Android

Sometimes the pure inaccuracy of what is posted on the web leaves us speechless. Especially when it is picked up and repeated as a gospel by otherwise reputable sites like Engadget. “Google copied the Java code from Oracle, pasted in a new license and shipped it,” they reported this morning.

Sorry, but that’s just not true.

It all started with an article written by Florian Mueller, who is neither a lawyer nor a developer although he plays one on television. I downloaded and reviewed all the files he wrote to, and my analysis as an expert developer comes to a completely different conclusion than Mr. Mueller’s. Here is what I found:

There are two sets of files in question. The first set of 7 (PolicyNodeImpl.java, AclEntryImpl.java, AclImpl.java, GroupImpl.java, OwnerImpl.java, PermissionImpl.java, and PrincipalImpl.java) can be found in the unit test area of ​​the source code tree. As any programmer will tell you, you don’t ship your unit tests with your product. Unit tests are tools used internally to ensure the quality of the software before it is shipped.

The second set of 37 files is actually compressed into a file called MMAPI.zip and stored in a directory used for native code audio drivers for a particular type of chipset. Florian really had to dig for this one. I rechecked the make files and it is clear that this file does not come with Android either. Someone mistakenly downloaded it and it should just be deleted.

I found a strange thing about the first 7 files. Sun has posted these files on its website to help developers debug and test their own code. For some reason, the Android or Harmony developer who was using them decompiled and rebuilt them instead of just using Sun’s ones. Later, an Apache license was improperly pasted on top of the files, possibly by an automated script. The solution to this heartbreaking conspiracy? Replace them with the original Sun files that contain the correct comments. Or just delete them. After all, they don’t come with Android.

Update: Looks like Google has already supported these files. PolicyNodeImpl.java was removed from the source tree on October 30, 2010. The remaining 6 java files and a few others were removed on January 14, 2011. Developer Dan Bornstein’s validation comment reads: “Remove Tests unnecessary “. You can always go back in history to see older versions.

Unfortunately, while sensational articles like those from Engadget and Mueller will be splashed all over the web and lavished with thousands of views and hundreds of comments, The Boring Truth will not pay such attention.

Comments are closed.