6866185: Util.getPackageSourcePath should use lastIndexOf not indexOf and related cleanup

Reviewed-by: bpatel
This commit is contained in:
Jonathan Gibbons 2011-03-04 19:53:03 -08:00
parent cc52e2d413
commit 42bc55bf32
15 changed files with 95 additions and 89 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
@ -226,7 +226,7 @@ public abstract class ExecutableMemberDocImpl
}
private String makeSignature(boolean full) {
StringBuffer result = new StringBuffer();
StringBuilder result = new StringBuilder();
result.append("(");
for (List<Type> types = sym.type.getParameterTypes(); types.nonEmpty(); ) {
Type t = types.head;
@ -251,6 +251,7 @@ public abstract class ExecutableMemberDocImpl
/**
* Generate a key for sorting.
*/
@Override
CollationKey generateKey() {
String k = name() + flatSignature() + typeParametersString();
// ',' and '&' are between '$' and 'a': normalize to spaces.
@ -263,6 +264,7 @@ public abstract class ExecutableMemberDocImpl
* Return the source position of the entity, or null if
* no position is available.
*/
@Override
public SourcePosition position() {
if (sym.enclClass().sourcefile == null) return null;
return SourcePositionImpl.make(sym.enclClass().sourcefile,