@@ -223,7 +223,7 @@ public String getHeaderData() {
223
223
*/
224
224
public DiffData getDiffData () {
225
225
DiffData data = new DiffData ();
226
- data .path = getPath ().substring (0 , path .lastIndexOf (PATH_SEPARATOR ));
226
+ data .path = getPath ().substring (0 , getPath () .lastIndexOf (PATH_SEPARATOR ));
227
227
data .filename = Util .htmlize (getResourceFile ().getName ());
228
228
229
229
String srcRoot = getSourceRootPath ();
@@ -511,9 +511,9 @@ public String getHistoryDirs() {
511
511
}
512
512
String [] val = req .getParameterValues ("also" );
513
513
if (val == null || val .length == 0 ) {
514
- return path ;
514
+ return getPath () ;
515
515
}
516
- StringBuilder paths = new StringBuilder (path );
516
+ StringBuilder paths = new StringBuilder (getPath () );
517
517
for (String val1 : val ) {
518
518
paths .append (' ' ).append (val1 );
519
519
}
@@ -764,12 +764,12 @@ public Annotation getAnnotation() {
764
764
*/
765
765
public String [] getSearchOnlyIn () {
766
766
if (isDir ()) {
767
- return path .length () == 0
767
+ return getPath () .length () == 0
768
768
? new String []{"/" , "this directory" , "disabled=\" \" " }
769
- : new String []{path , "this directory" , "" };
769
+ : new String []{getPath () , "this directory" , "" };
770
770
}
771
771
String [] res = new String [3 ];
772
- res [0 ] = path .substring (0 , path .lastIndexOf (PATH_SEPARATOR ) + 1 );
772
+ res [0 ] = getPath () .substring (0 , getPath () .lastIndexOf (PATH_SEPARATOR ) + 1 );
773
773
res [1 ] = res [0 ];
774
774
res [2 ] = "" ;
775
775
return res ;
@@ -1257,7 +1257,7 @@ public File[] findDataFiles(List<String> filenames) {
1257
1257
return new File [0 ];
1258
1258
}
1259
1259
File [] res = new File [filenames .size ()];
1260
- File dir = new File (getEnv ().getDataRootPath () + Prefix .XREF_P + path );
1260
+ File dir = new File (getEnv ().getDataRootPath () + Prefix .XREF_P + getPath () );
1261
1261
if (dir .exists () && dir .isDirectory ()) {
1262
1262
getResourceFile ();
1263
1263
boolean compressed = getEnv ().isCompressXref ();
@@ -1279,7 +1279,7 @@ public File[] findDataFiles(List<String> filenames) {
1279
1279
*/
1280
1280
public File findDataFile () {
1281
1281
return checkFile (new File (getEnv ().getDataRootPath () + Prefix .XREF_P ),
1282
- path , env .isCompressXref ());
1282
+ getPath () , env .isCompressXref ());
1283
1283
}
1284
1284
1285
1285
public String getLatestRevision () {
@@ -1335,7 +1335,7 @@ public String getRevisionLocation(String revStr) {
1335
1335
1336
1336
sb .append (req .getContextPath ());
1337
1337
sb .append (Prefix .XREF_P );
1338
- sb .append (Util .URIEncodePath (path ));
1338
+ sb .append (Util .URIEncodePath (getPath () ));
1339
1339
sb .append ("?" );
1340
1340
sb .append (QueryParameters .REVISION_PARAM_EQ );
1341
1341
sb .append (Util .URIEncode (revStr ));
@@ -1383,7 +1383,7 @@ && getUriEncodedPath().isEmpty()
1383
1383
return req .getContextPath () + Prefix .XREF_P + '/' ;
1384
1384
}
1385
1385
1386
- if (path .length () == 0 ) {
1386
+ if (getPath () .length () == 0 ) {
1387
1387
// => /
1388
1388
return null ;
1389
1389
}
@@ -1392,9 +1392,9 @@ && getUriEncodedPath().isEmpty()
1392
1392
&& prefix != Prefix .RSS_P ) {
1393
1393
// if it is an existing dir perhaps people wanted dir xref
1394
1394
return req .getContextPath () + Prefix .XREF_P
1395
- + getUriEncodedPath () + trailingSlash (path );
1395
+ + getUriEncodedPath () + trailingSlash (getPath () );
1396
1396
}
1397
- String ts = trailingSlash (path );
1397
+ String ts = trailingSlash (getPath () );
1398
1398
if (ts .length () != 0 ) {
1399
1399
return req .getContextPath () + prefix + getUriEncodedPath () + ts ;
1400
1400
}
@@ -1678,11 +1678,13 @@ public String getSearchTitle() {
1678
1678
* @return string used for setting page title of search view
1679
1679
*/
1680
1680
public String getHistoryTitle () {
1681
+ String path = getPath ();
1681
1682
return Util .htmlize (getShortPath (path ) +
1682
1683
" - OpenGrok history log for " + path );
1683
1684
}
1684
1685
1685
1686
public String getPathTitle () {
1687
+ String path = getPath ();
1686
1688
String title = getShortPath (path );
1687
1689
if (getRequestedRevision () != null && !getRequestedRevision ().isEmpty ()) {
1688
1690
title += " (revision " + getRequestedRevision () + ")" ;
0 commit comments