@Test(expected = IllegalArgumentException.class) public void emptyLastSegmentIsInvalid() { FieldPath.fromDotSeparatedPath("a."); }
static FieldPath fromDotSeparatedPath(@NonNull String path) { checkNotNull(path, "Provided field path must not be null."); checkArgument( !RESERVED.matcher(path).find(), "Use FieldPath.of() for field names containing '~*/[]'."); try { return com.google.firebase.firestore.FieldPath.of(path.split("\\.", -1)); } catch (IllegalArgumentException e) { throw new IllegalArgumentException( "Invalid field path (" + path + "). Paths must not be empty, begin with '.', end with '.', or contain '..'"); } }
FieldPath { static FieldPath fromDotSeparatedPath(@NonNull String path) { checkNotNull(path, "Provided field path must not be null."); checkArgument( !RESERVED.matcher(path).find(), "Use FieldPath.of() for field names containing '~*/[]'."); try { return com.google.firebase.firestore.FieldPath.of(path.split("\\.", -1)); } catch (IllegalArgumentException e) { throw new IllegalArgumentException( "Invalid field path (" + path + "). Paths must not be empty, begin with '.', end with '.', or contain '..'"); } } }
FieldPath { static FieldPath fromDotSeparatedPath(@NonNull String path) { checkNotNull(path, "Provided field path must not be null."); checkArgument( !RESERVED.matcher(path).find(), "Use FieldPath.of() for field names containing '~*/[]'."); try { return com.google.firebase.firestore.FieldPath.of(path.split("\\.", -1)); } catch (IllegalArgumentException e) { throw new IllegalArgumentException( "Invalid field path (" + path + "). Paths must not be empty, begin with '.', end with '.', or contain '..'"); } } private  FieldPath(List<String> segments); private  FieldPath(com.google.firebase.firestore.model.FieldPath internalPath); }
FieldPath { static FieldPath fromDotSeparatedPath(@NonNull String path) { checkNotNull(path, "Provided field path must not be null."); checkArgument( !RESERVED.matcher(path).find(), "Use FieldPath.of() for field names containing '~*/[]'."); try { return com.google.firebase.firestore.FieldPath.of(path.split("\\.", -1)); } catch (IllegalArgumentException e) { throw new IllegalArgumentException( "Invalid field path (" + path + "). Paths must not be empty, begin with '.', end with '.', or contain '..'"); } } private  FieldPath(List<String> segments); private  FieldPath(com.google.firebase.firestore.model.FieldPath internalPath); @NonNull static FieldPath of(String... fieldNames); @NonNull static FieldPath documentId(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
FieldPath { static FieldPath fromDotSeparatedPath(@NonNull String path) { checkNotNull(path, "Provided field path must not be null."); checkArgument( !RESERVED.matcher(path).find(), "Use FieldPath.of() for field names containing '~*/[]'."); try { return com.google.firebase.firestore.FieldPath.of(path.split("\\.", -1)); } catch (IllegalArgumentException e) { throw new IllegalArgumentException( "Invalid field path (" + path + "). Paths must not be empty, begin with '.', end with '.', or contain '..'"); } } private  FieldPath(List<String> segments); private  FieldPath(com.google.firebase.firestore.model.FieldPath internalPath); @NonNull static FieldPath of(String... fieldNames); @NonNull static FieldPath documentId(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }