Rename resources so javax and jakarta can live in same classpath #174 Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
diff --git a/api/src/main/java/jakarta/activation/MailcapCommandMap.java b/api/src/main/java/jakarta/activation/MailcapCommandMap.java index 9974333..0865bc1 100644 --- a/api/src/main/java/jakarta/activation/MailcapCommandMap.java +++ b/api/src/main/java/jakarta/activation/MailcapCommandMap.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -21,26 +21,26 @@ /** * MailcapCommandMap extends the CommandMap * abstract class. It implements a CommandMap whose configuration - * is based on mailcap files + * is based on jakarta.mailcap files * (<A HREF="http://www.ietf.org/rfc/rfc1524.txt">RFC 1524</A>). * The MailcapCommandMap can be configured both programmatically * and via configuration files. * <p> * <b>Mailcap file search order:</b><p> * The MailcapCommandMap looks in various places in the user's - * system for mailcap file entries. When requests are made + * system for jakarta.mailcap file entries. When requests are made * to search for commands in the MailcapCommandMap, it searches - * mailcap files in the following order: + * jakarta.mailcap files in the following order: * <ol> * <li> Programatically added entries to the MailcapCommandMap instance. - * <li> The file <code>.mailcap</code> in the user's home directory. - * <li> The file <code>mailcap</code> in the Java runtime. - * <li> The file or resources named <code>META-INF/mailcap</code>. - * <li> The file or resource named <code>META-INF/mailcap.default</code> + * <li> The file <code>.jakarta.mailcap</code> in the user's home directory. + * <li> The file <code>jakarta.mailcap</code> in the Java runtime. + * <li> The file or resources named <code>META-INF/jakarta.mailcap</code>. + * <li> The file or resource named <code>META-INF/jakarta.mailcap.default</code> * (usually found only in the <code>activation.jar</code> file). * </ol> * <p> - * (The current implementation looks for the <code>mailcap</code> file + * (The current implementation looks for the <code>jakarta.mailcap</code> file * in the Java runtime in the directory <code><i>java.home</i>/conf</code> * if it exists, and otherwise in the directory * <code><i>java.home</i>/lib</code>, where <i>java.home</i> is the value @@ -49,7 +49,7 @@ * <p> * <b>Mailcap file format:</b><p> * - * Mailcap files must conform to the mailcap + * Mailcap files must conform to the jakarta.mailcap * file specification (RFC 1524, <i>A User Agent Configuration Mechanism * For Multimedia Mail Format Information</i>). * The file format consists of entries corresponding to @@ -57,10 +57,10 @@ * specifies <i>applications</i> for clients to use when they * themselves cannot operate on the specified MIME type. The * MailcapCommandMap extends this specification by using a parameter mechanism - * in mailcap files that allows JavaBeans(tm) components to be specified as + * in jakarta.mailcap files that allows JavaBeans(tm) components to be specified as * corresponding to particular commands for a MIME type.<p> * - * When a mailcap file is + * When a jakarta.mailcap file is * parsed, the MailcapCommandMap recognizes certain parameter signatures, * specifically those parameter names that begin with <code>x-java-</code>. * The MailcapCommandMap uses this signature to find @@ -86,7 +86,7 @@ * view command would only be used if a non-fallback view command for * the MIME type could not be found.<p> * - * MailcapCommandMap aware mailcap files have the + * MailcapCommandMap aware jakarta.mailcap files have the * following general form:<p> * <code> * # Comments begin with a '#' and continue to the end of the line.<br> @@ -96,7 +96,7 @@ * # and a parameter list looks like: <br> * text/plain; ; x-java-view=com.sun.TextViewer; x-java-edit=com.sun.TextEdit * <br> - * # Note that mailcap entries that do not contain 'x-java' parameters<br> + * # Note that jakarta.mailcap entries that do not contain 'x-java' parameters<br> * # and comply to RFC 1524 are simply ignored:<br> * image/gif; /usr/dt/bin/sdtimage %s<br> * @@ -150,10 +150,14 @@ String user_home = System.getProperty("user.home"); if (user_home != null) { - String path = user_home + File.separator + ".mailcap"; + String[] paths = new String[] {user_home + File.separator + ".jakarta.mailcap", user_home + File.separator + ".mailcap"}; + for (String path : paths) { mf = loadFile(path); - if (mf != null) + if (mf != null) { dbv.add(mf); + break; + } + } } } catch (SecurityException ex) {} @@ -161,18 +165,23 @@ try { // check system's home if (confDir != null) { - mf = loadFile(confDir + "mailcap"); - if (mf != null) + String[] confs = new String[] {"jakarta.mailcap", "mailcap"}; + for (String conf : confs) { + mf = loadFile(confDir + conf); + if (mf != null) { dbv.add(mf); + break; + } + } } } catch (SecurityException ex) {} LogSupport.log("MailcapCommandMap: load JAR"); // load from the app's jar file - loadAllResources(dbv, "META-INF/mailcap"); + loadAllResources(dbv, "META-INF/jakarta.mailcap", "META-INF/mailcap"); LogSupport.log("MailcapCommandMap: load DEF"); - mf = loadResource("/META-INF/mailcap.default"); + mf = loadResource("/META-INF/jakarta.mailcap.default", "/META-INF/mailcap.default"); if (mf != null) dbv.add(mf); @@ -184,18 +193,19 @@ /** * Load from the named resource. */ - private MailcapRegistry loadResource(String name) { + private MailcapRegistry loadResource(String ... names) { + for (String name : names) { try (InputStream clis = SecuritySupport.getResourceAsStream(this.getClass(), name)) { if (clis != null) { MailcapRegistry mf = getImplementation().getByInputStream(clis); if (LogSupport.isLoggable()) LogSupport.log("MailcapCommandMap: successfully loaded " + - "mailcap file: " + name); + "jakarta.mailcap file: " + name); return mf; } else { if (LogSupport.isLoggable()) LogSupport.log("MailcapCommandMap: not loading " + - "mailcap file: " + name); + "jakarta.mailcap file: " + name); } } catch (IOException | SecurityException e) { if (LogSupport.isLoggable()) @@ -206,14 +216,16 @@ "MailcapRegistry: can't load " + name, e); } } + } return null; } /** * Load all of the named resource. */ - private void loadAllResources(List<MailcapRegistry> v, String name) { + private void loadAllResources(List<MailcapRegistry> v, String ... names) { boolean anyLoaded = false; + for (String name : names) { try { URL[] urls; ClassLoader cld = null; @@ -239,12 +251,12 @@ if (LogSupport.isLoggable()) LogSupport.log("MailcapCommandMap: " + "successfully loaded " + - "mailcap file from URL: " + + "jakarta.mailcap file from URL: " + url); } else { if (LogSupport.isLoggable()) LogSupport.log("MailcapCommandMap: " + - "not loading mailcap " + + "not loading jakarta.mailcap " + "file from URL: " + url); } } catch (IOException | SecurityException ioex) { @@ -258,17 +270,24 @@ } } } + // Even if nothing was loaded, we stop it because resources were found. + break; } } catch (Exception ex) { if (LogSupport.isLoggable()) LogSupport.log("MailcapCommandMap: can't load " + name, ex); } + } // if failed to load anything, fall back to old technique, just in case if (!anyLoaded) { if (LogSupport.isLoggable()) LogSupport.log("MailcapCommandMap: !anyLoaded"); - MailcapRegistry mf = loadResource("/" + name); + String[] resources = new String[names.length]; + for (int i = 0; i < names.length; i++) { + resources[i] = "/" + names[i]; + } + MailcapRegistry mf = loadResource(resources); if (mf != null) v.add(mf); } @@ -297,9 +316,9 @@ /** * Constructor that allows the caller to specify the path - * of a <i>mailcap</i> file. + * of a <i>jakarta.mailcap</i> file. * - * @param fileName The name of the <i>mailcap</i> file to open + * @param fileName The name of the <i>jakarta.mailcap</i> file to open * @exception IOException if the file can't be accessed */ public MailcapCommandMap(String fileName) throws IOException { @@ -324,9 +343,9 @@ /** * Constructor that allows the caller to specify an <i>InputStream</i> - * containing a mailcap file. + * containing a jakarta.mailcap file. * - * @param is InputStream of the <i>mailcap</i> file to open + * @param is InputStream of the <i>jakarta.mailcap</i> file to open */ public MailcapCommandMap(InputStream is) { this(); @@ -350,11 +369,11 @@ /** * Get the preferred command list for a MIME Type. The MailcapCommandMap - * searches the mailcap files as described above under + * searches the jakarta.mailcap files as described above under * <i>Mailcap file search order</i>.<p> * * The result of the search is a proper subset of available - * commands in all mailcap files known to this instance of + * commands in all jakarta.mailcap files known to this instance of * MailcapCommandMap. The first entry for a particular command * is considered the preferred command. * @@ -420,7 +439,7 @@ } /** - * Get all the available commands in all mailcap files known to + * Get all the available commands in all jakarta.mailcap files known to * this instance of MailcapCommandMap for this MIME type. * * @param mimeType the MIME type @@ -524,10 +543,10 @@ * Add entries to the registry. Programmatically * added entries are searched before other entries.<p> * - * The string that is passed in should be in mailcap + * The string that is passed in should be in jakarta.mailcap * format. * - * @param mail_cap a correctly formatted mailcap string + * @param mail_cap a correctly formatted jakarta.mailcap string */ public synchronized void addMailcap(String mail_cap) { // check to see if one exists @@ -656,11 +675,11 @@ /** * Get the native commands for the given MIME type. * Returns an array of strings where each string is - * an entire mailcap file entry. The application + * an entire jakarta.mailcap file entry. The application * will need to parse the entry to extract the actual * command as well as any attributes it needs. See * <A HREF="http://www.ietf.org/rfc/rfc1524.txt">RFC 1524</A> - * for details of the mailcap entry syntax. Only mailcap + * for details of the jakarta.mailcap entry syntax. Only jakarta.mailcap * entries that specify a view command for the specified * MIME type are returned. *
diff --git a/api/src/main/java/jakarta/activation/MailcapRegistry.java b/api/src/main/java/jakarta/activation/MailcapRegistry.java index d586284..2cf5271 100644 --- a/api/src/main/java/jakarta/activation/MailcapRegistry.java +++ b/api/src/main/java/jakarta/activation/MailcapRegistry.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2025 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -52,7 +52,7 @@ Map<String, List<String>> getMailcapFallbackList(String mime_type); /** - * Return all the MIME types known to this mailcap file. + * Return all the MIME types known to this jakarta.mailcap file. * * @return a String array of the MIME types */ @@ -67,7 +67,7 @@ String[] getNativeCommands(String mime_type); /** - * appendToMailcap: Append to this Mailcap DB, use the mailcap + * appendToMailcap: Append to this Mailcap DB, use the jakarta.mailcap * format: * Comment == "# <i>comment string</i>" * Entry == "mimetype; javabeanclass" @@ -76,7 +76,7 @@ * # this is a comment * image/gif jaf.viewers.ImageViewer * - * @param mail_cap the mailcap string + * @param mail_cap the jakarta.mailcap string */ void appendToMailcap(String mail_cap); }
diff --git a/api/src/main/java/jakarta/activation/MimeTypeRegistry.java b/api/src/main/java/jakarta/activation/MimeTypeRegistry.java index 4ae3c65..d2adf85 100644 --- a/api/src/main/java/jakarta/activation/MimeTypeRegistry.java +++ b/api/src/main/java/jakarta/activation/MimeTypeRegistry.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2025 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -48,7 +48,7 @@ /** * Appends string of entries to the types registry * - * @param mime_types the mime.types string + * @param mime_types the jakarta.mime.types string */ void appendToRegistry(String mime_types); } \ No newline at end of file
diff --git a/api/src/main/java/jakarta/activation/MimetypesFileTypeMap.java b/api/src/main/java/jakarta/activation/MimetypesFileTypeMap.java index 82bcc5c..6fdb6fe 100644 --- a/api/src/main/java/jakarta/activation/MimetypesFileTypeMap.java +++ b/api/src/main/java/jakarta/activation/MimetypesFileTypeMap.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -20,7 +20,7 @@ /** * This class extends FileTypeMap and provides data typing of files - * via their file extension. It uses the <code>.mime.types</code> format. <p> + * via their file extension. It uses the <code>.jakarta.mime.types</code> format. <p> * * <b>MIME types file search order:</b><p> * The MimetypesFileTypeMap looks in various places in the user's @@ -29,14 +29,14 @@ * MIME types files in the following order: * <ol> * <li> Programmatically added entries to the MimetypesFileTypeMap instance. - * <li> The file <code>.mime.types</code> in the user's home directory. - * <li> The file <code>mime.types</code> in the Java runtime. - * <li> The file or resources named <code>META-INF/mime.types</code>. - * <li> The file or resource named <code>META-INF/mimetypes.default</code> + * <li> The file <code>.jakarta.mime.types</code> in the user's home directory. + * <li> The file <code>jakarta.mime.types</code> in the Java runtime. + * <li> The file or resources named <code>META-INF/jakarta.mime.types</code>. + * <li> The file or resource named <code>META-INF/jakarta.mimetypes.default</code> * (usually found only in the <code>activation.jar</code> file). * </ol> * <p> - * (The current implementation looks for the <code>mime.types</code> file + * (The current implementation looks for the <code>jakarta.mime.types</code> file * in the Java runtime in the directory <code><i>java.home</i>/conf</code> * if it exists, and otherwise in the directory * <code><i>java.home</i>/lib</code>, where <i>java.home</i> is the value @@ -103,10 +103,14 @@ String user_home = System.getProperty("user.home"); if (user_home != null) { - String path = user_home + File.separator + ".mime.types"; + String[] paths = new String[] {user_home + File.separator + ".jakarta.mime.types", user_home + File.separator + ".mime.types"}; + for (String path : paths) { mf = loadFile(path); - if (mf != null) + if (mf != null) { dbv.addElement(mf); + break; + } + } } } catch (SecurityException ex) { if (LogSupport.isLoggable()) @@ -117,9 +121,14 @@ try { // check system's home if (confDir != null) { - mf = loadFile(confDir + "mime.types"); - if (mf != null) + String[] confs = new String[] {"jakarta.mime.types", "mime.types"}; + for (String conf : confs) { + mf = loadFile(confDir + conf); + if (mf != null) { dbv.addElement(mf); + break; + } + } } } catch (SecurityException ex) { if (LogSupport.isLoggable()) @@ -128,10 +137,10 @@ LogSupport.log("MimetypesFileTypeMap: load JAR"); // load from the app's jar file - loadAllResources(dbv, "META-INF/mime.types"); + loadAllResources(dbv, "META-INF/jakarta.mime.types", "META-INF/mime.types"); LogSupport.log("MimetypesFileTypeMap: load DEF"); - mf = loadResource("/META-INF/mimetypes.default"); + mf = loadResource("/META-INF/jakarta.mimetypes.default", "/META-INF/mimetypes.default"); if (mf != null) dbv.addElement(mf); @@ -143,7 +152,8 @@ /** * Load from the named resource. */ - private MimeTypeRegistry loadResource(String name) { + private MimeTypeRegistry loadResource(String ... names) { + for (String name : names) { InputStream clis = null; try { clis = SecuritySupport.getResourceAsStream(this.getClass(), name); @@ -175,14 +185,16 @@ LogSupport.log("InputStream cannot be close for " + name, ex); } } + } return null; } /** * Load all of the named resource. */ - private void loadAllResources(Vector<MimeTypeRegistry> v, String name) { + private void loadAllResources(Vector<MimeTypeRegistry> v, String ... names) { boolean anyLoaded = false; + for (String name : names) { try { URL[] urls; ClassLoader cld = null; @@ -239,15 +251,21 @@ } } } + // Even if nothing was loaded, we stop it because resources were found. + break; } catch (Exception ex) { if (LogSupport.isLoggable()) LogSupport.log("MimetypesFileTypeMap: can't load " + name, ex); } - + } // if failed to load anything, fall back to old technique, just in case if (!anyLoaded) { LogSupport.log("MimetypesFileTypeMap: !anyLoaded"); - MimeTypeRegistry mf = loadResource("/" + name); + String[] resources = new String[names.length]; + for (int i = 0; i < names.length; i++) { + resources[i] = "/" + names[i]; + } + MimeTypeRegistry mf = loadResource(resources); if (mf != null) v.addElement(mf); } @@ -318,7 +336,7 @@ /** * Prepend the MIME type values to the registry. * - * @param mime_types A .mime.types formatted string of entries. + * @param mime_types A .jakarta.mime.types formatted string of entries. */ public synchronized void addMimeTypes(String mime_types) { try {
diff --git a/api/src/main/resources/META-INF/mailcap.default b/api/src/main/resources/META-INF/jakarta.mailcap.default similarity index 82% rename from api/src/main/resources/META-INF/mailcap.default rename to api/src/main/resources/META-INF/jakarta.mailcap.default index c956d65..8b44a20 100644 --- a/api/src/main/resources/META-INF/mailcap.default +++ b/api/src/main/resources/META-INF/jakarta.mailcap.default
@@ -1,5 +1,5 @@ # -# Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2025 Oracle and/or its affiliates. All rights reserved. # # This program and the accompanying materials are made available under the # terms of the Eclipse Distribution License v. 1.0, which is available at @@ -8,7 +8,7 @@ # SPDX-License-Identifier: BSD-3-Clause # -# This is a very simple 'mailcap' file as an example. +# This is a very simple 'jakarta.mailcap' file as an example. # Example JavaBean viewers and editors are no longer # provided as they conflicted with applications. #
diff --git a/api/src/main/resources/META-INF/mimetypes.default b/api/src/main/resources/META-INF/jakarta.mimetypes.default similarity index 87% rename from api/src/main/resources/META-INF/mimetypes.default rename to api/src/main/resources/META-INF/jakarta.mimetypes.default index 25df4a3..4bed5b4 100644 --- a/api/src/main/resources/META-INF/mimetypes.default +++ b/api/src/main/resources/META-INF/jakarta.mimetypes.default
@@ -1,5 +1,5 @@ # -# Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2025 Oracle and/or its affiliates. All rights reserved. # # This program and the accompanying materials are made available under the # terms of the Eclipse Distribution License v. 1.0, which is available at @@ -9,7 +9,7 @@ # # -# A simple, old format, mime.types file +# A simple, old format, jakarta.mime.types file # text/html html htm HTML HTM text/plain txt text TXT TEXT
diff --git a/doc/spec/JAF-2.1-changes.txt b/doc/spec/JAF-2.1-changes.txt index 474b288..713ca7c 100644 --- a/doc/spec/JAF-2.1-changes.txt +++ b/doc/spec/JAF-2.1-changes.txt
@@ -29,3 +29,23 @@ The implementation of the specification was moved to the new project - Eclipse Angus - and further development continues there. Eclipse Angus is direct accessor of JavaActivation/JakartaActivation. + +=================================================================== + +3. Resource Loading Order +---------------------------------------------------------------- + +To avoid conflicts when both legacy and Jakarta Activation resources are +present in the classpath, Jakarta Activation 2.1 will now attempt to load +resources prefixed with `jakarta.` first if found. + +For example: +- `jakarta.mailcap` will be loaded instead of `mailcap`. +- `jakarta.mime.types` will be loaded instead of `mime.types`. + +If the `jakarta.`-prefixed resource is not found, the framework will fall back +to the older resource file. This ensures backward compatibility with existing +applications while giving priority to Jakarta-specific resources. + +Over time, the legacy resources without the `jakarta.` prefix may be removed, +leaving only the Jakarta-prefixed variants. \ No newline at end of file
diff --git a/spec/src/main/asciidoc/activation.adoc b/spec/src/main/asciidoc/activation.adoc index 5c97a44..37aebff 100644 --- a/spec/src/main/asciidoc/activation.adoc +++ b/spec/src/main/asciidoc/activation.adoc
@@ -94,7 +94,7 @@ for discovering which commands are available on the system. A possible implementation can access the ‘types registry’ on the platform or use a server-based solution. Jakarta Activation provides a simple default -solution based on RFC 1524 (.mailcap) like functionality. +solution based on RFC 1524 (.jakarta.mailcap) like functionality. See “Deliverables” below. === The Command Object Interface @@ -139,7 +139,7 @@ MimeTypeRegistry, MailcapRegistry, MailcapRegistryProvider and MimeTypeRegistryProvider implementations when the application wishes to get access to the available MIME types and CommandMap whose configuration -is based on mailcap storage like mailcap files (RFC 1524). +is based on jakarta.mailcap storage like jakarta.mailcap files (RFC 1524). == Usage Scenarios @@ -396,7 +396,7 @@ available through the DataHandler and specifies a command on that list. The DataHandler uses the CommandMap to retrieve the Bean associated with that command. Some or all of the command map is stored in some ‘common’ -place, like a .mailcap (RFC 1524) file. Other more complex +place, like a .jakarta.mailcap (RFC 1524) file. Other more complex implementations can be distributed, or can provide licensing or authentication features. @@ -455,8 +455,8 @@ policies as possible. We expect that viewers/editors will be bound to data -via a simple registry mechanism similar in function to a .mailcap file. -In addition, mailcap format files may be bundled with components, +via a simple registry mechanism similar in function to a .jakarta.mailcap file. +In addition, jakarta.mailcap format files may be bundled with components, allowing additional packages to be added at runtime. Our viewers/editors and related classes and files are @@ -575,7 +575,7 @@ } ---- -You will need to create a mailcap file that lists the +You will need to create a jakarta.mailcap file that lists the MIME type “application/x-wombat” and user visible commands that are supported by your WombatBean. Your WombatBean wrappers will be listed as the objects supporting each of these commands. @@ -587,7 +587,7 @@ x-java-print=com.foo.WombatPrintBean ---- -You’ll also need to create a mime.types file with an +You’ll also need to create a jakarta.mime.types file with an entry: [source] @@ -599,8 +599,8 @@ [source] ---- -META-INF/mailcap -META-INF/mime.types +META-INF/jakarta.mailcap +META-INF/jakarta.mime.types com/foo/WombatBean.class com/foo/WombatEditBean.class com/foo/WombatViewBean.class @@ -641,9 +641,9 @@ The WombatDataContentHandler is delivered as a class and is designated as a DataContentHandler that can operate on Wombats in -the mailcap file included in your JAR file. +the jakarta.mailcap file included in your JAR file. -Your mailcap file changes to list the appropriate +Your jakarta.mailcap file changes to list the appropriate Wombat Beans, which implement user commands: [source] @@ -676,14 +676,14 @@ The ViewAll WombatViewerBean implements the Externalizable interface to read the Wombat data format. -ViewAll delivers an appropriate mailcap file: +ViewAll delivers an appropriate jakarta.mailcap file: [source] ---- application/x-wombat; ; x-java-view=com.viewall.WombatViewer ---- -and mime.types file: +and jakarta.mime.types file: [source] ---- @@ -710,7 +710,7 @@ DataHandler infrastructure and construct the WombatNotification objects. The WombatNotification DataContentHandler is delivered as a class named WombatNotificationDataContentHandler and is delivered in a JAR file with -the following mailcap file: +the following jakarta.mailcap file: [source] ---- @@ -817,7 +817,7 @@ **class MimetypesFileTypeMap:** This class extends FileTypeMap and provides data typing of files via their file extension. -It uses the .mime.types format. +It uses the .jakarta.mime.types format. **class URLDataSource:** The URLDataSource class provides an object that wraps a URL object in a DataSource interface. @@ -827,7 +827,7 @@ **class MailcapCommandMap:** MailcapCommandMap extends the CommandMap abstract class. It implements a CommandMap whose -configuration is based on mailcap files (RFC 1524). The +configuration is based on jakarta.mailcap files (RFC 1524). The MailcapCommandMap can be configured both programmatically and via configuration files.