Vojtech Szocs has posted comments on this change.
Change subject: utils: ForwardServlet: fix generic forward to use path info
......................................................................
Patch Set 1:
(1 comment)
....................................................
File
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/servlet/ForwardServlet.java
Line 113: ServletException {
Line 114: final ServletContext forwardContext =
getServletContext().getContext(targetContext);
Line 115: if (forwardContext != null) {
Line 116: String forwardUri = uri;
Line 117: if (request.getPathInfo() != null) {
Exactly, I completely agree with you. Writing good code ("the craft") reduces
the need for documentation because the code is self-documenting and
easy-to-understand by itself.
But sometimes code will get complex and/or have dependencies to other things so
you'll need to document details of how it works. This happens when essential
complexity of code [1] is just too high, i.e. the problem being solved is
complex in its very nature and code is a reflection of that.
[1] http://en.wikipedia.org/wiki/Essential_complexity
Line 118: forwardUri += request.getPathInfo();
Line 119: }
Line 120: final RequestDispatcher dispatcher =
forwardContext.getRequestDispatcher(forwardUri);
Line 121: if (dispatcher != null) {
--
To view, visit http://gerrit.ovirt.org/20784
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I7307d57792fb966c8acb6ac0bdcad9302c0e3a65
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches