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 } |