/** * Gets the local host from the given service object. * @param s the service to check. * @return the local host or null. * @since JavaMail 1.5.3 */ private String getLocalHost(final Service s) { try { return LogManagerProperties.getLocalHost(s); } catch (SecurityException | NoSuchMethodException | LinkageError ignore) { } catch (final Exception ex) { reportError(s.toString(), ex, ErrorManager.OPEN_FAILURE); } return null; }
/** * Gets the local host from the given service object. * @param s the service to check. * @return the local host or null. * @since JavaMail 1.5.3 */ private String getLocalHost(final Service s) { try { return LogManagerProperties.getLocalHost(s); } catch (final SecurityException ignore) { } catch (final NoSuchMethodException ignore) { } catch (final LinkageError ignore) { } catch (final Exception ex) { reportError(s.toString(), ex, ErrorManager.OPEN_FAILURE); } return null; }
DERObjectIdentifier oid = null; String digestAlgorithmName = "SHA-224"; Provider provider = Security.getProvider(BouncyCastleProvider.PROVIDER_NAME); Service service = provider.getService("MessageDigest", digestAlgorithmName); if (service != null) { String string = service.toString(); String array[] = string.split("\n"); if (array.length > 1) { string = array[array.length - 1]; array = string.split("[\\[\\]]"); if (array.length > 2) { string = array[array.length - 2]; array = string.split(", "); Arrays.sort(array); oid = new ASN1ObjectIdentifier(array[0]); } } }
/** * Gets the local host from the given service object. * @param s the service to check. * @return the local host or null. * @since JavaMail 1.5.3 */ private String getLocalHost(final Service s) { try { return LogManagerProperties.getLocalHost(s); } catch (SecurityException | NoSuchMethodException | LinkageError ignore) { } catch (final Exception ex) { reportError(s.toString(), ex, ErrorManager.OPEN_FAILURE); } return null; }
/** * Gets the local host from the given service object. * @param s the service to check. * @return the local host or null. * @since JavaMail 1.5.3 */ private String getLocalHost(final Service s) { try { return LogManagerProperties.getLocalHost(s); } catch (SecurityException | NoSuchMethodException | LinkageError ignore) { } catch (final Exception ex) { reportError(s.toString(), ex, ErrorManager.OPEN_FAILURE); } return null; }
/** * Gets the local host from the given service object. * @param s the service to check. * @return the local host or null. * @since JavaMail 1.5.3 */ private String getLocalHost(final Service s) { try { return LogManagerProperties.getLocalHost(s); } catch (SecurityException | NoSuchMethodException | LinkageError ignore) { } catch (final Exception ex) { reportError(s.toString(), ex, ErrorManager.OPEN_FAILURE); } return null; }
/** * Gets the local host from the given service object. * @param s the service to check. * @return the local host or null. * @since JavaMail 1.5.3 */ private String getLocalHost(final Service s) { try { return LogManagerProperties.getLocalHost(s); } catch (SecurityException | NoSuchMethodException | LinkageError ignore) { } catch (final Exception ex) { reportError(s.toString(), ex, ErrorManager.OPEN_FAILURE); } return null; }