本文整理汇总了Java中com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg.DESERIALIZE_TRANSLET_ERR属性的典型用法代码示例。如果您正苦于以下问题:Java ErrorMsg.DESERIALIZE_TRANSLET_ERR属性的具体用法?Java ErrorMsg.DESERIALIZE_TRANSLET_ERR怎么用?Java ErrorMsg.DESERIALIZE_TRANSLET_ERR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg
的用法示例。
在下文中一共展示了ErrorMsg.DESERIALIZE_TRANSLET_ERR属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readObject
/**
* Overrides the default readObject implementation since we decided
* it would be cleaner not to serialize the entire tranformer
* factory. [ ref bugzilla 12317 ]
* We need to check if the user defined class for URIResolver also
* implemented Serializable
* if yes then we need to deserialize the URIResolver
* Fix for bugzilla bug 22438
*/
private void readObject(ObjectInputStream is)
throws IOException, ClassNotFoundException
{
SecurityManager security = System.getSecurityManager();
if (security != null){
String temp = SecuritySupport.getSystemProperty(DESERIALIZE_TRANSLET);
if (temp == null || !(temp.length()==0 || temp.equalsIgnoreCase("true"))) {
ErrorMsg err = new ErrorMsg(ErrorMsg.DESERIALIZE_TRANSLET_ERR);
throw new UnsupportedOperationException(err.toString());
}
}
is.defaultReadObject();
if (is.readBoolean()) {
_uriResolver = (URIResolver) is.readObject();
}
_tfactory = new TransformerFactoryImpl();
}
示例2: readObject
/**
* Overrides the default readObject implementation since we decided
* it would be cleaner not to serialize the entire tranformer
* factory. [ ref bugzilla 12317 ]
* We need to check if the user defined class for URIResolver also
* implemented Serializable
* if yes then we need to deserialize the URIResolver
* Fix for bugzilla bug 22438
*/
@SuppressWarnings("unchecked")
private void readObject(ObjectInputStream is)
throws IOException, ClassNotFoundException
{
SecurityManager security = System.getSecurityManager();
if (security != null){
String temp = SecuritySupport.getSystemProperty(DESERIALIZE_TRANSLET);
if (temp == null || !(temp.length()==0 || temp.equalsIgnoreCase("true"))) {
ErrorMsg err = new ErrorMsg(ErrorMsg.DESERIALIZE_TRANSLET_ERR);
throw new UnsupportedOperationException(err.toString());
}
}
// We have to read serialized fields first.
ObjectInputStream.GetField gf = is.readFields();
_name = (String)gf.get("_name", null);
_bytecodes = (byte[][])gf.get("_bytecodes", null);
_class = (Class[])gf.get("_class", null);
_transletIndex = gf.get("_transletIndex", -1);
_outputProperties = (Properties)gf.get("_outputProperties", null);
_indentNumber = gf.get("_indentNumber", 0);
if (is.readBoolean()) {
_uriResolver = (URIResolver) is.readObject();
}
_tfactory = new TransformerFactoryImpl();
}