[FOray-commit] SF.net SVN: foray: [7703] trunk/foray/foray-common/src/java/org/foray/common
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-06-19 15:38:41
|
Revision: 7703 Author: victormote Date: 2006-06-19 08:38:32 -0700 (Mon, 19 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7703&view=rev Log Message: ----------- These changes made per Vincent Hennebert's suggestions: 1. Synchronize getter method. 2. Remove method duplicating another method. Modified Paths: -------------- trunk/foray/foray-common/src/java/org/foray/common/ClasspathHandler.java trunk/foray/foray-common/src/java/org/foray/common/FOrayURLStreamHandlerFactory.java Modified: trunk/foray/foray-common/src/java/org/foray/common/ClasspathHandler.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/ClasspathHandler.java 2006-06-17 22:26:34 UTC (rev 7702) +++ trunk/foray/foray-common/src/java/org/foray/common/ClasspathHandler.java 2006-06-19 15:38:32 UTC (rev 7703) @@ -74,7 +74,7 @@ public static void register() { FOrayURLStreamHandlerFactory factory = FOrayURLStreamHandlerFactory.getURLStreamHandlerFactory(); - URLStreamHandler handler = factory.getHandler( + URLStreamHandler handler = factory.createURLStreamHandler( ClasspathHandler.PROTOCOL); if (handler != null) { /* If already registed, that one is the one being used, and there Modified: trunk/foray/foray-common/src/java/org/foray/common/FOrayURLStreamHandlerFactory.java =================================================================== --- trunk/foray/foray-common/src/java/org/foray/common/FOrayURLStreamHandlerFactory.java 2006-06-17 22:26:34 UTC (rev 7702) +++ trunk/foray/foray-common/src/java/org/foray/common/FOrayURLStreamHandlerFactory.java 2006-06-19 15:38:32 UTC (rev 7703) @@ -102,21 +102,12 @@ } /** - * Provides the handler for a given protocol. - * @param protocol The protocol whose handler is desired. - * @return True iff <code>protocol</code> has previously been registered. - */ - public URLStreamHandler getHandler(String protocol) { - Object object = this.protocols.get(protocol); - return (URLStreamHandler) object; - } - - /** * Provides access to a custom URLStreamHandlerFactory instance, creating * it and registering it with Java if needed. * @return The custom URLStreamHandlerFactory instance for this session. */ - public static FOrayURLStreamHandlerFactory getURLStreamHandlerFactory() { + public static synchronized FOrayURLStreamHandlerFactory + getURLStreamHandlerFactory() { if (FOrayURLStreamHandlerFactory.urlSHFactory == null) { FOrayURLStreamHandlerFactory.urlSHFactory = new FOrayURLStreamHandlerFactory(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |