Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified License.txt
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
160 changes: 90 additions & 70 deletions pom.xml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,77 +1,97 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.ndpgroup.xml</groupId>
<artifactId>jaxb-android</artifactId>
<version>${jaxb.version}-SNAPSHOT</version>
<packaging>jar</packaging>
<groupId>com.ndpgroup.xml</groupId>
<artifactId>jaxb-android</artifactId>
<version>${jaxb.version}-SNAPSHOT</version>
<packaging>jar</packaging>

<name>jaxb-android</name>
<url>http://maven.apache.org</url>
<name>jaxb-android</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jaxb.version>2.2.7</jaxb.version>
</properties>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jaxb.version>2.2.7</jaxb.version>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<excludes>
<exclude>javax.*</exclude>
</excludes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<excludes>
<exclude>javax.*</exclude>
</excludes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>${jaxb.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>${jaxb.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>FastInfoset</artifactId>
<groupId>com.sun.xml.fastinfoset</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>${jaxb.version}</version>
<!-- <scope>provided</scope>-->
</dependency>
<!-- https://mvnrepository.com/artifact/xerces/xercesImpl -->
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.12.0</version>
<!-- <scope>provided</scope>-->
</dependency>
<dependency>
<groupId>com.sun.org.apache</groupId>
<artifactId>jaxp-ri</artifactId>
<version>1.4</version>
<exclusions>
<exclusion>
<groupId>javax.xml.parsers</groupId>
<artifactId>jaxp-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>${jaxb.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>FastInfoset</artifactId>
<groupId>com.sun.xml.fastinfoset</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
Empty file.
Empty file modified src/main/java/com/sun/xml/bind/v2/runtime/JAXBContextImpl.java
100644 → 100755
Empty file.
Empty file modified src/main/java/com/sun/xml/bind/v2/runtime/reflect/Accessor.java
100644 → 100755
Empty file.
137 changes: 137 additions & 0 deletions src/main/java/com/sun/xml/bind/v2/util/XmlFactory.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.sun.xml.bind.v2.util;

import com.sun.xml.bind.Util;
import com.sun.xml.bind.v2.Messages;

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerFactory;
import javax.xml.validation.SchemaFactory;
import javax.xml.xpath.XPathFactory;
import javax.xml.xpath.XPathFactoryConfigurationException;

import org.xml.sax.SAXNotRecognizedException;
import org.xml.sax.SAXNotSupportedException;

public class XmlFactory {
private static final Logger LOGGER = Logger.getLogger(XmlFactory.class.getName());
private static final String DISABLE_XML_SECURITY = "com.sun.xml.bind.disableXmlSecurity";
public static final boolean DISABLE_SECURE_PROCESSING = Boolean.parseBoolean(Util.getSystemProperty("com.sun.xml.bind.disableXmlSecurity"));

public XmlFactory() {
}

private static boolean xmlFeatureValue(boolean runtimeSetting) {
return !DISABLE_SECURE_PROCESSING && !runtimeSetting;
}

public static SchemaFactory createSchemaFactory(String language, boolean disableSecureProcessing) throws IllegalStateException {
try {
SchemaFactory factory = SchemaFactory.newInstance(language);
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, "SchemaFactory instance: {0}", factory);
}

factory.setFeature("http://javax.xml.XMLConstants/feature/secure-processing", xmlFeatureValue(disableSecureProcessing));
return factory;
} catch (SAXNotRecognizedException var3) {
LOGGER.log(Level.SEVERE, (String) null, var3);
throw new IllegalStateException(var3);
} catch (SAXNotSupportedException var4) {
LOGGER.log(Level.SEVERE, (String) null, var4);
throw new IllegalStateException(var4);
} catch (AbstractMethodError var5) {
LOGGER.log(Level.SEVERE, (String) null, var5);
throw new IllegalStateException(Messages.INVALID_JAXP_IMPLEMENTATION.format(new Object[0]), var5);
}
}

public static SAXParserFactory createParserFactory(boolean disableSecureProcessing) throws IllegalStateException {
try {
SAXParserFactory factory = new com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl();
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, "SAXParserFactory instance: {0}", factory);
}

factory.setNamespaceAware(true);
factory.setFeature("http://javax.xml.XMLConstants/feature/secure-processing", xmlFeatureValue(disableSecureProcessing));
return factory;
} catch (ParserConfigurationException var2) {
LOGGER.log(Level.SEVERE, (String) null, var2);
throw new IllegalStateException(var2);
} catch (SAXNotRecognizedException var3) {
LOGGER.log(Level.SEVERE, (String) null, var3);
throw new IllegalStateException(var3);
} catch (SAXNotSupportedException var4) {
LOGGER.log(Level.SEVERE, (String) null, var4);
throw new IllegalStateException(var4);
} catch (AbstractMethodError var5) {
LOGGER.log(Level.SEVERE, (String) null, var5);
throw new IllegalStateException(Messages.INVALID_JAXP_IMPLEMENTATION.format(new Object[0]), var5);
}
}

public static XPathFactory createXPathFactory(boolean disableSecureProcessing) throws IllegalStateException {
try {
XPathFactory factory = XPathFactory.newInstance();
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, "XPathFactory instance: {0}", factory);
}

factory.setFeature("http://javax.xml.XMLConstants/feature/secure-processing", xmlFeatureValue(disableSecureProcessing));
return factory;
} catch (XPathFactoryConfigurationException var2) {
LOGGER.log(Level.SEVERE, (String) null, var2);
throw new IllegalStateException(var2);
} catch (AbstractMethodError var3) {
LOGGER.log(Level.SEVERE, (String) null, var3);
throw new IllegalStateException(Messages.INVALID_JAXP_IMPLEMENTATION.format(new Object[0]), var3);
}
}

public static TransformerFactory createTransformerFactory(boolean disableSecureProcessing) throws IllegalStateException {
try {
TransformerFactory factory = TransformerFactory.newInstance();
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, "TransformerFactory instance: {0}", factory);
}

factory.setFeature("http://javax.xml.XMLConstants/feature/secure-processing", xmlFeatureValue(disableSecureProcessing));
return factory;
} catch (TransformerConfigurationException var2) {
LOGGER.log(Level.SEVERE, (String) null, var2);
throw new IllegalStateException(var2);
} catch (AbstractMethodError var3) {
LOGGER.log(Level.SEVERE, (String) null, var3);
throw new IllegalStateException(Messages.INVALID_JAXP_IMPLEMENTATION.format(new Object[0]), var3);
}
}

public static DocumentBuilderFactory createDocumentBuilderFactory(boolean disableSecureProcessing) throws IllegalStateException {
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, "DocumentBuilderFactory instance: {0}", factory);
}

factory.setNamespaceAware(true);
factory.setFeature("http://javax.xml.XMLConstants/feature/secure-processing", xmlFeatureValue(disableSecureProcessing));
return factory;
} catch (ParserConfigurationException var2) {
LOGGER.log(Level.SEVERE, (String) null, var2);
throw new IllegalStateException(var2);
} catch (AbstractMethodError var3) {
LOGGER.log(Level.SEVERE, (String) null, var3);
throw new IllegalStateException(Messages.INVALID_JAXP_IMPLEMENTATION.format(new Object[0]), var3);
}
}
}