-
-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Thread Local Storage issue #77 #529
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
Conversation
Update my local repository
Here are my initial review comments:
@thomasoss please comment on this thread once the comments have been addressed. |
Thank you for your comments. I'm a little bit busy at the moment but I will deal with them within the next weeks. Have good start for 2017. |
Some additonal description, deleted wrong pumlid
no change of content. Improved text
new uml diagramm after changes to the java classes
Rework replaces previous version completely. Using ExecutorService. Use of result object instead of static variables. Ugly example is left out.
Test reworked completely. AppTest seperated.
added <module>tls</module>
removed errors caused by copy code from master
Hello
The pumlid I created last time was not correct. This time no pumlid is enclosed due to your proposal in december regarding the pumlid |
Changed the classname part "runnable" to "callable"
tls/pom.xml
Outdated
<parent> | ||
<groupId>com.iluwatar</groupId> | ||
<artifactId>java-design-patterns</artifactId> | ||
<version>1.14.0-SNAPSHOT</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be 1.15.0-SNAPSHOT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build is failing at the moment. Also, lots of commented out code detected.
Changed <version>1.14.0-SNAPSHOT</version> to <version>1.15.0-SNAPSHOT</version>
The code commented out is by purpose to allow running the example without thread local storage and see the results. Please view it. But I can remove it of course. |
@thomasoss the build is still failing. You can see the build log by clicking the |
Correction of error detected by maven-pmd-plugin.
Correction of correction ;-)
@iluwatar I could reproduce the fail. I used the same mvn call as shown in the build log (mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -e). I corrected the error found by the maven-pmd-plugin and in my environment the maven build is now successful. I hope it will do so in the target environment. |
@thomasoss this looks good. Thank you for the contribution 👍 |
@all-contributors please add @thomasoss for code |
I've put up a pull request to add @thomasoss! 🎉 |
Example for using a ThreadLocal variable in a Runnable object. To show the problems when not using the Thread Local Storage pattern a second app named AppUgly is added. This second app does not use the Thread Local Storage pattern and produces exeception and / or bad results. For AppUgly no JUnit tests are provided because these would neither surely fail nor surley succeed. Both apps are described in the code (javadoc).
I could not find a way to check the rendering of the READMD.md.