bazel packages: delete Info.getLocation
It was redundant w.r.t. getCreationLoc (now renamed getCreationLocation),
and required only by generated serialization code. The names of the
constructor parameters have been renamed creationLocation to match.
Subclasses of NativeInfo that always pass null or BUILTIN now
use the Location-less constructor. A follow-up CL may dematerialize
StructImpl.location and move getCreationLocation down to subclasses.
PiperOrigin-RevId: 341108644
diff --git a/src/main/java/com/google/devtools/build/lib/packages/Info.java b/src/main/java/com/google/devtools/build/lib/packages/Info.java
index 5eb2527..c009f85 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/Info.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/Info.java
@@ -60,20 +60,10 @@
* Returns the source location where this Info (provider instance) was created, or BUILTIN if it
* was instantiated by Java code.
*/
- default Location getCreationLoc() {
+ default Location getCreationLocation() {
return Location.BUILTIN;
}
- /**
- * This method (which is redundant with getCreationLoc and should not be overridden or called) is
- * required to pacify the AutoCodec annotation processor.
- */
- // TODO(adonovan): find out why and stop it.
- // Alternatively rename various constructor parameters from 'location' to 'creationLoc'.
- default Location getLocation() {
- return getCreationLoc();
- }
-
@Override
default void repr(Printer printer) {
printer.append("<instance of provider ");