src/share/classes/com/sun/tools/javadoc/FieldDocImpl.java

changeset 1706
95d29b99e5b3
parent 1443
cfde9737131e
child 1707
a3655c24e232
     1.1 --- a/src/share/classes/com/sun/tools/javadoc/FieldDocImpl.java	Thu Apr 18 19:58:45 2013 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/javadoc/FieldDocImpl.java	Thu Apr 18 20:00:14 2013 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -252,13 +252,23 @@
    1.11      }
    1.12  
    1.13      public String name() {
    1.14 -        return sym.name.toString();
    1.15 +        if (name == null) {
    1.16 +            name = sym.name.toString();
    1.17 +        }
    1.18 +        return name;
    1.19      }
    1.20  
    1.21 +    private String name;
    1.22 +
    1.23      public String qualifiedName() {
    1.24 -        return sym.enclClass().getQualifiedName() + "." + name();
    1.25 +        if (qualifiedName == null) }
    1.26 +            qualifiedName = sym.enclClass().getQualifiedName() + "." + name();
    1.27 +        }
    1.28 +        return qualifiedName;
    1.29      }
    1.30  
    1.31 +    private String qualifiedName;
    1.32 +
    1.33      /**
    1.34       * Return the source position of the entity, or null if
    1.35       * no position is available.

mercurial