JDK-6991300 : MimeTable is unsafe
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-10-12
  • Updated: 2011-05-18
  • Resolved: 2011-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b116Fixed
Related Reports
Relates :  
Description
sun.net.www.MimeTable uses unsafe lazy initialization of the default instance.

   private static MimeTable defaultInstance = null;

    [...]

    public static MimeTable getDefaultTable() {
        if (defaultInstance == null) {
            [...]
                    defaultInstance = new MimeTable();
            [...]
        }

        return defaultInstance;
    }

Comments
EVALUATION Changeset: a4fd754f895d Author: chegar Date: 2010-10-12 17:01 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/a4fd754f895d 6991300: MimeTable is unsafe Reviewed-by: alanb, michaelm ! src/share/classes/sun/net/www/MimeTable.java
12-10-2010

EVALUATION This CR tracks the forward port ( to JDK7 ) of a side issue addressed by 6863419 in the jdk code.
12-10-2010