comparison tests/Test_PSmetadata.java @ 172:60063c67f9e7 embedded

Merged with default
author Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
date Tue, 19 Sep 2017 13:49:34 +0200 (2017-09-19)
parents 551093abca52 92a1b08a1018
children 5b13ccaba741
comparison
equal deleted inserted replaced
171:0f95fee3cf29 172:60063c67f9e7
75 } 75 }
76 76
77 con.rollback(); 77 con.rollback();
78 con.close(); 78 con.close();
79 } 79 }
80
81 private static String isInstance(Object obj, String type) {
82 if (obj == null)
83 return("(null)");
84 try {
85 Class c = Class.forName(type);
86 if (c.isInstance(obj)) {
87 return(obj.getClass().getName() + " is an instance of " + type);
88 } else {
89 return(obj.getClass().getName() + " is NOT an instance of " + type);
90 }
91 } catch (ClassNotFoundException e) {
92 return("No such class: " + type);
93 }
94 }
95 } 80 }