File tree Expand file tree Collapse file tree
src/org/labkey/test/params Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import org .apache .commons .lang3 .StringUtils ;
44import org .jetbrains .annotations .NotNull ;
5+ import org .jetbrains .annotations .Nullable ;
56
67import java .util .ArrayList ;
78import java .util .Arrays ;
@@ -65,15 +66,22 @@ public static FieldKey fromParts(String... parts)
6566 * @param fieldKey String or FieldKey
6667 * @return FieldKey representation of the String, or the identity if a FieldKey was provided
6768 */
68- public static FieldKey fromFieldKey (CharSequence fieldKey )
69+ public static @ Nullable FieldKey fromFieldKey (CharSequence fieldKey )
6970 {
7071 if (fieldKey instanceof WrapsFieldKey fk )
7172 {
7273 return fk .getFieldKey ();
7374 }
7475 else
7576 {
76- return fromParts (Arrays .stream (fieldKey .toString ().split (SEPARATOR )).map (FieldKey ::decodePart ).toList ());
77+ try
78+ {
79+ return fromParts (Arrays .stream (fieldKey .toString ().split (SEPARATOR )).map (FieldKey ::decodePart ).toList ());
80+ }
81+ catch (IllegalArgumentException iae )
82+ {
83+ return null ; // FieldReferenceManager depends on this returning null.
84+ }
7785 }
7886 }
7987
You can’t perform that action at this time.
0 commit comments