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:02 UTC
[jspwiki] 03/24: removal of @deprecated code (3) - GroupDatabase:
removal of commit(), no replacement as the method wasn't used anymore
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 c7709c0d612ed820a1cd3c0f9da72938a4111095
Author: juanpablo <ju...@apache.org>
AuthorDate: Fri Aug 16 20:16:45 2019 +0200
removal of @deprecated code (3) - GroupDatabase: removal of commit(), no replacement as the method wasn't used anymore
---
.../apache/wiki/auth/authorize/GroupDatabase.java | 20 +++++---------------
.../wiki/auth/authorize/JDBCGroupDatabase.java | 15 ---------------
.../apache/wiki/auth/authorize/XMLGroupDatabase.java | 16 +---------------
3 files changed, 6 insertions(+), 45 deletions(-)
diff --git a/jspwiki-main/src/main/java/org/apache/wiki/auth/authorize/GroupDatabase.java b/jspwiki-main/src/main/java/org/apache/wiki/auth/authorize/GroupDatabase.java
index af105ff..ca03266 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/auth/authorize/GroupDatabase.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/auth/authorize/GroupDatabase.java
@@ -18,29 +18,18 @@
*/
package org.apache.wiki.auth.authorize;
-import java.security.Principal;
-import java.util.Properties;
-
import org.apache.wiki.WikiEngine;
import org.apache.wiki.api.exceptions.NoRequiredPropertyException;
import org.apache.wiki.auth.WikiSecurityException;
+import java.security.Principal;
+import java.util.Properties;
+
/**
* Defines an interface for loading, persisting and storing wiki groups.
* @since 2.4.22
*/
-public interface GroupDatabase
-{
- /**
- * No-op method that in previous versions of JSPWiki was intended to
- * atomically commit changes to the user database. Now, the
- * {@link #save(Group, Principal)} and {@link #delete(Group)} methods
- * are atomic themselves.
- * @throws WikiSecurityException never...
- * @deprecated there is no need to call this method because the save and
- * delete methods contain their own commit logic
- */
- void commit() throws WikiSecurityException;
+public interface GroupDatabase {
/**
* Looks up and deletes a {@link Group} from the group database. If the
@@ -90,4 +79,5 @@ public interface GroupDatabase
* @throws WikiSecurityException if the groups cannot be returned by the back-end
*/
Group[] groups() throws WikiSecurityException;
+
}
diff --git a/jspwiki-main/src/main/java/org/apache/wiki/auth/authorize/JDBCGroupDatabase.java b/jspwiki-main/src/main/java/org/apache/wiki/auth/authorize/JDBCGroupDatabase.java
index b6d573e..d5ac0d2 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/auth/authorize/JDBCGroupDatabase.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/auth/authorize/JDBCGroupDatabase.java
@@ -225,21 +225,6 @@ public class JDBCGroupDatabase implements GroupDatabase {
private WikiEngine m_engine = null;
/**
- * No-op method that in previous versions of JSPWiki was intended to
- * atomically commit changes to the user database. Now, the
- * {@link #save(Group, Principal)} and {@link #delete(Group)} methods are
- * atomic themselves.
- *
- * @throws WikiSecurityException never...
- * @deprecated there is no need to call this method because the save and
- * delete methods contain their own commit logic
- */
- @Deprecated
- public void commit() throws WikiSecurityException
- {
- }
-
- /**
* Looks up and deletes a {@link Group} from the group database. If the
* group database does not contain the supplied Group. this method throws a
* {@link NoSuchPrincipalException}. The method commits the results of the
diff --git a/jspwiki-main/src/main/java/org/apache/wiki/auth/authorize/XMLGroupDatabase.java b/jspwiki-main/src/main/java/org/apache/wiki/auth/authorize/XMLGroupDatabase.java
index de3594e..440e252 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/auth/authorize/XMLGroupDatabase.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/auth/authorize/XMLGroupDatabase.java
@@ -109,21 +109,7 @@ public class XMLGroupDatabase implements GroupDatabase
private WikiEngine m_engine = null;
- private Map<String, Group> m_groups = new HashMap<>();
-
- /**
- * No-op method that in previous versions of JSPWiki was intended to
- * atomically commit changes to the user database. Now, the
- * {@link #save(Group, Principal)} and {@link #delete(Group)} methods
- * are atomic themselves.
- * @throws WikiSecurityException never...
- * @deprecated there is no need to call this method because the save and
- * delete methods contain their own commit logic
- */
- @Deprecated
- @Override
- public void commit() throws WikiSecurityException
- { }
+ private Map<String, Group> m_groups = new HashMap<>();
/**
* Looks up and deletes a {@link Group} from the group database. If the