MCPcopy Create free account
hub / github.com/MariaDB/server / getLine

Method getLine

storage/connect/TestInsert2.java:103–129  ·  view source on GitHub ↗
(String p, boolean b)

Source from the content-addressed store, hash-verified

101
102 // ==================================================================
103 private static String getLine(String p, boolean b) {
104 String response;
105
106 if (c != null) {
107 // Standard console mode
108 if (b) {
109 response = new String(c.readPassword(p));
110 } else
111 response = c.readLine(p);
112
113 } else {
114 // For instance when testing from Eclipse
115 BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
116
117 System.out.print(p);
118
119 try {
120 // Cannot suppress echo for password entry
121 response = in.readLine();
122 } catch (IOException e) {
123 response = "";
124 } // end of try/catch
125
126 } // endif c
127
128 return (response.isEmpty()) ? null : response;
129 } // end of getLine
130
131}

Callers 1

mainMethod · 0.95

Calls 1

printMethod · 0.45

Tested by

no test coverage detected