src/java.base/share/classes/sun/security/provider/ConfigFile.java
changeset 53018 8bf9268df0e2
parent 47216 71c04702a3d5
child 59024 b046ba510bbc
equal deleted inserted replaced
53017:e10a1f7aaa13 53018:8bf9268df0e2
   624                 // correct one.
   624                 // correct one.
   625                 try {
   625                 try {
   626                     return url.openStream();
   626                     return url.openStream();
   627                 } catch (Exception e) {
   627                 } catch (Exception e) {
   628                     String file = url.getPath();
   628                     String file = url.getPath();
   629                     if (url.getHost().length() > 0) {  // For Windows UNC
   629                     if (!url.getHost().isEmpty()) {  // For Windows UNC
   630                         file = "//" + url.getHost() + file;
   630                         file = "//" + url.getHost() + file;
   631                     }
   631                     }
   632                     if (debugConfig != null) {
   632                     if (debugConfig != null) {
   633                         debugConfig.println("cannot read " + url +
   633                         debugConfig.println("cannot read " + url +
   634                                             ", try " + file);
   634                                             ", try " + file);
   649 
   649 
   650             if (!expandProp) {
   650             if (!expandProp) {
   651                 return value;
   651                 return value;
   652             }
   652             }
   653             String s = PropertyExpander.expand(value);
   653             String s = PropertyExpander.expand(value);
   654             if (s == null || s.length() == 0) {
   654             if (s == null || s.isEmpty()) {
   655                 throw ioException(
   655                 throw ioException(
   656                     "Configuration.Error.Line.line.system.property.value.expanded.to.empty.value",
   656                     "Configuration.Error.Line.line.system.property.value.expanded.to.empty.value",
   657                     linenum, value);
   657                     linenum, value);
   658             }
   658             }
   659             return s;
   659             return s;