com.thoughtworks.xstream.XStream.denyTypes()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(168)

本文整理了Java中com.thoughtworks.xstream.XStream.denyTypes()方法的一些代码示例,展示了XStream.denyTypes()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XStream.denyTypes()方法的具体详情如下:
包路径:com.thoughtworks.xstream.XStream
类名称:XStream
方法名:denyTypes

XStream.denyTypes介绍

[英]Add security permission forbidding explicit types.
[中]添加禁止显式类型的安全权限。

代码示例

代码示例来源:origin: kiegroup/jbpm

private void initXStream() {
  if(xstream==null) {
    xstream = createTrustingXStream();
    String[] voidDeny = {"void.class", "Void.class"};
    xstream.denyTypes(voidDeny);
  }
}

代码示例来源:origin: kiegroup/jbpm

private void initXStream() {
  if(xstream==null) {
    xstream = createTrustingXStream();
    String[] voidDeny = {"void.class", "Void.class"};
    xstream.denyTypes(voidDeny);
  }
}

代码示例来源:origin: kiegroup/jbpm

private void initXStream() {
  if(xstream==null) {
    xstream = createTrustingXStream();
    String[] voidDeny = {"void.class", "Void.class"};
    xstream.denyTypes(voidDeny);
  }
}

代码示例来源:origin: kiegroup/jbpm

private void initXStream() {
  if(xstream==null) {
    xstream = createTrustingXStream();
    String[] voidDeny = {"void.class", "Void.class"};
    xstream.denyTypes(voidDeny);
  }
}

代码示例来源:origin: org.guvnor/guvnor-project-backend

private XStream createXStream() {
    XStream xStream = new XStream();
    String[] voidDeny = {"void.class", "Void.class"};
    xStream.denyTypes(voidDeny);
    xStream.alias("configuration",
           ProjectImports.class);
    xStream.alias("import",
           Import.class);
    return xStream;
  }
}

代码示例来源:origin: org.guvnor/guvnor-project-backend

private XStream createXStream() {
    XStream xStream = new XStream();
    String[] voidDeny = {"void.class", "Void.class"};
    xStream.denyTypes(voidDeny);
    xStream.alias("project-repositories",
           ProjectRepositories.class);
    xStream.alias("repository",
           ProjectRepositories.ProjectRepository.class);
    return xStream;
  }
}

代码示例来源:origin: org.jbpm/jbpm-human-task-audit

private void initXStream() {
  if(xstream==null) {
    xstream = createTrustingXStream();
    String[] voidDeny = {"void.class", "Void.class"};
    xstream.denyTypes(voidDeny);
  }
}

代码示例来源:origin: org.jbpm/jbpm-human-task-audit

private void initXStream() {
  if(xstream==null) {
    xstream = createTrustingXStream();
    String[] voidDeny = {"void.class", "Void.class"};
    xstream.denyTypes(voidDeny);
  }
}

代码示例来源:origin: org.optaplanner/optaplanner-wb-solver-editor-backend

public ConfigPersistence() {
  xStream = XStreamXmlSolverFactory.buildXStream();
  String[] voidDeny = {"void.class", "Void.class"};
  xStream.denyTypes(voidDeny);
}

代码示例来源:origin: kiegroup/appformer

public ConfigGroupMarshaller() {
  String[] voidDeny = {"void.class", "Void.class"};
  backwardCompatibleXstream.alias("group",
                 ConfigGroup.class );
  backwardCompatibleXstream.alias("item",
                  ConfigItem.class );
  backwardCompatibleXstream.alias("type",
                  ConfigType.class );
  backwardCompatibleXstream.alias("secureitem",
                  SecureConfigItem.class);
  // for backward compatibility only
  backwardCompatibleXstream.alias("org.uberfire.backend.server.config.SecureConfigItem",
                  SecureConfigItem.class);
  backwardCompatibleXstream.denyTypes(voidDeny);
  xstream.alias("group",
         ConfigGroup.class);
  xstream.alias("item",
         ConfigItem.class);
  xstream.alias("type",
         ConfigType.class);
  xstream.alias("secureitem",
         SecureConfigItem.class);
  xstream.denyTypes(voidDeny);
}

代码示例来源:origin: org.guvnor/guvnor-structure-backend

public ConfigGroupMarshaller() {
  String[] voidDeny = {"void.class", "Void.class"};
  backwardCompatibleXstream.alias("group",
                 ConfigGroup.class );
  backwardCompatibleXstream.alias("item",
                  ConfigItem.class );
  backwardCompatibleXstream.alias("type",
                  ConfigType.class );
  backwardCompatibleXstream.alias("secureitem",
                  SecureConfigItem.class);
  // for backward compatibility only
  backwardCompatibleXstream.alias("org.uberfire.backend.server.config.SecureConfigItem",
                  SecureConfigItem.class);
  backwardCompatibleXstream.denyTypes(voidDeny);
  xstream.alias("group",
         ConfigGroup.class);
  xstream.alias("item",
         ConfigItem.class);
  xstream.alias("type",
         ConfigType.class);
  xstream.alias("secureitem",
         SecureConfigItem.class);
  xstream.denyTypes(voidDeny);
}

代码示例来源:origin: org.kie.server/kie-server-services-common

public KieServerStateFileRepository(File repositoryDir) {
  this.repositoryDir = repositoryDir;
  xs = XStreamUtils.createTrustingXStream(new PureJavaReflectionProvider());
  String[] voidDeny = {"void.class", "Void.class"};
  xs.denyTypes(voidDeny);
  xs.alias("kie-server-state", KieServerState.class);
  xs.alias("container", KieContainerResource.class);
  xs.alias("config-item", KieServerConfigItem.class);
}

代码示例来源:origin: kiegroup/droolsjbpm-integration

@Override
  protected void buildMarshaller(Set<Class<?>> classes, ClassLoader classLoader) {
    xstream = XStreamUtils.createNonTrustingXStream(new PureJavaReflectionProvider(), new DomDriver("UTF-8", new XmlFriendlyNameCoder("_-", "_")));
    xstream.addPermission(new WildcardTypePermission(new String[]{"org.kie.server.api.**"}));
    String[] voidDeny = {"void.class", "Void.class"};
    xstream.denyTypes(voidDeny);
  }
};

代码示例来源:origin: kiegroup/droolsjbpm-integration

this.xstream.denyTypes(voidDeny);

相关文章