8230723: Remove default constructors from java.lang and java.io

Reviewed-by: bpb, rriggs
This commit is contained in:
Joe Darcy 2019-09-09 10:13:42 -07:00
parent c84e19f3ca
commit 10f1f10f2e
10 changed files with 54 additions and 4 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -458,6 +458,11 @@ abstract class ClassSpecializer<T,K,S extends ClassSpecializer<T,K,S>.SpeciesDat
* Subclasses can modify the behavior.
*/
public class Factory {
/**
* Constructs a factory.
*/
Factory() {}
/**
* Get a concrete subclass of the top class for a given combination of bound types.
*

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -40,6 +40,12 @@ import static java.util.Objects.requireNonNull;
* @since 11
*/
public final class ConstantBootstraps {
/**
* Do not call.
*/
@Deprecated(forRemoval=true, since="14")
public ConstantBootstraps() {}
// implements the upcall from the JVM, MethodHandleNatives.linkDynamicConstant:
/*non-public*/
static Object makeConstant(MethodHandle bootstrapMethod,