Fixed StandardTypeLocator to only know about java.lang.* out of the box. Doc fixes related to that.
This commit is contained in:
@@ -65,7 +65,6 @@ public class StandardTypeComparator implements TypeComparator {
|
||||
return ((Comparable) left).compareTo(right);
|
||||
}
|
||||
|
||||
// How do we get to this line...?
|
||||
throw new SpelException(SpelMessages.NOT_COMPARABLE, left.getClass(), right.getClass());
|
||||
}
|
||||
|
||||
|
||||
@@ -47,8 +47,8 @@ public class StandardTypeLocator implements TypeLocator {
|
||||
|
||||
public StandardTypeLocator(ClassLoader loader) {
|
||||
this.loader = loader;
|
||||
// Similar to when writing Java, it only knows about java.lang by default
|
||||
registerImport("java.lang");
|
||||
registerImport("java.util");
|
||||
}
|
||||
|
||||
|
||||
@@ -95,5 +95,9 @@ public class StandardTypeLocator implements TypeLocator {
|
||||
public List<String> getImportPrefixes() {
|
||||
return Collections.unmodifiableList(this.knownPackagePrefixes);
|
||||
}
|
||||
|
||||
public void removeImport(String prefix) {
|
||||
this.knownPackagePrefixes.remove(prefix);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user