Skip to content
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

[TOREVIEW] Pozniakoff_Vallon #35

Open
wants to merge 47 commits into
base: master
Choose a base branch
from

Conversation

pozniako16
Copy link

No description provided.

pozniako16 and others added 30 commits March 5, 2021 15:22
…-HEIGVD-Teaching-HEIGVD-RES-2021-Labo-Java-IO into feat/filters
fix visitor, now pass the tests
…-HEIGVD-Teaching-HEIGVD-RES-2021-Labo-Java-IO into feat/FileNumberingFilterWriter
…terWriter

Revert "Feat/file numbering filter writer"
Revert "fix visitor, now pass the tests"
@pozniako16 pozniako16 changed the title [WIP] initial commit (test) [WIP] Pozniakoff_Vallon Mar 17, 2021
@pozniako16 pozniako16 changed the title [WIP] Pozniakoff_Vallon [TOREVIEW] Pozniakoff_Vallon Mar 19, 2021
@@ -133,7 +132,18 @@ void clearOutputDirectory() throws IOException {
* @throws IOException
*/
void storeQuote(Quote quote, String filename) throws IOException {
throw new UnsupportedOperationException("The student has not implemented this method yet.");
String tmp = new String();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I detect that this code is problematic. According to the Performance (PERFORMANCE), Dm: Method invokes inefficient new String() constructor (DM_STRING_VOID_CTOR).
Creating a new java.lang.String object using the no-argument constructor wastes memory because the object so created will be functionally indistinguishable from the empty string constant "".  Java guarantees that identical string constants will be represented by the same String object.  Therefore, you should just use the empty string constant directly.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it, the string is now initialized with empty string

@pozniako16
Copy link
Author

Please review again :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants