Author: richard.opalka(a)jboss.com
Date: 2012-07-20 07:52:03 -0400 (Fri, 20 Jul 2012)
New Revision: 16508
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/XSDWriter.java
Log:
fix compilation issues
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java 2012-07-20
11:51:45 UTC (rev 16507)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java 2012-07-20
11:52:03 UTC (rev 16508)
@@ -542,28 +542,28 @@
fname = fname.replace(':', '_');
fname = fname.replace('?', '_');
fname = fname.replace('#', '_');
-
+
File file = null;
- try
+ if (fileName != null)
{
- String fileNameHash =
toHexString(MessageDigest.getInstance("MD5").digest(fileName.getBytes("UTF-8")));
- if(tmpdir == null)
+ try
{
- tmpdir = (File) AccessController.doPrivileged(new PrivilegedAction() {
- public Object run()
- {
- return new File(System.getProperty("java.io.tmpdir"));
- }
- });
+ String fileNameHash =
toHexString(MessageDigest.getInstance("MD5").digest(fileName.getBytes("UTF-8")));
+ if(tmpdir == null)
+ {
+ tmpdir = (File) AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run()
+ {
+ return new File(System.getProperty("java.io.tmpdir"));
+ }
+ });
+ }
+ return new File(tmpdir + File.separator + "JBossWS_" + fname +
"_" + fileNameHash + ".xsd");
}
- file = new File(tmpdir + File.separator + "JBossWS_" + fname +
"_" + fileNameHash + ".xsd");
+ catch(NoSuchAlgorithmException ignore) {}
}
- catch(NoSuchAlgorithmException noAlgEx)
- {
- file = File.createTempFile("JBossWS_" + fname, ".xsd",
tmpdir);
- }
- return file;
+ return File.createTempFile("JBossWS_" + fname, ".xsd",
tmpdir);
}
private static String toHexString(byte[] hash)
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/XSDWriter.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/XSDWriter.java 2012-07-20
11:51:45 UTC (rev 16507)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/XSDWriter.java 2012-07-20
11:52:03 UTC (rev 16508)
@@ -89,7 +89,7 @@
log.trace("serialize:\n" + xsdString);
// Write updated xsd file
- File xsdFile = SchemaUtils.getSchemaTempFile(ns);
+ File xsdFile = SchemaUtils.getSchemaTempFile(ns, null);
FileWriter writer = new FileWriter(xsdFile);
try
{
Show replies by date