src/share/classes/com/sun/tools/javac/parser/Tokens.java

changeset 2047
5f915a0c9615
parent 1503
2d2b2be57c78
child 2525
2eb010b6cb22
equal deleted inserted replaced
2046:1fe358ea75ff 2047:5f915a0c9615
1 /* 1 /*
2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
400 400
401 private List<Comment> getComments(Comment.CommentStyle style) { 401 private List<Comment> getComments(Comment.CommentStyle style) {
402 if (comments == null) { 402 if (comments == null) {
403 return List.nil(); 403 return List.nil();
404 } else { 404 } else {
405 ListBuffer<Comment> buf = ListBuffer.lb(); 405 ListBuffer<Comment> buf = new ListBuffer<>();
406 for (Comment c : comments) { 406 for (Comment c : comments) {
407 if (c.getStyle() == style) { 407 if (c.getStyle() == style) {
408 buf.add(c); 408 buf.add(c);
409 } 409 }
410 } 410 }

mercurial