Permalink
Browse files

nightly build

  • Loading branch information...
1 parent 2d885ac commit aa93f5ab42d000b0b404415a649e6d1390cd41e6 @tranchis tranchis committed Dec 9, 2009
View
@@ -32,8 +32,7 @@
<jar destfile="dist/xsd2thrift.jar"
basedir="bin/"
includes="**/*.class"
- manifest="META-INF/MANIFEST.MF"
- />
+ manifest="META-INF/MANIFEST.MF" />
</target>
<target name="build-subprojects"/>
<target depends="init" name="build-project">
View
No changes.
View
Binary file not shown.
@@ -73,13 +73,15 @@ public static void main(String[] args) throws Exception
im = null;
map = new TreeMap<String,String>();
- map.put("schema_._type", "BaseObject");
+ map.put("schema_._type", "binary");
map.put("EString", "string");
map.put("EBoolean", "boolean");
map.put("EInt", "integer");
map.put("EDate", "long");
map.put("EChar", "byte");
map.put("EFloat", "decimal");
+ map.put("EObject", "binary");
+ map.put("Extension", "binary");
if(args.length == 0 || args[args.length-1].startsWith("--"))
{
@@ -179,10 +179,6 @@ private void writeMap() throws Exception
while(its.hasNext())
{
st = its.next();
-// if(ss.contains(st))
-// {
-// System.out.println(st.getName() + ": " + st.getTypes());
-// }
if(ss.contains(st) && declared.containsAll(st.getTypes()))
{
os.write(marshaller.writeStructHeader(escape(st.getName())).getBytes());
@@ -246,6 +242,16 @@ private void writeMap() throws Exception
if(!ss.isEmpty())
{
+ System.err.println("Bug: unable to interpret the file. Dumping conflicting structs...");
+ its = map.values().iterator();
+ while(its.hasNext())
+ {
+ st = its.next();
+ if(ss.contains(st))
+ {
+ System.err.println(st.getName() + ": " + st.getTypes());
+ }
+ }
throw new Exception();
}
}
@@ -524,21 +530,21 @@ private Struct createNestedType(String name, XSComplexType type)
@Override
public void error(SAXParseException exception) throws SAXException
{
- System.out.println(exception.getMessage());
+ System.out.println(exception.getMessage() + " at " + exception.getSystemId());
exception.printStackTrace();
}
@Override
public void fatalError(SAXParseException exception) throws SAXException
{
- System.out.println(exception.getMessage());
+ System.out.println(exception.getMessage() + " at " + exception.getSystemId());
exception.printStackTrace();
}
@Override
public void warning(SAXParseException exception) throws SAXException
{
- System.out.println(exception.getMessage());
+ System.out.println(exception.getMessage() + " at " + exception.getSystemId());
exception.printStackTrace();
}
View
No changes.

0 comments on commit aa93f5a

Please sign in to comment.