Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
replaced cleanModelFilename with sanitzeName
  • Loading branch information
smasala committed Oct 2, 2018
commit 00b4effcdb87518926a6d4861a7fcec2bb60f2f8
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ public String toApiVarName(String name) {
* @return the file name of the model
*/
public String toModelFilename(String name) {
return this.cleanModelFilename(initialCaps(name));
return this.sanitizeName(initialCaps(name));
}

/**
Expand All @@ -741,7 +741,7 @@ public String toModelFilename(String name) {
* @return the file name of the model
*/
public String toModelTestFilename(String name) {
return this.cleanModelFilename(initialCaps(name) + "Test");
return this.sanitizeName(initialCaps(name) + "Test");
}

/**
Expand Down Expand Up @@ -4704,15 +4704,4 @@ public void postProcessFile(File file, String fileType) {
LOGGER.debug("Post processing file {} ({})", file, fileType);
}

/**
* Cleans the given filename by removing all {LEFT-POINTING | RIGH-POINTING} DOUBLE ANGLE QUOTATION MARKs
* for model names marked with generics.
* "myModel«MyGeneric»" to "myModelMyGeneric"
*
* @param name given filename string to clean
* @return cleaned filename
*/
protected String cleanModelFilename(String name) {
return name.replaceAll("[\\u00AB\\u00BB]", "");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ public String toApiImport(String name) {

@Override
public String toModelFilename(String name) {
return this.cleanModelFilename(this.convertUsingFileNamingConvention(name) + modelFileSuffix);
return this.sanitizeName(this.convertUsingFileNamingConvention(name) + modelFileSuffix);
}

@Override
Expand Down