Skip to content

Commit 5065eec

Browse files
author
Takanori Takase
committed
Added ProtectionDomain argument when creating a template class. When a
template is created in Java web start application, the generated template class must have the signer infromation identical to other classes in the same package. Otherwise, java.lang.SecurityException is thrown from ClassLoader's checkCerts() method.
1 parent 9d320f8 commit 5065eec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/msgpack/template/builder/BuildContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ protected void buildReadMethod() throws CannotCompileException, NotFoundExceptio
151151
protected abstract String buildReadMethodBody();
152152

153153
protected Class<?> createClass() throws CannotCompileException {
154-
return (Class<?>) tmplCtClass.toClass(null, null);
154+
return (Class<?>) tmplCtClass.toClass(null, getClass().getProtectionDomain());
155155
}
156156

157157
protected void saveClass(final String directoryName) throws CannotCompileException, IOException {

0 commit comments

Comments
 (0)