langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/SourcePositionImpl.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2015, 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 |
101 // Backwards compatibility hack. ZipFileObjects use the format |
101 // Backwards compatibility hack. ZipFileObjects use the format |
102 // zipfile(zipentry) but javadoc has been using zipfile/zipentry |
102 // zipfile(zipentry) but javadoc has been using zipfile/zipentry |
103 String fn = filename.getName(); |
103 String fn = filename.getName(); |
104 if (fn.endsWith(")")) { |
104 if (fn.endsWith(")")) { |
105 int paren = fn.lastIndexOf("("); |
105 int paren = fn.lastIndexOf("("); |
106 if (paren != -1) |
106 if (paren != -1) { |
|
107 int i = paren+1; |
|
108 if (fn.charAt(i) == '/') |
|
109 i++; |
107 fn = fn.substring(0, paren) |
110 fn = fn.substring(0, paren) |
108 + File.separatorChar |
111 + File.separatorChar |
109 + fn.substring(paren + 1, fn.length() - 1); |
112 + fn.substring(i, fn.length() - 1); |
|
113 } |
110 } |
114 } |
111 |
115 |
112 if (position == Position.NOPOS) |
116 if (position == Position.NOPOS) |
113 return fn; |
117 return fn; |
114 else |
118 else |