You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ja...@apache.org on 2008/04/02 00:05:22 UTC
svn commit: r643615 -
/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/XMLUserDatabase.java
Author: jalkanen
Date: Tue Apr 1 15:05:08 2008
New Revision: 643615
URL: http://svn.apache.org/viewvc?rev=643615&view=rev
Log:
Fixed preamble to ASF
Now sorts the list when getWikiNames() is called. This is to facilitate actually finding the darned names from the admin list...
Modified:
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/XMLUserDatabase.java
Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/XMLUserDatabase.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/XMLUserDatabase.java?rev=643615&r1=643614&r2=643615&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/XMLUserDatabase.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/user/XMLUserDatabase.java Tue Apr 1 15:05:08 2008
@@ -1,21 +1,22 @@
/*
- JSPWiki - a JSP-based WikiWiki clone.
+ JSPWiki - a JSP-based WikiWiki clone.
- Copyright (C) 2001-2005 Janne Jalkanen (Janne.Jalkanen@iki.fi)
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
*/
package com.ecyrd.jspwiki.auth.user;
@@ -24,10 +25,7 @@
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Properties;
-import java.util.Set;
+import java.util.*;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
@@ -209,6 +207,7 @@
* contain any profiles, this method will return a zero-length
* array.
* @return the WikiNames
+ * @throws WikiSecurityException In case things fail.
*/
public Principal[] getWikiNames() throws WikiSecurityException
{
@@ -216,7 +215,7 @@
{
throw new IllegalStateException( "FATAL: database does not exist" );
}
- Set principals = new HashSet();
+ SortedSet principals = new TreeSet();
NodeList users = c_dom.getElementsByTagName( USER_TAG );
for( int i = 0; i < users.getLength(); i++ )
{