mirror of
https://github.com/lightbend/config.git
synced 2025-01-29 05:30:08 +08:00
Some formatting changes
(basically change from 80 to 100 column wrap)
This commit is contained in:
parent
1310bc258a
commit
e2c0979422
@ -109,8 +109,8 @@ public abstract class Parseable implements ConfigParseable {
|
|||||||
if (value instanceof AbstractConfigObject) {
|
if (value instanceof AbstractConfigObject) {
|
||||||
return (AbstractConfigObject) value;
|
return (AbstractConfigObject) value;
|
||||||
} else {
|
} else {
|
||||||
throw new ConfigException.WrongType(value.origin(), "",
|
throw new ConfigException.WrongType(value.origin(), "", "object at file root", value
|
||||||
"object at file root", value.valueType().name());
|
.valueType().name());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -215,8 +215,7 @@ public abstract class Parseable implements ConfigParseable {
|
|||||||
Reader reader = new InputStreamReader(input, "UTF-8");
|
Reader reader = new InputStreamReader(input, "UTF-8");
|
||||||
return new BufferedReader(reader);
|
return new BufferedReader(reader);
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
throw new ConfigException.BugOrBroken(
|
throw new ConfigException.BugOrBroken("Java runtime does not support UTF-8", e);
|
||||||
"Java runtime does not support UTF-8", e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -377,8 +376,7 @@ public abstract class Parseable implements ConfigParseable {
|
|||||||
URL url = relativeTo(input, filename);
|
URL url = relativeTo(input, filename);
|
||||||
if (url == null)
|
if (url == null)
|
||||||
return null;
|
return null;
|
||||||
return newURL(url, options()
|
return newURL(url, options().setOriginDescription(null));
|
||||||
.setOriginDescription(null));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -388,8 +386,7 @@ public abstract class Parseable implements ConfigParseable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return getClass().getSimpleName() + "(" + input.toExternalForm()
|
return getClass().getSimpleName() + "(" + input.toExternalForm() + ")";
|
||||||
+ ")";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -469,8 +466,7 @@ public abstract class Parseable implements ConfigParseable {
|
|||||||
final private ClassLoader loader;
|
final private ClassLoader loader;
|
||||||
final private String resource;
|
final private String resource;
|
||||||
|
|
||||||
ParseableResources(ClassLoader loader, String resource,
|
ParseableResources(ClassLoader loader, String resource, ConfigParseOptions options) {
|
||||||
ConfigParseOptions options) {
|
|
||||||
this.loader = loader;
|
this.loader = loader;
|
||||||
this.resource = resource;
|
this.resource = resource;
|
||||||
postConstruct(options);
|
postConstruct(options);
|
||||||
@ -478,8 +474,7 @@ public abstract class Parseable implements ConfigParseable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Reader reader() throws IOException {
|
protected Reader reader() throws IOException {
|
||||||
throw new ConfigException.BugOrBroken(
|
throw new ConfigException.BugOrBroken("reader() should not be called on resources");
|
||||||
"reader() should not be called on resources");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -581,8 +576,7 @@ public abstract class Parseable implements ConfigParseable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Parseable newResources(Class<?> klass, String resource,
|
public static Parseable newResources(Class<?> klass, String resource, ConfigParseOptions options) {
|
||||||
ConfigParseOptions options) {
|
|
||||||
return newResources(klass.getClassLoader(), convertResourceName(klass, resource), options);
|
return newResources(klass.getClassLoader(), convertResourceName(klass, resource), options);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -626,8 +620,7 @@ public abstract class Parseable implements ConfigParseable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Reader reader() throws IOException {
|
protected Reader reader() throws IOException {
|
||||||
throw new ConfigException.BugOrBroken(
|
throw new ConfigException.BugOrBroken("reader() should not be called on props");
|
||||||
"reader() should not be called on props");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -654,8 +647,7 @@ public abstract class Parseable implements ConfigParseable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Parseable newProperties(Properties properties,
|
public static Parseable newProperties(Properties properties, ConfigParseOptions options) {
|
||||||
ConfigParseOptions options) {
|
|
||||||
return new ParseableProperties(properties, options);
|
return new ParseableProperties(properties, options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user