[OpenJDK 2D-Dev] code review for 7067811: Update demo/sample code to state it should not be used for production

Nils Loodin nils.loodin at oracle.com
Wed Aug 24 13:11:19 UTC 2011


Finally the public changes in the bug is visible.

 From the description:

-----

The documentation should include the following disclaimer:

The source code provided with samples and demos for the JDK is meant to 
illustrate the usage of a given feature or technique and has been 
deliberately simplified. Additional steps required for a 
production-quality application, such as security checks, input 
validation, and proper error handling, might not be present in the 
sample code.

Usage of sample code in production environments is strongly discouraged.


On the actual source code a variation of the message should be included 
as a comment in the header:

This source code is provided to illustrate the usage of a given feature 
or technique and has been deliberately simplified. Additional steps 
required for a production-quality application, such as security checks, 
input validation, and proper error handling, might not be present in 
this sample code.

Finally on the documentation of applications, such as the lightweight 
HTTP server, that are shipped for testing/debugging, the following 
disclaimer should be added:

Applications such as the lightweight HTTP server are shipped with the 
JDK to help developers deploy and test their code easily.   They have 
not been developed in accordance to software development standards for 
production-quality applications. Usage of such test and/or support 
applications in production environments is strongly discouraged.

-------

Comment block after copyright in demo / sample sources,

i've excluded hprof_b_spec.h from these comments as it contains a public 
api that's actually supposed to be used.

also makefiles are updated to copy a toplevel readme in the sample and 
demo dirs.

Webrev: http://cr.openjdk.java.net/~nloodin/7067811/webrev.03/

CC:ing i18n and 2d since they have demos in these dirs.

Regards,
Nisse


On 08/15/2011 10:15 AM, Nils Loodin wrote:
>>> Nils - is it just demo code or do you plan to do this to sample code too (sample code is in src/share/sample/**)? One thing that isn't clear to me is why this needs to be added to every file. Seems like a warning in each demo's README should be sufficient.
>>>
> Also samples.
>
>> I agree with Alan that README in each demo would be a proper and adequate place to add this warning.  In addition, there is a typo "suich" in the third line of the warning:
>>
>>> * required for a production-quality application, suich as security checks,
> That was not intentional.
>
>> Is this intentional?  Or a typo should be fixed?
>>
>> Mandy
> I'm holding off sending to the other mailing lists until I can get the requirements that the text be included in each source file officially by the one who set the demand.
>
> As background, yes this is a legal thing. Oracle has strict requirements on in which form Demos and samples can be included in packaging..
>
> /Nisse
>




More information about the 2d-dev mailing list