United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6856165 tests with explicit -target 1.5 fail with jdk7 since javac now defaults to 1.7
JDK-6856165 : tests with explicit -target 1.5 fail with jdk7 since javac now defaults to 1.7

Details
Type:
Bug
Submit Date:
2009-06-30
Status:
Open
Updated Date:
2013-10-11
Project Name:
JDK
Resolved Date:
Component:
hotspot
OS:
linux,generic
Sub-Component:
svc
CPU:
arm,generic
Priority:
P3
Resolution:
Unresolved
Affected Versions:
hs24,7,7u6,7u40
Targeted Versions:
tbd_minor

Related Reports
Relates:

Sub Tasks

Description
During jdk7b63 pit we discovered the following:

Due to recent changes in javac (http://ccc.sfbay.sun.com/6827026)
-target and -source now default to 1.7 (in previous build -source defaulted to 1.5)
so the following tests which explicitly specify -target 1.5 now fail with 
javac: target release 1.5 conflicts with default source release 1.7

XXX/com/sun/jdi/StepTest.java
(specified via annotation)
closed/runtime/4413696/tstc.java
(see closed/runtime/4413696/Test4413696.sh, full path: /net/sqenfs-1.sfbay/export1/comp/vm/testbase/jtreg/7/HS_REGRESSION/test/closed/runtime/4413696/Test4413696.sh
option is specified directly in the shell script.)

possible fixes may be 
- omit the option at all 
(since it defaults to 1.5/1.6 in jdk 6)
- change it to 1.7
- specify also -source 1.5 if 1.5 is required for this test.

To reproduce try
/net/sqenfs-1.sfbay/export1/comp/vm/jdk/hsx/16/pit/b05/jdk7b63/product/*/bin/javac -target 1.5
and
/net/sqenfs-1.sfbay/export1/comp/vm/jdk/hsx/16/pit/b04/jdk7b61/product/*/bin/javac -target 1.5 
and -target 1.4

Update: prefixed StepTest.java test path with 'XXX/' since that
test is being handled by 6868533. That will keep this bug from
causing StepTest.java to appear on the fail_list.

                                    

Comments
EVALUATION

Here is some analysis for XXX/com/sun/jdi/StepTest.java test only.
The "-target 1.5" option was added in the following delta:

test/com/sun/jdi/SCCS/s.StepTest.java:

D 1.10 04/01/29 11:27:33 jjh 12 11      00001/00001/00165
MRs:
COMMENTS:
Testcase fix to match : 4981566: Default javac -target in 1.5 should be 1.4
                                     
2009-08-04
closed/runtime/4413696/tstc.java passes in 8 promotion, removing hs25 affectedversion.
                                     
2013-10-11



Hardware and Software, Engineered to Work Together