jdk/src/java.base/share/classes/java/security/SecureRandom.java
changeset 33675 7d9d372a41df
parent 33241 27eb2d6abda9
child 34774 03b4e6dc367b
equal deleted inserted replaced
33674:566777f73c32 33675:7d9d372a41df
   417      * @return the name of the algorithm or {@code unknown}
   417      * @return the name of the algorithm or {@code unknown}
   418      *          if the algorithm name cannot be determined.
   418      *          if the algorithm name cannot be determined.
   419      * @since 1.5
   419      * @since 1.5
   420      */
   420      */
   421     public String getAlgorithm() {
   421     public String getAlgorithm() {
   422         return (algorithm != null) ? algorithm : "unknown";
   422         return Objects.toString(algorithm, "unknown");
   423     }
   423     }
   424 
   424 
   425     /**
   425     /**
   426      * Reseeds this random object. The given seed supplements, rather than
   426      * Reseeds this random object. The given seed supplements, rather than
   427      * replaces, the existing seed. Thus, repeated calls are guaranteed
   427      * replaces, the existing seed. Thus, repeated calls are guaranteed