Remove verbose file info content (#3238)
* Define beans for handling different message types in a lean chat app * Add class based spring beans configuration * Define spring configuration in XML for constructor based bean injection * Refactor package structure to separate constructor based bean injection code set from setter based bean injection code set * Define configuration and classes specific to setter-based bean injection. * Implement tests for constructor-based and setter-based bean injections * develop codes for explaining type erasure * Write unit tests for type erasure examples * Remove evaluation article code * Modify type erasure examples and unit tests * Modify type erasure examples and unit tests * Add expected exception in TypeErasureUnitTest * Correct grammar in class name * Implement File Manager app to demonstrate Polymorphism. Develop unit tests for Polymorphism article code * Add examples for static polymorphism * Change sysout statments to slf4j log info statements * Add assertions and expected errors check on Test * Add assertions and expected errors check on Test * Correct compile time error of symbol not found * Removed commented out non-compiling test. * Replace string concatenations with String.format * Replace string concatenations with String.format * Remove verbose file info descriptor and replace with simpler one
This commit is contained in:
parent
542bbddab1
commit
171d28a9d1
|
@ -54,7 +54,7 @@ public class GenericFile {
|
|||
}
|
||||
|
||||
public String getFileInfo() {
|
||||
return String.format("File Name: %s\n" + " Extension: %s\n" + " Date Created: %s\n" + " Version: %s\n", this.getName(), this.getExtension(), this.getDateCreated(), this.getVersion());
|
||||
return "Generic File Impl";
|
||||
}
|
||||
|
||||
public Object read() {
|
||||
|
|
|
@ -30,7 +30,7 @@ public class ImageFile extends GenericFile {
|
|||
}
|
||||
|
||||
public String getFileInfo() {
|
||||
return String.format(" %s Height: %d\n Width: %d", super.getFileInfo(), this.getHeight(), this.getWidth());
|
||||
return "Image File Impl";
|
||||
}
|
||||
|
||||
public String read() {
|
||||
|
|
|
@ -21,7 +21,7 @@ public class TextFile extends GenericFile {
|
|||
}
|
||||
|
||||
public String getFileInfo() {
|
||||
return String.format(" %s Word Count: %d", super.getFileInfo(), wordCount);
|
||||
return "Text File Impl";
|
||||
}
|
||||
|
||||
public String read() {
|
||||
|
|
Loading…
Reference in New Issue