@@ -367,7 +367,7 @@ IContentType[] findContentTypesFor(ContentTypeMatcher matcher, InputStream conte
367
367
}
368
368
369
369
IContentType [] findContentTypesFor (ContentTypeMatcher matcher , final String fileName ) {
370
- IContentType [] selected = concat (internalFindContentTypesFor (matcher , fileName , policyConstantGeneralIsBetter ));
370
+ IContentType [] selected = concat (internalFindContentTypesSorted (matcher , fileName , policyConstantGeneralIsBetter ));
371
371
// give the policy a chance to change the results
372
372
ISelectionPolicy policy = matcher .getPolicy ();
373
373
if (policy != null )
@@ -460,7 +460,7 @@ private boolean internalAccept(ContentTypeVisitor visitor, ContentType root) {
460
460
return true ;
461
461
}
462
462
463
- private IContentType [] internalFindContentTypesFor (ILazySource buffer , IContentType [][] subset , Comparator <IContentType > validPolicy , Comparator <IContentType > indeterminatePolicy ) throws IOException {
463
+ private IContentType [] internalFindContentTypesForSubset (ILazySource buffer , IContentType [][] subset , Comparator <IContentType > validPolicy , Comparator <IContentType > indeterminatePolicy ) throws IOException {
464
464
Map <String , Object > properties = new HashMap <>();
465
465
final List <ContentType > appropriate = new ArrayList <>(5 );
466
466
final int validFullName = collectMatchingByContents (0 , subset [0 ], appropriate , buffer , properties );
@@ -501,7 +501,7 @@ private IContentType[] internalFindContentTypesFor(ContentTypeMatcher matcher, I
501
501
indeterminatePolicy = policyConstantGeneralIsBetter ;
502
502
validPolicy = policyConstantSpecificIsBetter ;
503
503
} else {
504
- subset = internalFindContentTypesFor (matcher , fileName , policyLexicographical );
504
+ subset = internalFindContentTypesSorted (matcher , fileName , policyLexicographical );
505
505
indeterminatePolicy = policyGeneralIsBetter ;
506
506
validPolicy = policySpecificIsBetter ;
507
507
}
@@ -524,7 +524,7 @@ private IContentType[] internalFindContentTypesFor(ContentTypeMatcher matcher, I
524
524
// only eligible content type is binary and contents are text, ignore it
525
525
return NO_CONTENT_TYPES ;
526
526
}
527
- return internalFindContentTypesFor (buffer , subset , validPolicy , indeterminatePolicy );
527
+ return internalFindContentTypesForSubset (buffer , subset , validPolicy , indeterminatePolicy );
528
528
}
529
529
530
530
/**
@@ -533,7 +533,7 @@ private IContentType[] internalFindContentTypesFor(ContentTypeMatcher matcher, I
533
533
* @return all matching content types in the preferred order
534
534
* @see IContentTypeManager#findContentTypesFor(String)
535
535
*/
536
- synchronized private IContentType [][] internalFindContentTypesFor (ContentTypeMatcher matcher , final String fileName , Comparator <IContentType > sortingPolicy ) {
536
+ synchronized private IContentType [][] internalFindContentTypesSorted (ContentTypeMatcher matcher , final String fileName , Comparator <IContentType > sortingPolicy ) {
537
537
IScopeContext context = matcher .getContext ();
538
538
IContentType [][] result = { NO_CONTENT_TYPES , NO_CONTENT_TYPES , NO_CONTENT_TYPES };
539
539
0 commit comments