8250213: Address use of default constructors in com.sun.source.util

Reviewed-by: jjg
This commit is contained in:
Joe Darcy 2020-07-27 11:07:30 -07:00
parent 761a92d7c9
commit ed7f796494
8 changed files with 42 additions and 6 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2020, 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
@ -38,6 +38,11 @@ import com.sun.source.doctree.DocTree;
* @since 1.8
*/
public class DocTreePathScanner<R, P> extends DocTreeScanner<R, P> {
/**
* Constructs a {@code DocTreePathScanner}.
*/
public DocTreePathScanner() {}
/**
* Scans a tree from a position identified by a tree path.
* @param path the path

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2020, 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
@ -68,6 +68,10 @@ import com.sun.source.doctree.*;
* @since 1.8
*/
public class DocTreeScanner<R,P> implements DocTreeVisitor<R,P> {
/**
* Constructs a {@code DocTreeScanner}.
*/
public DocTreeScanner() {}
/**
* Scans a single node.

View File

@ -46,6 +46,11 @@ import com.sun.source.doctree.DocTree;
* @since 1.8
*/
public abstract class DocTrees extends Trees {
/**
* Constructor for subclasses to call.
*/
public DocTrees() {}
/**
* Returns a DocTrees object for a given CompilationTask.
* @param task the compilation task for which to get the Trees object

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2020, 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
@ -50,6 +50,10 @@ import com.sun.tools.javac.util.Context;
* @since 1.6
*/
public abstract class JavacTask implements CompilationTask {
/**
* Constructor for subclasses to call.
*/
public JavacTask() {}
/**
* Returns the {@code JavacTask} for a {@code ProcessingEnvironment}.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2020, 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
@ -43,6 +43,10 @@ import com.sun.source.tree.*;
* @since 1.6
*/
public class TreePathScanner<R, P> extends TreeScanner<R, P> {
/**
* Constructs a {@code TreePathScanner}.
*/
public TreePathScanner() {}
/**
* Scans a tree from a position identified by a TreePath.

View File

@ -75,6 +75,10 @@ import com.sun.source.tree.*;
* @since 1.6
*/
public class TreeScanner<R,P> implements TreeVisitor<R,P> {
/**
* Constructs a {@code TreeScanner}.
*/
public TreeScanner() {}
/**
* Scans a single node.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2020, 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
@ -52,6 +52,11 @@ import com.sun.source.tree.Tree;
* @author Peter von der Ah&eacute;
*/
public abstract class Trees {
/**
* Constructor for subclasses to call.
*/
public Trees() {}
/**
* Returns a Trees object for a given CompilationTask.
* @param task the compilation task for which to get the Trees object

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2020, 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
@ -34,6 +34,11 @@ import java.io.PrintWriter;
* module for details on replacement APIs.
*/
public class Main {
/**
* Do not call.
*/
@Deprecated(since="16", forRemoval=true)
public Main(){}
/** Main entry point for the launcher.
* Note: This method calls System.exit.