Java Code Examples for sun.util.logging.PlatformLogger#warning()
The following examples show how to use
sun.util.logging.PlatformLogger#warning() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractChronology.java From j2objc with Apache License 2.0 | 5 votes |
/** * Initialization of the maps from id and type to Chronology. * The ServiceLoader is used to find and register any implementations * of {@link java.time.chrono.AbstractChronology} found in the bootclass loader. * The built-in chronologies are registered explicitly. * Calendars configured via the Thread's context classloader are local * to that thread and are ignored. * <p> * The initialization is done only once using the registration * of the IsoChronology as the test and the final step. * Multiple threads may perform the initialization concurrently. * Only the first registration of each Chronology is retained by the * ConcurrentHashMap. * @return true if the cache was initialized */ private static boolean initCache() { if (CHRONOS_BY_ID.get("ISO") == null) { // Initialization is incomplete // Register built-in Chronologies /* /* J2ObjC removed: Only "gregorian" and "julian" calendars are supported. registerChrono(HijrahChronology.INSTANCE); registerChrono(JapaneseChronology.INSTANCE); registerChrono(MinguoChronology.INSTANCE); registerChrono(ThaiBuddhistChronology.INSTANCE); */ // Register Chronologies from the ServiceLoader @SuppressWarnings("rawtypes") ServiceLoader<AbstractChronology> loader = ServiceLoader.load(AbstractChronology.class, null); for (AbstractChronology chrono : loader) { String id = chrono.getId(); if (id.equals("ISO") || registerChrono(chrono) != null) { // Log the attempt to replace an existing Chronology PlatformLogger logger = PlatformLogger.getLogger("java.time.chrono"); logger.warning("Ignoring duplicate Chronology, from ServiceLoader configuration " + id); } } // finally, register IsoChronology to mark initialization is complete registerChrono(IsoChronology.INSTANCE); return true; } return false; }
Example 2
Source File: PlatformLoggerTest.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private static void testLogMethods(PlatformLogger logger) { logger.severe("Test severe(String, Object...) {0} {1}", new Long(1), "string"); // test Object[] logger.severe("Test severe(String, Object...) {0}", (Object[]) getPoints()); logger.warning("Test warning(String, Throwable)", new Throwable("Testing")); logger.info("Test info(String)"); }
Example 3
Source File: AbstractChronology.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Initialization of the maps from id and type to Chronology. * The ServiceLoader is used to find and register any implementations * of {@link java.time.chrono.AbstractChronology} found in the bootclass loader. * The built-in chronologies are registered explicitly. * Calendars configured via the Thread's context classloader are local * to that thread and are ignored. * <p> * The initialization is done only once using the registration * of the IsoChronology as the test and the final step. * Multiple threads may perform the initialization concurrently. * Only the first registration of each Chronology is retained by the * ConcurrentHashMap. * @return true if the cache was initialized */ private static boolean initCache() { if (CHRONOS_BY_ID.get("ISO") == null) { // Initialization is incomplete // Register built-in Chronologies registerChrono(HijrahChronology.INSTANCE); registerChrono(JapaneseChronology.INSTANCE); registerChrono(MinguoChronology.INSTANCE); registerChrono(ThaiBuddhistChronology.INSTANCE); // Register Chronologies from the ServiceLoader @SuppressWarnings("rawtypes") ServiceLoader<AbstractChronology> loader = ServiceLoader.load(AbstractChronology.class, null); for (AbstractChronology chrono : loader) { String id = chrono.getId(); if (id.equals("ISO") || registerChrono(chrono) != null) { // Log the attempt to replace an existing Chronology PlatformLogger logger = PlatformLogger.getLogger("java.time.chrono"); logger.warning("Ignoring duplicate Chronology, from ServiceLoader configuration " + id); } } // finally, register IsoChronology to mark initialization is complete registerChrono(IsoChronology.INSTANCE); return true; } return false; }
Example 4
Source File: AbstractChronology.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Initialization of the maps from id and type to Chronology. * The ServiceLoader is used to find and register any implementations * of {@link java.time.chrono.AbstractChronology} found in the bootclass loader. * The built-in chronologies are registered explicitly. * Calendars configured via the Thread's context classloader are local * to that thread and are ignored. * <p> * The initialization is done only once using the registration * of the IsoChronology as the test and the final step. * Multiple threads may perform the initialization concurrently. * Only the first registration of each Chronology is retained by the * ConcurrentHashMap. * @return true if the cache was initialized */ private static boolean initCache() { if (CHRONOS_BY_ID.get("ISO") == null) { // Initialization is incomplete // Register built-in Chronologies registerChrono(HijrahChronology.INSTANCE); registerChrono(JapaneseChronology.INSTANCE); registerChrono(MinguoChronology.INSTANCE); registerChrono(ThaiBuddhistChronology.INSTANCE); // Register Chronologies from the ServiceLoader @SuppressWarnings("rawtypes") ServiceLoader<AbstractChronology> loader = ServiceLoader.load(AbstractChronology.class, null); for (AbstractChronology chrono : loader) { String id = chrono.getId(); if (id.equals("ISO") || registerChrono(chrono) != null) { // Log the attempt to replace an existing Chronology PlatformLogger logger = PlatformLogger.getLogger("java.time.chrono"); logger.warning("Ignoring duplicate Chronology, from ServiceLoader configuration " + id); } } // finally, register IsoChronology to mark initialization is complete registerChrono(IsoChronology.INSTANCE); return true; } return false; }
Example 5
Source File: PlatformLoggerTest.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
private static void testLogMethods(PlatformLogger logger) { logger.severe("Test severe(String, Object...) {0} {1}", new Long(1), "string"); // test Object[] logger.severe("Test severe(String, Object...) {0}", (Object[]) getPoints()); logger.warning("Test warning(String, Throwable)", new Throwable("Testing")); logger.info("Test info(String)"); }
Example 6
Source File: AbstractChronology.java From Java8CN with Apache License 2.0 | 5 votes |
/** * Initialization of the maps from id and type to Chronology. * The ServiceLoader is used to find and register any implementations * of {@link java.time.chrono.AbstractChronology} found in the bootclass loader. * The built-in chronologies are registered explicitly. * Calendars configured via the Thread's context classloader are local * to that thread and are ignored. * <p> * The initialization is done only once using the registration * of the IsoChronology as the test and the final step. * Multiple threads may perform the initialization concurrently. * Only the first registration of each Chronology is retained by the * ConcurrentHashMap. * @return true if the cache was initialized */ private static boolean initCache() { if (CHRONOS_BY_ID.get("ISO") == null) { // Initialization is incomplete // Register built-in Chronologies registerChrono(HijrahChronology.INSTANCE); registerChrono(JapaneseChronology.INSTANCE); registerChrono(MinguoChronology.INSTANCE); registerChrono(ThaiBuddhistChronology.INSTANCE); // Register Chronologies from the ServiceLoader @SuppressWarnings("rawtypes") ServiceLoader<AbstractChronology> loader = ServiceLoader.load(AbstractChronology.class, null); for (AbstractChronology chrono : loader) { String id = chrono.getId(); if (id.equals("ISO") || registerChrono(chrono) != null) { // Log the attempt to replace an existing Chronology PlatformLogger logger = PlatformLogger.getLogger("java.time.chrono"); logger.warning("Ignoring duplicate Chronology, from ServiceLoader configuration " + id); } } // finally, register IsoChronology to mark initialization is complete registerChrono(IsoChronology.INSTANCE); return true; } return false; }
Example 7
Source File: PlatformLoggerTest.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
private static void testLogMethods(PlatformLogger logger) { logger.severe("Test severe(String, Object...) {0} {1}", new Long(1), "string"); // test Object[] logger.severe("Test severe(String, Object...) {0}", (Object[]) getPoints()); logger.warning("Test warning(String, Throwable)", new Throwable("Testing")); logger.info("Test info(String)"); }
Example 8
Source File: AbstractChronology.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Initialization of the maps from id and type to Chronology. * The ServiceLoader is used to find and register any implementations * of {@link java.time.chrono.AbstractChronology} found in the bootclass loader. * The built-in chronologies are registered explicitly. * Calendars configured via the Thread's context classloader are local * to that thread and are ignored. * <p> * The initialization is done only once using the registration * of the IsoChronology as the test and the final step. * Multiple threads may perform the initialization concurrently. * Only the first registration of each Chronology is retained by the * ConcurrentHashMap. * @return true if the cache was initialized */ private static boolean initCache() { if (CHRONOS_BY_ID.get("ISO") == null) { // Initialization is incomplete // Register built-in Chronologies registerChrono(HijrahChronology.INSTANCE); registerChrono(JapaneseChronology.INSTANCE); registerChrono(MinguoChronology.INSTANCE); registerChrono(ThaiBuddhistChronology.INSTANCE); // Register Chronologies from the ServiceLoader @SuppressWarnings("rawtypes") ServiceLoader<AbstractChronology> loader = ServiceLoader.load(AbstractChronology.class, null); for (AbstractChronology chrono : loader) { String id = chrono.getId(); if (id.equals("ISO") || registerChrono(chrono) != null) { // Log the attempt to replace an existing Chronology PlatformLogger logger = PlatformLogger.getLogger("java.time.chrono"); logger.warning("Ignoring duplicate Chronology, from ServiceLoader configuration " + id); } } // finally, register IsoChronology to mark initialization is complete registerChrono(IsoChronology.INSTANCE); return true; } return false; }
Example 9
Source File: AbstractChronology.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Initialization of the maps from id and type to Chronology. * The ServiceLoader is used to find and register any implementations * of {@link java.time.chrono.AbstractChronology} found in the bootclass loader. * The built-in chronologies are registered explicitly. * Calendars configured via the Thread's context classloader are local * to that thread and are ignored. * <p> * The initialization is done only once using the registration * of the IsoChronology as the test and the final step. * Multiple threads may perform the initialization concurrently. * Only the first registration of each Chronology is retained by the * ConcurrentHashMap. * @return true if the cache was initialized */ private static boolean initCache() { if (CHRONOS_BY_ID.get("ISO") == null) { // Initialization is incomplete // Register built-in Chronologies registerChrono(HijrahChronology.INSTANCE); registerChrono(JapaneseChronology.INSTANCE); registerChrono(MinguoChronology.INSTANCE); registerChrono(ThaiBuddhistChronology.INSTANCE); // Register Chronologies from the ServiceLoader @SuppressWarnings("rawtypes") ServiceLoader<AbstractChronology> loader = ServiceLoader.load(AbstractChronology.class, null); for (AbstractChronology chrono : loader) { String id = chrono.getId(); if (id.equals("ISO") || registerChrono(chrono) != null) { // Log the attempt to replace an existing Chronology PlatformLogger logger = PlatformLogger.getLogger("java.time.chrono"); logger.warning("Ignoring duplicate Chronology, from ServiceLoader configuration " + id); } } // finally, register IsoChronology to mark initialization is complete registerChrono(IsoChronology.INSTANCE); return true; } return false; }
Example 10
Source File: AbstractChronology.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Initialization of the maps from id and type to Chronology. * The ServiceLoader is used to find and register any implementations * of {@link java.time.chrono.AbstractChronology} found in the bootclass loader. * The built-in chronologies are registered explicitly. * Calendars configured via the Thread's context classloader are local * to that thread and are ignored. * <p> * The initialization is done only once using the registration * of the IsoChronology as the test and the final step. * Multiple threads may perform the initialization concurrently. * Only the first registration of each Chronology is retained by the * ConcurrentHashMap. * @return true if the cache was initialized */ private static boolean initCache() { if (CHRONOS_BY_ID.get("ISO") == null) { // Initialization is incomplete // Register built-in Chronologies registerChrono(HijrahChronology.INSTANCE); registerChrono(JapaneseChronology.INSTANCE); registerChrono(MinguoChronology.INSTANCE); registerChrono(ThaiBuddhistChronology.INSTANCE); // Register Chronologies from the ServiceLoader @SuppressWarnings("rawtypes") ServiceLoader<AbstractChronology> loader = ServiceLoader.load(AbstractChronology.class, null); for (AbstractChronology chrono : loader) { String id = chrono.getId(); if (id.equals("ISO") || registerChrono(chrono) != null) { // Log the attempt to replace an existing Chronology PlatformLogger logger = PlatformLogger.getLogger("java.time.chrono"); logger.warning("Ignoring duplicate Chronology, from ServiceLoader configuration " + id); } } // finally, register IsoChronology to mark initialization is complete registerChrono(IsoChronology.INSTANCE); return true; } return false; }
Example 11
Source File: AbstractChronology.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Initialization of the maps from id and type to Chronology. * The ServiceLoader is used to find and register any implementations * of {@link java.time.chrono.AbstractChronology} found in the bootclass loader. * The built-in chronologies are registered explicitly. * Calendars configured via the Thread's context classloader are local * to that thread and are ignored. * <p> * The initialization is done only once using the registration * of the IsoChronology as the test and the final step. * Multiple threads may perform the initialization concurrently. * Only the first registration of each Chronology is retained by the * ConcurrentHashMap. * @return true if the cache was initialized */ private static boolean initCache() { if (CHRONOS_BY_ID.get("ISO") == null) { // Initialization is incomplete // Register built-in Chronologies registerChrono(HijrahChronology.INSTANCE); registerChrono(JapaneseChronology.INSTANCE); registerChrono(MinguoChronology.INSTANCE); registerChrono(ThaiBuddhistChronology.INSTANCE); // Register Chronologies from the ServiceLoader @SuppressWarnings("rawtypes") ServiceLoader<AbstractChronology> loader = ServiceLoader.load(AbstractChronology.class, null); for (AbstractChronology chrono : loader) { String id = chrono.getId(); if (id.equals("ISO") || registerChrono(chrono) != null) { // Log the attempt to replace an existing Chronology PlatformLogger logger = PlatformLogger.getLogger("java.time.chrono"); logger.warning("Ignoring duplicate Chronology, from ServiceLoader configuration " + id); } } // finally, register IsoChronology to mark initialization is complete registerChrono(IsoChronology.INSTANCE); return true; } return false; }
Example 12
Source File: AbstractChronology.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * Initialization of the maps from id and type to Chronology. * The ServiceLoader is used to find and register any implementations * of {@link java.time.chrono.AbstractChronology} found in the bootclass loader. * The built-in chronologies are registered explicitly. * Calendars configured via the Thread's context classloader are local * to that thread and are ignored. * <p> * The initialization is done only once using the registration * of the IsoChronology as the test and the final step. * Multiple threads may perform the initialization concurrently. * Only the first registration of each Chronology is retained by the * ConcurrentHashMap. * @return true if the cache was initialized */ private static boolean initCache() { if (CHRONOS_BY_ID.get("ISO") == null) { // Initialization is incomplete // Register built-in Chronologies registerChrono(HijrahChronology.INSTANCE); registerChrono(JapaneseChronology.INSTANCE); registerChrono(MinguoChronology.INSTANCE); registerChrono(ThaiBuddhistChronology.INSTANCE); // Register Chronologies from the ServiceLoader @SuppressWarnings("rawtypes") ServiceLoader<AbstractChronology> loader = ServiceLoader.load(AbstractChronology.class, null); for (AbstractChronology chrono : loader) { String id = chrono.getId(); if (id.equals("ISO") || registerChrono(chrono) != null) { // Log the attempt to replace an existing Chronology PlatformLogger logger = PlatformLogger.getLogger("java.time.chrono"); logger.warning("Ignoring duplicate Chronology, from ServiceLoader configuration " + id); } } // finally, register IsoChronology to mark initialization is complete registerChrono(IsoChronology.INSTANCE); return true; } return false; }
Example 13
Source File: PlatformLoggerTest.java From hottub with GNU General Public License v2.0 | 5 votes |
private static void testLogMethods(PlatformLogger logger) { logger.severe("Test severe(String, Object...) {0} {1}", new Long(1), "string"); // test Object[] logger.severe("Test severe(String, Object...) {0}", (Object[]) getPoints()); logger.warning("Test warning(String, Throwable)", new Throwable("Testing")); logger.info("Test info(String)"); }
Example 14
Source File: PlatformLoggerTest.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
private static void testLogMethods(PlatformLogger logger) { logger.severe("Test severe(String, Object...) {0} {1}", new Long(1), "string"); // test Object[] logger.severe("Test severe(String, Object...) {0}", (Object[]) getPoints()); logger.warning("Test warning(String, Throwable)", new Throwable("Testing")); logger.info("Test info(String)"); }
Example 15
Source File: FcFontConfiguration.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
private static void warning(String msg) { PlatformLogger logger = PlatformLogger.getLogger("sun.awt.FontConfiguration"); logger.warning(msg); }
Example 16
Source File: FcFontConfiguration.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
private static void warning(String msg) { PlatformLogger logger = PlatformLogger.getLogger("sun.awt.FontConfiguration"); logger.warning(msg); }
Example 17
Source File: FcFontConfiguration.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
private static void warning(String msg) { PlatformLogger logger = PlatformLogger.getLogger("sun.awt.FontConfiguration"); logger.warning(msg); }
Example 18
Source File: FcFontConfiguration.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
private static void warning(String msg) { PlatformLogger logger = PlatformLogger.getLogger("sun.awt.FontConfiguration"); logger.warning(msg); }
Example 19
Source File: FcFontConfiguration.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
private static void warning(String msg) { PlatformLogger logger = PlatformLogger.getLogger("sun.awt.FontConfiguration"); logger.warning(msg); }
Example 20
Source File: FcFontConfiguration.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
private static void warning(String msg) { PlatformLogger logger = PlatformLogger.getLogger("sun.awt.FontConfiguration"); logger.warning(msg); }