jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajaqu...@apache.org
Subject svn commit: r912170 - /incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/Editor.java
Date Sat, 20 Feb 2010 18:05:37 GMT
Author: ajaquith
Date: Sat Feb 20 18:05:37 2010
New Revision: 912170

URL: http://svn.apache.org/viewvc?rev=912170&view=rev
Log:
Minor Javadoc/method tweak.

Modified:
    incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/Editor.java

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/Editor.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/Editor.java?rev=912170&r1=912169&r2=912170&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/Editor.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/Editor.java Sat Feb 20 18:05:37 2010
@@ -29,9 +29,9 @@
  */
 public class Editor
 {
-    private String m_editorName;
-    private WikiContext m_wikiContext;
-    private EditorManager m_editorManager;
+    private final String m_editorName;
+    private final WikiContext m_wikiContext;
+    private final EditorManager m_editorManager;
 
     public Editor( WikiContext wikiContext, String editorName )
     {
@@ -65,7 +65,7 @@
     }
 
     /**
-     *  Convinience method which returns XHTML for an option element.
+     *  Convenience method which returns XHTML for an option element.
      * @return "selected='selected'", if this editor is selected.
      */
     public String isSelected( )
@@ -80,7 +80,8 @@
 
     public String isSelected( String ifSelected, String ifNotSelected )
     {
-        if ( m_editorName.equals(m_editorManager.getEditorName(m_wikiContext) ) )
+        String preferredEditor = m_editorManager.getEditorName(m_wikiContext);
+        if ( m_editorName.equals( preferredEditor ) )
         {
             return ifSelected;
         }



Mime
View raw message