United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-7152798 : TEST_BUG: sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java does not compile

Details
Type:
Bug
Submit Date:
2012-03-10
Status:
Resolved
Updated Date:
2014-02-21
Project Name:
JDK
Resolved Date:
2012-03-27
Component:
core-svc
OS:
generic
Sub-Component:
java.lang.management
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
8
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Relates:

Sub Tasks

Description
The jtreg tags on this test are incorrect with a result that the test is not actually compiled and run as expected. With the @build fixed then it becomes clear that this test no longer compiles:


#Test Results (version 2)
#Sat Mar 10 10:46:13 GMT 2012
#checksum:27522fb53c7f53b4
#-----testdescription-----
$file=/net/rialto/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java
$root=/net/rialto/export/Users/ab23780/ws/jdk8/tl/jdk/test
author=Steve Bohne
keywords=bug4858522
run=USER_SPECIFIED build GetClassLoadingTime ClassToLoad0\nUSER_SPECIFIED main GetClassLoadingTime\n
source=GetClassLoadingTime.java
title=Basic unit test of HotspotClassLoadingMBean.getClassLoadingTime()

#-----environment-----

#-----testresult-----
description=file\:/net/rialto/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java
elapsed=180 0\:00\:00.180
end=Sat Mar 10 10\:46\:13 GMT 2012
environment=regtest
execStatus=Failed. Compilation failed\: Compilation failed
hostname=marino.ie.oracle.com
javatestOS=SunOS 5.10 (x86)
javatestVersion=4.4
script=com.sun.javatest.regtest.RegressionScript 
sections=script_messages build compile
start=Sat Mar 10 10\:46\:13 GMT 2012
test=sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java
user.name=albatem
work=/export/Scratch/ab23780/jtreg-testing/JTwork/sun/management/HotspotClassLoadingMBean

#section:script_messages
----------messages:(4/216)----------
JDK under test: (/export/Scratch/alanb/jdk1.8)
java version "1.8.0-internal"
Java(TM) SE Runtime Environment (build 1.8.0-internal-201203081830.albatem.tl-b00)
Java HotSpot(TM) Server VM (build 24.0-b01, mixed mode)

#section:build
----------messages:(3/153)----------
command: build GetClassLoadingTime ClassToLoad0
reason: User specified action: run build GetClassLoadingTime ClassToLoad0 
elapsed time (seconds): 0.179
result: Failed. Compilation failed: Compilation failed

#section:compile
----------messages:(3/326)----------
command: compile /net/rialto/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java /net/rialto/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/management/HotspotClassLoadingMBean/ClassToLoad0.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.178
----------direct:(16/1312)----------
/net/rialto/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java:42: warning: HotspotClassLoadingMBean is internal proprietary API and may be removed in a future release
    private static HotspotClassLoadingMBean mbean =
                   ^
/net/rialto/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java:43: warning: HotspotClassLoadingMBean is internal proprietary API and may be removed in a future release
        (HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
         ^
/net/rialto/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java:43: warning: ManagementFactoryHelper is internal proprietary API and may be removed in a future release
        (HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
                                  ^
/net/rialto/export/Users/ab23780/ws/jdk8/tl/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java:75: error: cannot find symbol
        long count = mbean.getLoadedClassCount();
                          ^
  symbol:   method getLoadedClassCount()
  location: variable mbean of type HotspotClassLoadingMBean
1 error
3 warnings
result: Failed. Compilation failed: Compilation failed


test result: Failed. Compilation failed: Compilation failed

                                    

Comments
EVALUATION

The result of the call to getLoadedClassCount() is only used for trace-debugging and the call can be removed.
                                     
2012-03-13



Hardware and Software, Engineered to Work Together