author | erikj |
Wed, 12 Sep 2018 08:46:25 -0700 | |
changeset 51712 | f0f5d23449d3 |
parent 50590 | 5fa19bad622d |
permissions | -rw-r--r-- |
49130
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
1 |
|
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
2 |
/* |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
3 |
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
4 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
5 |
* |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
6 |
* This code is free software; you can redistribute it and/or modify it |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
7 |
* under the terms of the GNU General Public License version 2 only, as |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
8 |
* published by the Free Software Foundation. |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
9 |
* |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
10 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
11 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
12 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
13 |
* version 2 for more details (a copy is included in the LICENSE file that |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
14 |
* accompanied this code). |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
15 |
* |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
16 |
* You should have received a copy of the GNU General Public License version |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
17 |
* 2 along with this work; if not, write to the Free Software Foundation, |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
18 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
19 |
* |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
20 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
21 |
* or visit www.oracle.com if you need additional information or have any |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
22 |
* questions. |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
23 |
*/ |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
24 |
|
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
25 |
/* |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
26 |
* @test |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
27 |
* @bug 8193660 |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
28 |
* @summary Check SOURCE line in "release" file for closedjdk |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
29 |
* @run main CheckSource |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
30 |
*/ |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
31 |
|
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
32 |
import java.io.BufferedReader; |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
33 |
import java.io.File; |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
34 |
import java.io.FileReader; |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
35 |
import java.io.FileNotFoundException; |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
36 |
import java.io.IOException; |
51712
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
37 |
import java.util.regex.Matcher; |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
38 |
import java.util.regex.Pattern; |
49130
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
39 |
|
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
40 |
public class CheckSource { |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
41 |
|
51712
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
42 |
public static final String SRC_HASH_REGEXP = ":((hg)|(git)):[a-z0-9]*\\+?"; |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
43 |
|
49130
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
44 |
CheckSource(String dataFile, boolean isOpenJDK) { |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
45 |
// Read data files |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
46 |
readFile(dataFile, isOpenJDK); |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
47 |
} |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
48 |
|
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
49 |
private void readFile(String fileName, boolean isOpenJDK) { |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
50 |
String fishForSOURCE = null; |
51712
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
51 |
String implementor = null; |
49130
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
52 |
|
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
53 |
File file = new File(fileName); |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
54 |
|
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
55 |
// open the stream to read in for Entries |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
56 |
try (BufferedReader buffRead = |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
57 |
new BufferedReader(new FileReader(fileName))) { |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
58 |
|
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
59 |
// this is the string read |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
60 |
String readIn; |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
61 |
|
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
62 |
// let's read some strings! |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
63 |
while ((readIn = buffRead.readLine()) != null) { |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
64 |
readIn = readIn.trim(); |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
65 |
|
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
66 |
// throw out blank lines |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
67 |
if (readIn.length() == 0) |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
68 |
continue; |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
69 |
|
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
70 |
// grab SOURCE line |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
71 |
if (readIn.startsWith("SOURCE=")) { |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
72 |
fishForSOURCE = readIn; |
51712
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
73 |
continue; |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
74 |
} |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
75 |
|
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
76 |
// grab IMPLEMENTOR line |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
77 |
if (readIn.startsWith("IMPLEMENTOR=")) { |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
78 |
implementor = readIn; |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
79 |
continue; |
49130
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
80 |
} |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
81 |
} |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
82 |
} catch (FileNotFoundException fileExcept) { |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
83 |
throw new RuntimeException("File " + fileName + |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
84 |
" not found reading data!", fileExcept); |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
85 |
} catch (IOException ioExcept) { |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
86 |
throw new RuntimeException("Unexpected problem reading data!", |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
87 |
ioExcept); |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
88 |
} |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
89 |
|
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
90 |
// was SOURCE even found? |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
91 |
if (fishForSOURCE == null) { |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
92 |
throw new RuntimeException("SOURCE line was not found!"); |
51712
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
93 |
} |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
94 |
System.out.println("The source string found: " + fishForSOURCE); |
49130
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
95 |
|
51712
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
96 |
// Extract the value of SOURCE= |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
97 |
Pattern valuePattern = Pattern.compile("SOURCE=\"(.*)\""); |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
98 |
Matcher valueMatcher = valuePattern.matcher(fishForSOURCE); |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
99 |
if (!valueMatcher.matches()) { |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
100 |
throw new RuntimeException("SOURCE string has bad format, should be SOURCE=\"<value>\""); |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
101 |
} |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
102 |
String valueString = valueMatcher.group(1); |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
103 |
|
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
104 |
// Check if implementor is Oracle |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
105 |
boolean isOracle = (implementor != null) && implementor.contains("Oracle Corporation"); |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
106 |
|
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
107 |
String[] values = valueString.split(" "); |
49130
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
108 |
|
51712
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
109 |
// First value MUST start with ".:" regardless of Oracle or OpenJDK |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
110 |
String rootRegexp = "\\." + SRC_HASH_REGEXP; |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
111 |
if (!values[0].matches(rootRegexp)) { |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
112 |
throw new RuntimeException("The test failed, first element did not match regexp: " + rootRegexp); |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
113 |
} |
49130
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
114 |
|
51712
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
115 |
// If it's an Oracle build, it can be either OpenJDK or OracleJDK. Other |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
116 |
// builds may have any number of additional elements in any format. |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
117 |
if (isOracle) { |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
118 |
if (isOpenJDK) { |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
119 |
if (values.length != 1) { |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
120 |
throw new RuntimeException("The test failed, wrong number of elements in SOURCE list." + |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
121 |
" Should be 1 for Oracle built OpenJDK."); |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
122 |
} |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
123 |
} else { |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
124 |
if (values.length != 2) { |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
125 |
throw new RuntimeException("The test failed, wrong number of elements in SOURCE list." + |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
126 |
" Should be 2 for OracleJDK."); |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
127 |
} |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
128 |
// Second value MUST start with "open:" for OracleJDK |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
129 |
String openRegexp = "open" + SRC_HASH_REGEXP; |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
130 |
if (!values[1].matches(openRegexp)) { |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
131 |
throw new RuntimeException("The test failed, second element did not match regexp: " + openRegexp); |
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
132 |
} |
49130
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
133 |
} |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
134 |
} |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
135 |
|
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
136 |
// Everything was fine |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
137 |
System.out.println("The test passed!"); |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
138 |
} |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
139 |
|
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
140 |
public static void main(String args[]) { |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
141 |
String jdkPath = System.getProperty("test.jdk"); |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
142 |
String runtime = System.getProperty("java.runtime.name"); |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
143 |
|
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
144 |
System.out.println("JDK Path : " + jdkPath); |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
145 |
System.out.println("Runtime Name : " + runtime); |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
146 |
|
51712
f0f5d23449d3
8210519: build/releaseFile/CheckSource.java failed additional sources found
erikj
parents:
50590
diff
changeset
|
147 |
new CheckSource(jdkPath + "/release", runtime.contains("OpenJDK")); |
49130
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
148 |
} |
4c2e97e4975a
8193660: Check SOURCE line in "release" file for closedjdk
shurailine
parents:
diff
changeset
|
149 |
} |