Skip to content

Fix typo in variables. #29

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: master
Choose a base branch
from
Open
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 @@ -141,24 +141,24 @@ public static String createHtmlFromTemplateFile(String path, String objectName,
*/
public static Document createDocumentFromFile(String fileName, String docName, String docId) throws IOException {
byte[] buffer = readFile(fileName);
String extention = FilenameUtils.getExtension(fileName);
return createDocument(buffer, docName, extention, docId);
String extension = FilenameUtils.getExtension(fileName);
return createDocument(buffer, docName, extension, docId);
}

/**
* Creates a document object from the raw data.
*
* @param data the raw data
* @param documentName the name of the document; it may be differ from the file
* @param fileExtention the extension of the creating file
* @param documentName the name of the document; it may differ from the file
* @param fileExtension the extension of the creating file
* @param documentId identifier of the created document
* @return the {@link Document} object
*/
public static Document createDocument(byte[] data, String documentName, String fileExtention, String documentId) {
public static Document createDocument(byte[] data, String documentName, String fileExtension, String documentId) {
Document document = new Document();
document.setDocumentBase64(Base64.getEncoder().encodeToString(data));
document.setName(documentName);
document.setFileExtension(fileExtention);
document.setFileExtension(fileExtension);
document.setDocumentId(documentId);
return document;
}
Expand Down