mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Moved a few variables closer to the point where they are actually used, but only in cases where this means moving them past a (potential) return/throw statement. (#1029)
This commit is contained in:
committed by
Rob Bygrave
parent
9e2923f571
commit
b4e2c89e2d
@@ -27,16 +27,17 @@ public final class TimeStringParser implements StringParser {
|
||||
}
|
||||
|
||||
String s = value.trim();
|
||||
int minute;
|
||||
int second;
|
||||
int firstColon = s.indexOf(':');
|
||||
int secondColon = s.indexOf(':', firstColon + 1);
|
||||
|
||||
if (firstColon == -1) {
|
||||
throw new java.lang.IllegalArgumentException("No ':' in value [" + s + "]");
|
||||
}
|
||||
try {
|
||||
int second;
|
||||
int minute;
|
||||
int hour = Integer.parseInt(s.substring(0, firstColon));
|
||||
int secondColon = s.indexOf(':', firstColon + 1);
|
||||
|
||||
if (secondColon == -1) {
|
||||
minute = Integer.parseInt(s.substring(firstColon + 1, s.length()));
|
||||
second = 0;
|
||||
|
||||
@@ -2176,12 +2176,13 @@ public class BeanDescriptor<T> implements MetaBeanInfo, BeanType<T> {
|
||||
if (basePos > -1) {
|
||||
// nested or embedded property
|
||||
String baseName = propName.substring(0, basePos);
|
||||
String remainder = propName.substring(basePos + 1);
|
||||
|
||||
BeanProperty assocProp = _findBeanProperty(baseName);
|
||||
if (assocProp == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
String remainder = propName.substring(basePos + 1);
|
||||
return assocProp.buildElPropertyValue(propName, remainder, chain, propertyDeploy);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user