代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/openjdk-1.8.0 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
diff --git a/jdk/test/java/awt/FontClass/CaptchaTest.java b/jdk/test/java/awt/FontClass/CaptchaTest.java
new file mode 100644
index 000000000..7f2ed1275
--- /dev/null
+++ b/jdk/test/java/awt/FontClass/CaptchaTest.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright © 2023 Xiaotao NAN. All rights reserved.
+ */
+import java.awt.Graphics2D;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.Random;
+
+/*
+ * @test
+ * @summary Check if the captcha can be successfully generated
+ * @author XiaotaoNAN
+ * I8ME2N(https://gitee.com/openeuler/bishengjdk-8/issues/I8ME2N?from=project-issue)
+ */
+
+public class CaptchaTest {
+
+ /**
+ * Check if the captcha can be successfully generated.
+ * @param n the number of digits int the captcha.
+ * @param fontName the font name.
+ * @throws IOException
+ */
+ public static String captchaTest(int n,String fontName) throws IOException {
+ int width = 100, height = 50;
+ BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
+ Graphics2D g = image.createGraphics();
+ g.setColor(Color.LIGHT_GRAY);
+ g.fillRect(0, 0, width, height);
+ String chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
+ Random random = new Random();
+ StringBuilder sbuffer = new StringBuilder();
+ for (int i = 0; i < n; i++) {
+ int index = random.nextInt(chars.length());
+ char c = chars.charAt(index);
+ sbuffer.append(c);
+ g.setColor(new Color(random.nextInt(255), random.nextInt(255), random.nextInt(255)));
+ g.setFont(new Font(fontName, Font.BOLD, 25));
+ g.drawString(Character.toString(c), 20 + i * 15, 25);
+ }
+ image.flush();
+ g.dispose();
+ return sbuffer.toString();
+ }
+
+ public static void main(String[] args) throws IOException {
+ String captcha = captchaTest(4,"Times New Roman");
+ System.out.println(captcha);
+ }
+
+}
diff --git a/jdk/test/java/security/Provider/SunJCEValidator.java b/jdk/test/java/security/Provider/SunJCEValidator.java
index 314abb380..e6b9f18ad 100644
--- a/jdk/test/java/security/Provider/SunJCEValidator.java
+++ b/jdk/test/java/security/Provider/SunJCEValidator.java
@@ -37,10 +37,10 @@
*- @TestCaseType:Function test
*- @RequirementID:AR.SR.IREQ02758058.001.001
*- @RequirementName: java.security.Provider.getService() is synchronized and became scalability bottleneck
- *- @Condition:JDK8u302及以后
- *- @Brief:测试相应provider更改底层架构以后所提供的service是否与原先有差异(以openJDK8u302为准)
- * -#step:比较openJDK8u302 SunJceProvider与此特性修改后的SunJceProvider所提供的service是否一致
- *- @Expect:正常运行
+ *- @Condition:JDK8u302 and later
+ *- @Brief:Check whether the service provided by the corresponding provider after changing the underlying architecture is different from the original one (subject to openJDK8u302)
+ * -#step:Compare whether the service provided by openJDK8u302 SunJceProvider is consistent with the modified SunJceProvider with this feature
+ *- @Expect:Normal Running
*- @Priority:Level 1
*/
diff --git a/jdk/test/java/security/Provider/SunJSSEValidator.java b/jdk/test/java/security/Provider/SunJSSEValidator.java
index 5817c3b7f..0cf0663a4 100644
--- a/jdk/test/java/security/Provider/SunJSSEValidator.java
+++ b/jdk/test/java/security/Provider/SunJSSEValidator.java
@@ -37,10 +37,10 @@
*- @TestCaseType:Function test
*- @RequirementID:AR.SR.IREQ02758058.001.001
*- @RequirementName: java.security.Provider.getService() is synchronized and became scalability bottleneck
- *- @Condition:JDK8u302及以后
- *- @Brief:测试相应provider更改底层架构以后所提供的service是否与原先有差异(以openJDK8u302为准)
- * -#step:比较openJDK8u302 SunJSSEProvider与此特性修改后的SunJSSEProvider所提供的service是否一致
- *- @Expect:正常运行
+ *- @Condition:JDK8u302 and later
+ *- @Brief:Check whether the service provided by the corresponding provider after changing the underlying architecture is different from the original one (subject to openJDK8u302)
+ * -#step:Compare whether the service provided by openJDK8u302 SunJSSEProvider is consistent with the modified SunJSSEProvider with this feature
+ *- @Expect:Normal Running
*- @Priority:Level 1
*/
diff --git a/jdk/test/java/security/Provider/SunRsaSignValidator.java b/jdk/test/java/security/Provider/SunRsaSignValidator.java
index 66fb33a44..ddcf6107b 100644
--- a/jdk/test/java/security/Provider/SunRsaSignValidator.java
+++ b/jdk/test/java/security/Provider/SunRsaSignValidator.java
@@ -37,10 +37,10 @@
*- @TestCaseType:Function test
*- @RequirementID:AR.SR.IREQ02758058.001.001
*- @RequirementName: java.security.Provider.getService() is synchronized and became scalability bottleneck
- *- @Condition:JDK8u302及以后
- *- @Brief:测试相应provider更改底层架构以后所提供的service是否与原先有差异(以openJDK8u302为准)
- * -#step:比较openJDK8u302 SunRsaSignProvider与此特性修改后的SunRsaSignProvider所提供的service是否一致
- *- @Expect:正常运行
+ *- @Condition:JDK8u302 and later
+ *- @Brief:Check whether the service provided by the corresponding provider after changing the underlying architecture is different from the original one (subject to openJDK8u302).
+ * -#step:Compare whether the service provided by openJDK8u302 SunRsaSignProvider is consistent with the modified SunRsaSignProvider with this feature.
+ *- @Expect:Normal Running.
*- @Priority:Level 1
*/
diff --git a/jdk/test/java/security/Provider/SunValidator.java b/jdk/test/java/security/Provider/SunValidator.java
index 3f4b81222..b1fc38303 100644
--- a/jdk/test/java/security/Provider/SunValidator.java
+++ b/jdk/test/java/security/Provider/SunValidator.java
@@ -37,10 +37,10 @@
*- @TestCaseType:Function test
*- @RequirementID:AR.SR.IREQ02758058.001.001
*- @RequirementName: java.security.Provider.getService() is synchronized and became scalability bottleneck
- *- @Condition:JDK8u302及以后
- *- @Brief:测试相应provider更改底层架构以后所提供的service是否与原先有差异(以openJDK8u302为准)
- * -#step:比较openJDK8u302 SunProvider与此特性修改后的SunProvider所提供的service是否一致
- *- @Expect:正常运行
+ *- @Condition:JDK8u302 and later
+ *- @Brief:Check whether the service provided by the corresponding provider after changing the underlying architecture is different from the original one (subject to openJDK8u302).
+ * -#step:Compare whether the service provided by openJDK8u302 SunProvider is consistent with the modified SunProvider with this feature.
+ *- @Expect:Normal Running.
*- @Priority:Level 1
*/
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。