changeset 2039:b402b93cbe38

8011676: Instances of Tokens.Comment should not be defined in inner classes Reviewed-by: mcimadamore
author jjg
date Mon, 08 Apr 2013 11:54:26 -0700
parents c635a966ce84
children 3f3cc8d3f13c
files src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java src/share/classes/com/sun/tools/javac/parser/JavadocTokenizer.java
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java	Mon Apr 08 15:59:29 2013 +0100
+++ b/src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java	Mon Apr 08 11:54:26 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, 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
@@ -770,7 +770,7 @@
     * (which is treated as the beginning of the first line).
     * Stops positioned at the closing '/'.
     */
-    protected class BasicComment<U extends UnicodeReader> implements Comment {
+    protected static class BasicComment<U extends UnicodeReader> implements Comment {
 
         CommentStyle cs;
         U comment_reader;
--- a/src/share/classes/com/sun/tools/javac/parser/JavadocTokenizer.java	Mon Apr 08 15:59:29 2013 +0100
+++ b/src/share/classes/com/sun/tools/javac/parser/JavadocTokenizer.java	Mon Apr 08 11:54:26 2013 -0700
@@ -206,7 +206,7 @@
          }
      }
 
-     protected class JavadocComment extends JavaTokenizer.BasicComment<DocReader> {
+     protected static class JavadocComment extends JavaTokenizer.BasicComment<DocReader> {
 
         /**
         * Translated and stripped contents of doc comment