mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
6866185: Util.getPackageSourcePath should use lastIndexOf not indexOf and related cleanup
Reviewed-by: bpatel
This commit is contained in:
parent
cc52e2d413
commit
42bc55bf32
15 changed files with 95 additions and 89 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2011, 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
|
||||
|
@ -92,8 +92,9 @@ public class AnnotationDescImpl implements AnnotationDesc {
|
|||
* @com.example.foo
|
||||
* Omit parens for marker annotations, and omit "value=" when allowed.
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer sb = new StringBuffer("@");
|
||||
StringBuilder sb = new StringBuilder("@");
|
||||
sb.append(annotation.type.tsym);
|
||||
|
||||
ElementValuePair vals[] = elementValues();
|
||||
|
@ -153,6 +154,7 @@ public class AnnotationDescImpl implements AnnotationDesc {
|
|||
* Returns a string representation of this pair
|
||||
* of the form "name=value".
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return meth.name + "=" + value();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue