--- old/modules/media/src/main/java/com/sun/media/jfxmediaimpl/platform/osx/OSXPlatform.java 2015-10-01 16:34:56.747283700 -0700 +++ new/modules/media/src/main/java/com/sun/media/jfxmediaimpl/platform/osx/OSXPlatform.java 2015-10-01 16:34:56.248077300 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,11 +34,12 @@ import com.sun.media.jfxmediaimpl.platform.Platform; import java.security.AccessController; import java.security.PrivilegedAction; +import java.util.Arrays; /** * Mac OS X Platform implementation. This class implements both the QTKit based * platform and the AVFoundation based platforms. - * + * * NOTE: The QTKit based platform is deprecated and will be removed in a future * release. */ @@ -57,6 +58,15 @@ "audio/mpegurl" }; + /** + * All supported protocols. + */ + private static final String[] PROTOCOLS = { + "file", + "http", + "https" + }; + private static final class OSXPlatformInitializer { private static final OSXPlatform globalInstance; static { @@ -121,9 +131,12 @@ @Override public String[] getSupportedContentTypes() { - String[] contentTypesCopy = new String[CONTENT_TYPES.length]; - System.arraycopy(CONTENT_TYPES, 0, contentTypesCopy, 0, CONTENT_TYPES.length); - return contentTypesCopy; + return Arrays.copyOf(CONTENT_TYPES, CONTENT_TYPES.length); + } + + @Override + public String[] getSupportedProtocols() { + return Arrays.copyOf(PROTOCOLS, PROTOCOLS.length); } @Override