Comments (5)
Funny side effect: The ticket manager does not check the characters in the username. You can obtain tickets for username " ", for example. Of course, the ticket will also contain the whitespace from the username.
from pityoulish.
The initial implementation of the Message Board server with Java RMI will also rely on implicit validation of arguments. To be fixed with this issue as well.
from pityoulish.
How to handle null checks? Should these be part of the sanity check, and return a problem description? Or should the checks only be called for non-null arguments?
As of now, the DefaultMSanityChecker and DefaultTSanityChecker are inconsistent in this regard. They throw NullPointerException for missing mandatory arguments, instead of returning an error description. But DefaultMSanityChecker tolerates a null marker, because that's an optional argument.
It might be better to leave it to the caller whether an argument is optional. Then it would make sense for the checkers to require non-null arguments and throw exceptions for null. Or to report a missing argument as invalid.
from pityoulish.
As for optional arguments, the caller has to handle that. Sanity checkers will complain about null arguments. I'm still not sure whether I should throw an exception or report as missing. For now, an exception is thrown.
from pityoulish.
It's good enough for now. See #53 and #55 for what else could be done in this area. Help is welcome!
from pityoulish.
Related Issues (20)
- Thread safety for MessageBoard implementations HOT 1
- Run server in IBM Cloud HOT 8
- Push image to public GitHub Container Registry HOT 2
- About deleting container images... HOT 2
- Feedback: Tutorial 2020
- Feedback: Sockets 2020
- Disable Client IP check when running in the Cloud HOT 2
- Upgrade Actions to use environment files HOT 1
- Feedback: Java RMI 2020
- Migrate Travis CI HOT 2
- Transfer repository to the "pityoulish" organization HOT 2
- Feedback: Sockets 2019
- Less logging output for Follow-the-Board connections HOT 4
- Sockets: detect response from HTTP server
- Feedback: Java RMI 2019
- Java RMI: prevent multiple tickets for same client HOT 2
- Fix JavaDoc warnings HOT 2
- Java RMI: split off the Direct Messages part
- Build: Travis integration is broken HOT 4
- Take the exercises online HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pityoulish.