Some legal question regarding rewriting some Java code in JRuby

I just rewrote the DefaultTableCellRender in JRuby with some minor
modifications. Since I would like to include this code in my open source
JRuby framework I would like to know how to do this without getting into
any trouble. The code is based on the DefaultTableCellRender of the Open
JDK source code.

Regards
Roger