|
1 | 1 | /*
|
2 |
| - * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
4 | 4 | *
|
5 | 5 | * This code is free software; you can redistribute it and/or modify it
|
|
22 | 22 | * or visit www.oracle.com if you need additional information or have any
|
23 | 23 | * questions.
|
24 | 24 | */
|
25 |
| -package com.oracle.svm.core.jdk; |
| 25 | + |
| 26 | +package com.oracle.svm.webimage.substitute; |
26 | 27 |
|
27 | 28 | import java.util.Calendar;
|
28 | 29 | import java.util.GregorianCalendar;
|
|
43 | 44 | */
|
44 | 45 |
|
45 | 46 | @TargetClass(java.util.Calendar.class)
|
46 |
| -final class Target_java_util_Calendar { |
| 47 | +final class Target_java_util_Calendar_Web { |
47 | 48 |
|
48 | 49 | @Substitute
|
49 | 50 | private static Calendar createCalendar(TimeZone zone, Locale aLocale) {
|
50 | 51 | return new GregorianCalendar(zone, aLocale);
|
51 | 52 | }
|
52 | 53 | }
|
53 | 54 |
|
54 |
| -@TargetClass(sun.util.calendar.CalendarSystem.class) |
55 |
| -final class Target_sun_util_calendar_CalendarSystem { |
| 55 | +@TargetClass(CalendarSystem.class) |
| 56 | +final class Target_sun_util_calendar_CalendarSystem_Web { |
56 | 57 |
|
57 | 58 | @Substitute
|
58 | 59 | private static CalendarSystem forName(String calendarName) {
|
59 | 60 | if ("gregorian".equals(calendarName)) {
|
60 |
| - return Util_sun_util_calendar_CalendarSystem.GREGORIAN; |
| 61 | + return Util_sun_util_calendar_CalendarSystem_Web.GREGORIAN; |
61 | 62 | } else if ("japanese".equals(calendarName)) {
|
62 |
| - return Util_sun_util_calendar_CalendarSystem.JAPANESE; |
| 63 | + return Util_sun_util_calendar_CalendarSystem_Web.JAPANESE; |
63 | 64 | } else if ("julian".equals(calendarName)) {
|
64 |
| - return Util_sun_util_calendar_CalendarSystem.JULIAN; |
| 65 | + return Util_sun_util_calendar_CalendarSystem_Web.JULIAN; |
65 | 66 | } else {
|
66 | 67 | throw VMError.unsupportedFeature("CalendarSystem.forName " + calendarName);
|
67 | 68 | }
|
68 | 69 | }
|
69 | 70 | }
|
70 | 71 |
|
71 |
| -final class Util_sun_util_calendar_CalendarSystem { |
72 |
| - |
| 72 | +final class Util_sun_util_calendar_CalendarSystem_Web { |
73 | 73 | // The static fields are initialized during native image generation.
|
74 | 74 | static final CalendarSystem GREGORIAN = CalendarSystem.forName("gregorian");
|
75 | 75 | static final CalendarSystem JAPANESE = CalendarSystem.forName("japanese");
|
76 | 76 | static final CalendarSystem JULIAN = CalendarSystem.forName("julian");
|
77 | 77 | }
|
78 | 78 |
|
79 | 79 | /** Dummy class to have a class with the file's name. */
|
80 |
| -public final class CalendarSubstitutions { |
| 80 | +public final class WebImageCalendarSubstitutions { |
81 | 81 | }
|
0 commit comments