Rename Java packages to use the .google TLD

The dark lord Gosling designed the Java package naming system so that
ownership flows from the DNS system. Since we own the domain name
registry.google, it seems only appropriate that we should use
google.registry as our package name.
This commit is contained in:
Michael Muller 2016-04-26 11:05:00 -04:00 committed by Justine Tunney
parent 5012893c1d
commit c458c05801
1309 changed files with 10981 additions and 10378 deletions

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.appengine.api.ThreadManager.currentRequestThreadFactory;
@ -23,7 +23,6 @@ import java.util.List;
import java.util.concurrent.AbstractExecutorService;
import java.util.concurrent.TimeUnit;
/**
* A factory for {@link TimeLimiter} instances that use request threads, which carry the namespace
* and live only as long as the request that spawned them.

View file

@ -1,7 +1,9 @@
package(
default_visibility = ["//java/com/google/domain/registry:registry_project"],
default_visibility = ["//java/google/registry:registry_project"],
)
licenses(["notice"]) # Apache 2.0
java_library(
name = "util",
@ -19,7 +21,6 @@ java_library(
"//java/com/google/common/primitives",
"//java/com/google/common/reflect",
"//java/com/google/common/util/concurrent",
"//java/com/google/domain/registry/config",
"//third_party/java/appengine:appengine-api",
"//third_party/java/dagger",
"//third_party/java/icu4j",
@ -28,6 +29,7 @@ java_library(
"//third_party/java/jsr330_inject",
"//third_party/java/objectify:objectify-v4_1",
"//third_party/java/servlet/servlet_api",
"//java/google/registry/config",
],
)

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import java.util.Enumeration;
import java.util.HashMap;

View file

@ -12,14 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.Suppliers.memoizeWithExpiration;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static org.joda.time.Duration.ZERO;
import com.google.common.base.Supplier;
import com.google.domain.registry.config.RegistryEnvironment;
import google.registry.config.RegistryEnvironment;
import org.joda.time.Duration;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import com.google.common.collect.Iterables;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.Preconditions.checkArgument;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import org.joda.time.DateTime;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.MoreObjects.firstNonNull;
import static com.google.common.collect.Iterables.isEmpty;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.appengine.api.ThreadManager.currentRequestThreadFactory;
import static com.google.common.base.Preconditions.checkNotNull;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import com.google.appengine.api.datastore.Key;
import com.google.common.base.Function;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.Preconditions.checkArgument;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.Predicates.notNull;
import static com.google.common.collect.Lists.newArrayList;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.Preconditions.checkArgument;
@ -48,7 +48,7 @@ public final class DomainNameUtils {
* <p>This function is compatible with multi-part tlds, e.g. {@code co.uk}. This function will
* also work on domains for which the registry is not authoritative. If you are certain that the
* input will be under a TLD this registry controls, then it is preferable to use
* {@link com.google.domain.registry.model.registry.Registries#findTldForName(InternetDomainName)
* {@link google.registry.model.registry.Registries#findTldForName(InternetDomainName)
* Registries#findTldForName}, which will work on hostnames in addition to domains.
*
* @param fullyQualifiedDomainName must be a punycode SLD (not a host or unicode)

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static java.util.Arrays.asList;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import com.google.common.base.Joiner;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import com.google.common.io.Files;

View file

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.domain.registry.util.CollectionUtils.union;
import static google.registry.util.CollectionUtils.union;
import com.google.common.collect.ImmutableSet;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
@ -32,7 +32,7 @@ import java.lang.annotation.Target;
* <p>When this annotation is used on methods, it means that you should not override the method
* and it's only non-{@code final} so it can be mocked.
*
* @see com.google.domain.registry.testing.InjectRule
* @see google.registry.testing.InjectRule
*/
@Documented
@Retention(SOURCE)

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import com.google.common.base.Function;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import java.util.regex.Pattern;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
/** Utilities for working with pipeline jobs. */
public class PipelineUtils {

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.Preconditions.checkArgument;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import com.google.common.base.Predicate;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.CharMatcher.javaLetterOrDigit;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.io.Resources.asByteSource;
import static com.google.common.io.Resources.getResource;

View file

@ -12,17 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.appengine.api.search.checkers.Preconditions.checkArgument;
import static com.google.common.base.Throwables.propagate;
import static com.google.common.collect.Iterables.any;
import static com.google.common.math.IntMath.pow;
import static com.google.domain.registry.util.PredicateUtils.supertypeOf;
import static google.registry.util.PredicateUtils.supertypeOf;
import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableSet;
import com.google.domain.registry.config.ConfigModule.Config;
import google.registry.config.ConfigModule.Config;
import org.joda.time.Duration;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import java.util.Properties;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.collect.Iterables.toArray;
@ -21,8 +21,9 @@ import com.google.common.base.Joiner;
import com.google.common.base.Predicates;
import com.google.common.collect.FluentIterable;
import com.google.common.collect.ImmutableList;
import com.google.domain.registry.config.RegistryConfig;
import com.google.domain.registry.config.RegistryEnvironment;
import google.registry.config.RegistryConfig;
import google.registry.config.RegistryEnvironment;
import java.util.List;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.io.BaseEncoding.base16;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import org.joda.time.ReadableDuration;
@ -22,7 +22,7 @@ import javax.annotation.concurrent.ThreadSafe;
* An object which accepts requests to put the current thread to sleep.
*
* @see SystemSleeper
* @see com.google.domain.registry.testing.FakeSleeper
* @see google.registry.testing.FakeSleeper
*/
@ThreadSafe
public interface Sleeper {

View file

@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.collect.Sets.difference;
import static com.google.domain.registry.util.PreconditionsUtils.checkArgumentNotNull;
import static google.registry.util.PreconditionsUtils.checkArgumentNotNull;
import com.google.common.base.CharMatcher;
import com.google.common.base.Joiner;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static org.joda.time.DateTimeZone.UTC;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.Preconditions.checkArgument;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static java.util.Arrays.asList;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;

View file

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.domain.registry.util.CollectionUtils.difference;
import static google.registry.util.CollectionUtils.difference;
import static java.lang.reflect.Modifier.isFinal;
import static java.lang.reflect.Modifier.isStatic;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.Preconditions.checkNotNull;
import static java.nio.charset.StandardCharsets.UTF_8;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.io.BaseEncoding.base32;
import static com.google.common.io.BaseEncoding.base64;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import static com.google.common.base.MoreObjects.firstNonNull;
import static com.google.common.base.Preconditions.checkNotNull;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.util;
package google.registry.util;
import javax.xml.bind.annotation.XmlEnumValue;

View file

@ -13,4 +13,4 @@
// limitations under the License.
@javax.annotation.ParametersAreNonnullByDefault
package com.google.domain.registry.util;
package google.registry.util;