United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6895003 JarReorder is not excluding a requested file.
JDK-6895003 : JarReorder is not excluding a requested file.

Details
Type:
Bug
Submit Date:
2009-10-25
Status:
Resolved
Updated Date:
2010-07-21
Project Name:
JDK
Resolved Date:
2010-07-21
Component:
infrastructure
OS:
generic
Sub-Component:
build
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Backport:
Relates:
Relates:
Relates:

Sub Tasks

Description
rt.jar goes through several steps as it's being built, and the end result is that there's a crypto file that's not supposed to be in rt.jar.  Isn't NOT_RT_JAR_LIST supposed to throttle all classes not supposed to be in rt.jar?

> I notice on Solaris that javax.crypto.SecretKey is in rt.jar but on
> Linux and Windows it's in jce.jar.

It's actually in both jars on Solaris.  It definitely not supposed to be in rt.jar.  I don't know why this file and only this file from javax.crypto showed up in rt.jar, and only on solaris builds.

jdk/make/common:

NOT_RT_JAR_LIST = $(ABS_TEMPDIR)/not_rt_jar.list

$(NOT_RT_JAR_LIST): FRC
        $(prep-target)
        $(ECHO) "#\n" >> $@
        $(ECHO) "# List of subdirectories not in include in rt.jar" >> $@
        $(ECHO) "# Directories must contain trailing '/'." >> $@
...deleted...
        $(ECHO) "javax/crypto/" >> $@
...deleted...

$(TOTAL_JAR_FILELIST): $(JARREORDER_JARFILE) $(NOT_RT_JAR_LIST)
        $(prep-target)
        $(RM) $@.temp
        ($(CD) $(CLASSBINDIR) && \
            $(BOOT_JAVA_CMD) -jar $(JARREORDER_JARFILE) \
                -o  $@.temp $(ABS_LIBDIR)/classlist $(NOT_RT_JAR_LIST) . )
        $(MV) $@.temp $@
        @($(CD) $(CLASSBINDIR) && $(java-vm-cleanup))

% grep javax.crypto \
    /java/re/jdk/7/nightly/ws/build/solaris-sparc/tmp/not_rt_jar.list
javax/crypto
% jar -tvf /java/re/jdk/7/nightly/binaries/solaris-sparc/latest/jre/lib/rt.jar \
    | grep javax.crypto
201 Sun Oct 25 03:51:20 PDT 2009 javax/crypto/SecretKey.class

                                    

Comments
EVALUATION

javax.crypto.SecretKey is listed as a class for class sharing, in file jdk/make/tools/sharing/classlist.solaris

Apparently the exclude list takes backseat to the classlist. That seems wrong.

Easy fix is to delete this class name from the classlist.solaris file.
                                     
2009-11-10
EVALUATION

Is this a dup of 6518378??
                                     
2009-11-26
EVALUATION

I'll assume that 6518378 will address the specific issue of SecretKey being in the classlist.

I'll assume this CR is to fix the JarReorder tool to always exclude anything in the supplied list that should not be included per the include/exclude specs. Exclude lists should always be obeyed.
                                     
2009-11-30
EVALUATION

http://hg.openjdk.java.net/jdk7/tl/jdk/rev/848e69fcf2f3
                                     
2010-06-23



Hardware and Software, Engineered to Work Together