8186875: Removed unused method LinkFactory.getTypeAnnotationLinks(LinkInfo linkInfo)
authorksrini
Wed, 20 Sep 2017 15:22:21 -0700
changeset 47233 5ee94c2e087e
parent 47232 205e4c0dc8a3
child 47234 1b1618daf237
child 47235 9ef10c6e67b8
8186875: Removed unused method LinkFactory.getTypeAnnotationLinks(LinkInfo linkInfo) Reviewed-by: anazarov, bpatel, jjg
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/LinkFactoryImpl.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/links/LinkFactory.java
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/LinkFactoryImpl.java	Thu Sep 21 14:40:50 2017 +0200
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/LinkFactoryImpl.java	Wed Sep 20 15:22:21 2017 -0700
@@ -139,11 +139,6 @@
     }
 
     @Override
-    protected Content getTypeAnnotationLink(LinkInfo linkInfo, AnnotationMirror annotation) {
-        throw new RuntimeException("Not implemented yet!");
-    }
-
-    @Override
     public Content getTypeAnnotationLinks(LinkInfo linkInfo) {
         Utils utils = ((LinkInfoImpl)linkInfo).utils;
         ContentBuilder links = new ContentBuilder();
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/links/LinkFactory.java	Thu Sep 21 14:40:50 2017 +0200
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/links/LinkFactory.java	Wed Sep 20 15:22:21 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, 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
@@ -223,8 +223,6 @@
      */
     protected abstract Content getTypeParameterLink(LinkInfo linkInfo, TypeMirror typeParam);
 
-    protected abstract Content getTypeAnnotationLink(LinkInfo linkInfo, AnnotationMirror annotation);
-
     /**
      * Return the links to the type parameters.
      *
@@ -282,23 +280,5 @@
         return links;
     }
 
-    public Content getTypeAnnotationLinks(LinkInfo linkInfo) {
-        Utils utils = ((LinkInfoImpl)linkInfo).utils;
-        Content links = newContent();
-        if (!utils.isAnnotated(linkInfo.type))
-            return links;
-
-        List<? extends AnnotationMirror> annotations = linkInfo.type.getAnnotationMirrors();
-        boolean needSpace = false;
-        for (AnnotationMirror anno : annotations) {
-            if (needSpace) {
-                links.addContent(" ");
-            }
-            links.addContent(getTypeAnnotationLink(linkInfo, anno));
-            needSpace = true;
-        }
-
-        links.addContent(" ");
-        return links;
-    }
+    public abstract Content getTypeAnnotationLinks(LinkInfo linkInfo);
 }