You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mb...@apache.org on 2010/09/23 05:10:34 UTC
svn commit: r1000296 -
/commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/StubConfigurer.java
Author: mbenson
Date: Thu Sep 23 03:10:34 2010
New Revision: 1000296
URL: http://svn.apache.org/viewvc?rev=1000296&view=rev
Log:
javadoc; change exception message
Modified:
commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/StubConfigurer.java
Modified: commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/StubConfigurer.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/StubConfigurer.java?rev=1000296&r1=1000295&r2=1000296&view=diff
==============================================================================
--- commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/StubConfigurer.java (original)
+++ commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/StubConfigurer.java Thu Sep 23 03:10:34 2010
@@ -438,10 +438,14 @@ public abstract class StubConfigurer<T>
*/
protected abstract void configure(T stub);
+ /**
+ * Get the registered {@link StubInterceptor}.
+ * @return {@link StubInterceptor}
+ * @throws IllegalStateException if no ongoing stubbing operation could be detected
+ */
synchronized StubInterceptor requireStubInterceptor() {
if (stubInterceptor == null) {
- throw new IllegalStateException(
- "no StubInterceptor currently in use");
+ throw new IllegalStateException("Could not detect ongoing stubbing");
}
return stubInterceptor;
}