Skip to content
This repository has been archived by the owner on Oct 13, 2020. It is now read-only.

Commit

Permalink
Fix typos and make it easier to spellcheck.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasmueller committed Jul 29, 2011
1 parent 6d78c2e commit 116f871
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ private Object newInstance(Class<?> baseClass, Class<?> c, boolean forceUsingRef
try {
return creator.newInstance(c);
} catch (Exception e) {
IllegalArgumentException iae = new IllegalArgumentException(
IllegalArgumentException ia = new IllegalArgumentException(
"Could not create a new proxy instance for the base class " +
baseClass.getName() +
(REFLECTION_OBJECT_CREATOR == creator ?
" (probably because objenesis is not used)" : ""));
iae.initCause(e);
throw iae;
ia.initCause(e);
throw ia;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ byte[] javacCompile(String packageName, String className, String source) throws
} catch (IOException e) {
throw e;
} catch (Exception e) {
IOException io = new IOException("Error compling " +
IOException io = new IOException("Error compiling " +
javaFile.getAbsolutePath() + ": " + e.getMessage());
io.initCause(e);
throw io;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ public <T> T createProxy(T obj, final InvocationHandler handler) {
cons = pc.getConstructor(new Class<?>[] { InvocationHandler.class });
return (T) cons.newInstance(new Object[] { handler });
} catch (Exception e) {
IllegalArgumentException iae = new IllegalArgumentException(
IllegalArgumentException ia = new IllegalArgumentException(
"Could not create a new instance of the class " +
pc.getName());
iae.initCause(e);
throw iae;
ia.initCause(e);
throw ia;
}
}

Expand Down Expand Up @@ -98,8 +98,8 @@ public Class<?> getClassProxy(Class<?> c) throws IllegalArgumentException {
"is not supported: " + c.getName());
}
boolean hasPublicConstructor = false;
for (Constructor<?> constr : c.getConstructors()) {
if (Modifier.isPublic(constr.getModifiers())) {
for (Constructor<?> constructor : c.getConstructors()) {
if (Modifier.isPublic(constructor.getModifiers())) {
hasPublicConstructor = true;
break;
}
Expand Down Expand Up @@ -127,10 +127,10 @@ public Class<?> getClassProxy(Class<?> c) throws IllegalArgumentException {
proxyMap.put(c, pc);
return pc;
} catch (ClassNotFoundException e) {
IllegalArgumentException iae = new IllegalArgumentException(
IllegalArgumentException ia = new IllegalArgumentException(
"Could not create a proxy class for " + c.getName());
iae.initCause(e);
throw iae;
ia.initCause(e);
throw ia;
}
}

Expand Down
2 changes: 1 addition & 1 deletion assertthrows/src/site/resources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ <h3>Limitations and Class Proxies</h3>
where the provided object is of exactly this class.
Creating a proxy that extends a class is a bit challenging.
It is not possibly to create a proxy for a final class, because extending a final class is not allowed.
Also, final methods can not be overriden.
Also, final methods can not be overridden.
To create class proxies, the proxy factory uses the libraries
<a href="http://cglib.sourceforge.net/">Cglib</a> and
<a href="http://code.google.com/p/objenesis/">Objenesis</a> if they are in the classpath.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void testClose() {
list.close();
// closing multiple times is allowed
list.close();
// everything else isn't
// everything else is not
assertThrows(list).add("Kiwi");
assertThrows(list).get(0);
assertThrows(list).remove(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ public void test() {
}

@Test
public void testClassWithBrigeMethod() throws Exception {
public void testClassWithBridgeMethod() throws Exception {
createProxy(new ClassWithBridgeMethod()).clone();
assertEquals("clone = ClassWithBridgeMethod", buff.toString());
// even brige methods should be intercepted (there are two clone methods)
// even bridge methods should be intercepted (there are two clone methods)
callCloneMethods(0, new ClassWithBridgeMethod());
callCloneMethods(1, createProxy(new ClassWithBridgeMethod()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void test() {
}

@Test
public void testClassWithBrigeMethod() throws Exception {
public void testClassWithBridgeMethod() throws Exception {
createProxy(new ClassWithBridgeMethod()).clone();
assertEquals("clone = ClassWithBridgeMethod", buff.toString());
// even bridge methods should be intercepted (there are two clone methods)
Expand Down

0 comments on commit 116f871

Please sign in to comment.