当前位置: 首页>>代码示例>>Java>>正文


Java ErrorMsg.DESERIALIZE_TRANSLET_ERR属性代码示例

本文整理汇总了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();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:TemplatesImpl.java

示例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();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:38,代码来源:TemplatesImpl.java


注:本文中的com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg.DESERIALIZE_TRANSLET_ERR属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。