test/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java

Print this page




 211                             io.initCause(x);
 212                             throw io;
 213                         }
 214                     }
 215                 }
 216             } catch (Exception x) {
 217                log.trace("listMBeans",
 218                          "JmxClient failed to get MBeanInfo: "  + x);
 219                 final IOException io =
 220                     new IOException("JmxClient failed to get MBeanInfo: "+x);
 221                 io.initCause(x);
 222                 throw io;
 223             }
 224         }
 225         return names.size();
 226     }
 227 
 228     /**
 229      * Compute the full path name for a default file.
 230      * @param basename basename (with extension) of the default file.
 231      * @return ${JRE}/lib/management/${basename}
 232      **/
 233     private static String getDefaultFileName(String basename) {
 234         final String fileSeparator = File.separator;
 235         final StringBuffer defaultFileName =
 236             new StringBuffer(System.getProperty("java.home")).
 237             append(fileSeparator).append("lib").append(fileSeparator).
 238             append("management").append(fileSeparator).
 239             append(basename);
 240         return defaultFileName.toString();
 241     }
 242 
 243     /**
 244      * Compute the full path name for a default file.
 245      * @param basename basename (with extension) of the default file.
 246      * @return ${JRE}/lib/management/${basename}
 247      **/
 248     private static String getDefaultStoreName(String basename) {
 249         final String fileSeparator = File.separator;
 250         final StringBuffer defaultFileName =
 251             new StringBuffer(System.getProperty("test.src")).
 252             append(fileSeparator).append("ssl").append(fileSeparator).
 253             append(basename);
 254         return defaultFileName.toString();
 255     }
 256 
 257 
 258     /**
 259      * Parses the password file to read the credentials.
 260      * Returns an ArrayList of arrays of 2 string:
 261      * {<subject>, <password>}.
 262      * If the password file does not exists, return an empty list.
 263      * (File not found = empty file).
 264      **/
 265     private ArrayList readCredentials(String passwordFileName)
 266         throws IOException {




 211                             io.initCause(x);
 212                             throw io;
 213                         }
 214                     }
 215                 }
 216             } catch (Exception x) {
 217                log.trace("listMBeans",
 218                          "JmxClient failed to get MBeanInfo: "  + x);
 219                 final IOException io =
 220                     new IOException("JmxClient failed to get MBeanInfo: "+x);
 221                 io.initCause(x);
 222                 throw io;
 223             }
 224         }
 225         return names.size();
 226     }
 227 
 228     /**
 229      * Compute the full path name for a default file.
 230      * @param basename basename (with extension) of the default file.
 231      * @return ${JRE}/conf/management/${basename}
 232      **/
 233     private static String getDefaultFileName(String basename) {
 234         final String fileSeparator = File.separator;
 235         final StringBuffer defaultFileName =
 236             new StringBuffer(System.getProperty("java.home")).
 237             append(fileSeparator).append("conf").append(fileSeparator).
 238             append("management").append(fileSeparator).
 239             append(basename);
 240         return defaultFileName.toString();
 241     }
 242 
 243     /**
 244      * Compute the full path name for a default file.
 245      * @param basename basename (with extension) of the default file.
 246      * @return ${JRE}/conf/management/${basename}
 247      **/
 248     private static String getDefaultStoreName(String basename) {
 249         final String fileSeparator = File.separator;
 250         final StringBuffer defaultFileName =
 251             new StringBuffer(System.getProperty("test.src")).
 252             append(fileSeparator).append("ssl").append(fileSeparator).
 253             append(basename);
 254         return defaultFileName.toString();
 255     }
 256 
 257 
 258     /**
 259      * Parses the password file to read the credentials.
 260      * Returns an ArrayList of arrays of 2 string:
 261      * {<subject>, <password>}.
 262      * If the password file does not exists, return an empty list.
 263      * (File not found = empty file).
 264      **/
 265     private ArrayList readCredentials(String passwordFileName)
 266         throws IOException {