Sign in
chromium
/
external
/
github.com
/
google
/
error-prone
/
refs/heads/copybara-sync
/
.
/
docs
/
bugpattern
/
ProtoStringFieldReferenceEquality.md
blob: 5f64c0c20cd0f92f31b7564ad8d798aaa4d8b187 [
file
] [
log
] [
blame
] [
view
] [
edit
]
Comparing
strings
with
==
is
almost always an error
,
but it
is
an error
100
%
of
the time
when
one of the strings
is
a protobuf field
.
Additionally
,
protobuf
fields cannot be
null
,
so
Object
.
equals
(
Object
)
is
always more correct
.