You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ju...@apache.org on 2019/08/19 20:17:20 UTC
[jspwiki] 21/24: removal of @deprecated code (13) - Editor: removed
unused getUrl() method
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 3600c981aeef284f1ba67f60449350743342df17
Author: juanpablo <ju...@apache.org>
AuthorDate: Mon Aug 19 22:05:56 2019 +0200
removal of @deprecated code (13) - Editor: removed unused getUrl() method
---
.../src/main/java/org/apache/wiki/ui/Editor.java | 31 +++++-----------------
1 file changed, 6 insertions(+), 25 deletions(-)
diff --git a/jspwiki-main/src/main/java/org/apache/wiki/ui/Editor.java b/jspwiki-main/src/main/java/org/apache/wiki/ui/Editor.java
index e730be6..e4fff20 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/ui/Editor.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/ui/Editor.java
@@ -37,31 +37,12 @@ public class Editor {
m_editorManager = wikiContext.getEngine().getEditorManager();
}
- public String getName()
- {
+ public String getName() {
return m_editorName;
}
- // FIXME: Fails, if the editoriterator is on a non-editor page.
- /** @deprecated */
- public String getURL()
- {
- final String uri = m_wikiContext.getHttpRequest().getRequestURI();
- String para = m_wikiContext.getHttpRequest().getQueryString();
-
- // if para already contains editor parameter, replace instead of append it
- // FIXME: Should cut out parameter instead of simple setting strin to null, maybe
- // in futur releases it may change and theres the danger that trailing parameters get lost
- final int idx = para.indexOf( EditorManager.PARA_EDITOR + "=" );
- if( idx >= 0 ) {
- para = para.substring( 0, idx - 1 );
- }
-
- return uri + "?" + para + "&" + EditorManager.PARA_EDITOR + "=" + m_editorName;
- }
-
/**
- * 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( )
@@ -75,15 +56,15 @@ public class Editor {
}
public String isSelected( final String ifSelected, final String ifNotSelected ) {
- if ( m_editorName.equals(m_editorManager.getEditorName(m_wikiContext) ) )
- {
+ if( m_editorName.equals( m_editorManager.getEditorName( m_wikiContext ) ) ) {
return ifSelected;
}
return ifNotSelected;
}
- public String toString()
- {
+ @Override
+ public String toString() {
return m_editorName;
}
+
}