Open
Conversation
| import org.rosuda.REngine.REXPMismatchException; | ||
| import org.rosuda.REngine.RList; | ||
| import org.rosuda.REngine.Rserve.RConnection; | ||
| import org.rosuda.REngine.Rserve.RserveException; |
Author
There was a problem hiding this comment.
org.rosuda.REngine.* は使われていないように見えます。(今手元でビルドしようとしたら、ここが原因でコンパイルエラーになりました)。おそらく対応するjarがないので、もし必要なのであれば追加をお願いします。
|
|
||
|
|
||
| private void onSuccessOperation(String result, DialogBox dialogBox, Label infoLabel) { | ||
| if (result.equals("success") || Boolean.valueOf(result) || result == "Logout") { |
Author
There was a problem hiding this comment.
このような文字列の判定をここで行うと、サーバ側とクライアント側での対応関係が取りづらくなるので、
例えばサーバ側は成功時に常に"success"を返し、それ以外であればエラーの内容を返すように決めてしまうほうがいいと思います。
if (result.equals("success"))
あとresult == "Logout"のように書くと比較対象が文字列リテラルじゃない場合に判定失敗するので、Javaではresult.equals("Logout")と書くのが正しいです。
| History.newItem(currentLang + GutFloraConstant.NAVI_LINK_SAMPLE); | ||
| History.fireCurrentHistoryState(); | ||
| } else { | ||
| String message = result == "false" ? "Incorrect ID or password." : result; |
Author
There was a problem hiding this comment.
ここも上のコメントと同様に、単にresultをそのまま表示できる仕組みにする方がいいと思います。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.