1. tbrugz
  2. sqldump

Commits

tbrugz  committed dece2c5

grabber: executable: fixed grab of IN/OUT parameter ; fix for ResultSet2GraphML (snippet load)

  • Participants
  • Parent commits 4daef18
  • Branches default

Comments (0)

Files changed (3)

File src/tbrugz/sqldump/dbmodel/ExecutableParameter.java

View file
  • Ignore whitespace
 	public enum INOUT {
 		IN,
 		OUT,
-		INOUT
+		INOUT;
+		
+		public static INOUT getValue(String s) {
+			if("IN/OUT".equals(s)) { return INOUT; }
+			return valueOf(s);
+		}
 	}
 	
 	public String name;

File src/tbrugz/sqldump/dbmsfeatures/OracleFeatures.java

View file
  • Ignore whitespace
 			ep.position = rs.getInt(9);
 			String inout = rs.getString(12);
 			if(inout!=null) {
-				ep.inout = INOUT.valueOf(inout);
+				try {
+					ep.inout = INOUT.getValue(inout);
+				}
+				catch(IllegalArgumentException e) {
+					log.warn("illegal INOUT value: "+inout);
+				}
 			}
 			//log.info("parameter: "+ep);
 			if(ep.position==0) {

File src_graphml/tbrugz/sqldump/graph/ResultSet2GraphML.java

View file
  • Ignore whitespace
 		DumpGraphMLModel dg = new DumpResultSetGraphMLModel();
 		dg.loadSnippets(DEFAULT_SNIPPETS);
 		if(snippets!=null) {
-			dg.loadSnippets(snippets);
+			try {
+				dg.loadSnippets(snippets);
+			}
+			catch(NullPointerException e) {
+				log.warn("error opening snippets file: "+snippets);
+			}
 		}
 		Utils.prepareDir(output);
 		dg.dumpModel(r, new PrintStream(output));