Revision: 1637
          http://svn.sourceforge.net/spring-rich-c/?rev=1637&view=rev
Author:   kevinstembridge
Date:     2007-01-09 14:53:05 -0800 (Tue, 09 Jan 2007)

Log Message:
-----------
Introduced new ServiceNotFoundException instead of UnsupportedOperationException

Modified Paths:
--------------
    
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/support/DefaultApplicationServices.java

Modified: 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/support/DefaultApplicationServices.java
===================================================================
--- 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/support/DefaultApplicationServices.java
    2007-01-09 22:51:16 UTC (rev 1636)
+++ 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/support/DefaultApplicationServices.java
    2007-01-09 22:53:05 UTC (rev 1637)
@@ -40,6 +40,7 @@
 import org.springframework.richclient.application.ApplicationWindowFactory;
 import 
org.springframework.richclient.application.DefaultConversionServiceFactoryBean;
 import org.springframework.richclient.application.PageComponentPaneFactory;
+import org.springframework.richclient.application.ServiceNotFoundException;
 import org.springframework.richclient.application.ViewDescriptorRegistry;
 import 
org.springframework.richclient.application.config.ApplicationObjectConfigurer;
 import 
org.springframework.richclient.application.config.DefaultApplicationObjectConfigurer;
@@ -96,7 +97,7 @@
  *       </bean>
  * </pre>
  * 
- * Note the use of the <code>refid</code> form instead of just using a string 
value. This is the preferred syntax in
+ * Note the use of the <code>idref</code> form instead of just using a string 
value. This is the preferred syntax in
  * order to avoid having misspelled bean names go unreported.
  * <p>
  * Which service implementation is returned by [EMAIL PROTECTED] 
#getService(Class)} will be determined through the following
@@ -169,7 +170,7 @@
      * 
      * @param serviceType Type of service being requested
      * @return Service instance
-     * @throws UnsupportedOperationException if the service is not found and 
no suitable
+     * @throws ServiceNotFoundException if the service is not found and no 
suitable
      *         default implementation is available.
      */
     public synchronized Object getService( Class serviceType ) {
@@ -193,7 +194,7 @@
 
         // If we still don't have an implementation, then it's a bust
         if( service == null ) {
-            throw new UnsupportedOperationException( "No service of type '" + 
serviceType + "' found." );
+            throw new ServiceNotFoundException(serviceType);
         }
         return service;
     }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
spring-rich-c-cvs mailing list
spring-rich-c-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spring-rich-c-cvs

Reply via email to