Skip to content

fix: correct typo in mime type check method #448

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ public DocTypeValidator findByExtension( String extension ) {
return this.extMapValidator.get( extension );
}

public boolean isMimeTypeSupprted( String mimeType ) {
return this.findByMimeType(mimeType) != null;
}
public boolean isMimeTypeSupported( String mimeType ) {
return this.findByMimeType(mimeType) != null;
}

public Collection<String> getSupportedMimeTypes() {
return Collections.unmodifiableCollection( this.mimMapValidator.keySet() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ public boolean checkCompatibility() {
Assertions.assertNull( facade.findByExtension( HelperDocValidator.FORMAT_TEST ) );
Assertions.assertFalse( facade.getSupportedMimeTypes().isEmpty() );
Assertions.assertFalse( facade.getSupportedExtensions().isEmpty() );
Assertions.assertFalse( facade.isMimeTypeSupprted( HelperDocValidator.MIME_TEST ) );
Assertions.assertFalse( facade.isMimeTypeSupported( HelperDocValidator.MIME_TEST ) );
Assertions.assertFalse( facade.isExtensionSupported( HelperDocValidator.FORMAT_TEST ) );
Assertions.assertFalse( facade.isMimeTypeSupprted( HelperDocValidator.MIME_TEST ) );
Assertions.assertFalse( facade.isMimeTypeSupported( HelperDocValidator.MIME_TEST ) );
Assertions.assertFalse( facade.isExtensionSupported( HelperDocValidator.FORMAT_TEST ) );
Assertions.assertFalse( facade.isMimeTypeSupprted( "aaaa" ) );
Assertions.assertFalse( facade.isMimeTypeSupported( "aaaa" ) );
Assertions.assertFalse( facade.isExtensionSupported( "bbbb/test" ) );
Assertions.assertTrue( facade.isMimeTypeSupprted( ImageValidator.JPG_VALIDATOR.getMimeType() ) );
Assertions.assertTrue( facade.isMimeTypeSupported( ImageValidator.JPG_VALIDATOR.getMimeType() ) );
Assertions.assertTrue( facade.isExtensionSupported( ImageValidator.FORMAT_JPG ) );
// test path
String testPath = "src/test/resources/sample/jpg_as_jpg.jpeg";
Expand Down