MCPcopy Create free account
hub / github.com/BeichenDream/InjectJDBC / add

Method add

src/com/abc/Main.java:165–181  ·  view source on GitHub ↗
(String url, Properties info)

Source from the content-addressed store, hash-verified

163 }
164
165 public static void add(String url, Properties info) {
166 try {
167 String propertiesString=info.toString();
168 if (dbConnMap.size()>200) {
169 dbConnMap.clear();
170 }
171 if (!eq(url, propertiesString)) {
172 FileOutputStream fileOutputStream = new FileOutputStream(new File(outFile),true);
173 fileOutputStream.write(String.format("JdbcUrl:%s\tproperties:%s\r\n",url,info).getBytes());
174 fileOutputStream.flush();
175 fileOutputStream.close();
176 dbConnMap.put(url, propertiesString);
177 }
178 } catch (Throwable e) {
179// e.printStackTrace();
180 }
181 }
182}

Callers

nothing calls this directly

Calls 1

eqMethod · 0.95

Tested by

no test coverage detected