This commit is contained in:
@@ -175,8 +175,9 @@ public final class ClassFilter<T> {
|
|||||||
}
|
}
|
||||||
if (!r && ors != null) {
|
if (!r && ors != null) {
|
||||||
for (ClassFilter filter : ors) {
|
for (ClassFilter filter : ors) {
|
||||||
if (filter.accept(property, clazzname)) {
|
if (filter.accept(filter.conf, clazzname)) {
|
||||||
cf = filter;
|
cf = filter;
|
||||||
|
property = cf.conf;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -189,11 +190,11 @@ public final class ClassFilter<T> {
|
|||||||
if (property == null) {
|
if (property == null) {
|
||||||
property = cf.conf;
|
property = cf.conf;
|
||||||
} else if (property instanceof DefaultAnyValue) {
|
} else if (property instanceof DefaultAnyValue) {
|
||||||
((DefaultAnyValue) property).addAll(cf.conf);
|
((DefaultAnyValue) property).addAllStringSet(cf.conf);
|
||||||
} else {
|
} else {
|
||||||
DefaultAnyValue dav = new DefaultAnyValue();
|
DefaultAnyValue dav = new DefaultAnyValue();
|
||||||
dav.addAll(property);
|
dav.addAllStringSet(property);
|
||||||
dav.addAll(cf.conf);
|
dav.addAllStringSet(cf.conf);
|
||||||
property = dav;
|
property = dav;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -243,7 +244,7 @@ public final class ClassFilter<T> {
|
|||||||
}
|
}
|
||||||
if (!r && ors != null) {
|
if (!r && ors != null) {
|
||||||
for (ClassFilter filter : ors) {
|
for (ClassFilter filter : ors) {
|
||||||
if (filter.accept(property, classname)) return true;
|
if (filter.accept(filter.conf, classname)) return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
|
|||||||
@@ -129,6 +129,17 @@ public abstract class AnyValue {
|
|||||||
return rs;
|
return rs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//去重
|
||||||
|
public DefaultAnyValue addAllStringSet(final AnyValue av) {
|
||||||
|
if (av == null) return this;
|
||||||
|
final Entry<String>[] strings = av.getStringEntrys();
|
||||||
|
if (strings == null) return this;
|
||||||
|
for (Entry<String> en : strings) {
|
||||||
|
if (getValue(en.name) == null) this.addValue(en.name, en.value);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public DefaultAnyValue addAll(final AnyValue av) {
|
public DefaultAnyValue addAll(final AnyValue av) {
|
||||||
if (av == null) return this;
|
if (av == null) return this;
|
||||||
if (av instanceof DefaultAnyValue) {
|
if (av instanceof DefaultAnyValue) {
|
||||||
|
|||||||
Reference in New Issue
Block a user