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 4224a52f6189e6d98b73d5653612fff9b66400c7
Author: Juan Pablo Santos Rodríguez <[email protected]>
AuthorDate: Mon Dec 13 23:12:25 2021 +0100

    minor changes suggested by intellij
---
 .../java/org/apache/wiki/content/DefaultPageRenamer.java   |  4 ++--
 .../apache/wiki/references/DefaultReferenceManager.java    | 14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git 
a/jspwiki-main/src/main/java/org/apache/wiki/content/DefaultPageRenamer.java 
b/jspwiki-main/src/main/java/org/apache/wiki/content/DefaultPageRenamer.java
index 022b14d..172c6a0 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/content/DefaultPageRenamer.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/content/DefaultPageRenamer.java
@@ -94,7 +94,7 @@ public class DefaultPageRenamer implements PageRenamer {
         
         final Set< String > referrers = getReferencesToChange( fromPage, 
engine );
 
-        //  Do the actual rename by changing from the frompage to the topage, 
including all of the attachments
+        //  Do the actual rename by changing from the frompage to the topage, 
including all the attachments
         //  Remove references to attachments under old name
         final List< Attachment > attachmentsOldName = engine.getManager( 
AttachmentManager.class ).listAttachments( fromPage );
         for( final Attachment att: attachmentsOldName ) {
@@ -257,7 +257,7 @@ public class DefaultPageRenamer implements PageRenamer {
         
         // This monstrosity just looks for a JSPWiki link pattern.  But it is 
pretty cool for a regexp, isn't it?  If you can
         // understand this in a single reading, you have way too much time in 
your hands.
-        final Pattern linkPattern = Pattern.compile( 
"([\\[\\~]?)\\[([^\\|\\]]*)(\\|)?([^\\|\\]]*)(\\|)?([^\\|\\]]*)\\]" );
+        final Pattern linkPattern = Pattern.compile( 
"([\\[~]?)\\[([^|\\]]*)(\\|)?([^|\\]]*)(\\|)?([^|\\]]*)]" );
         final Matcher matcher = linkPattern.matcher( sourceText );
         int start = 0;
         
diff --git 
a/jspwiki-main/src/main/java/org/apache/wiki/references/DefaultReferenceManager.java
 
b/jspwiki-main/src/main/java/org/apache/wiki/references/DefaultReferenceManager.java
index c169282..2cf3066 100644
--- 
a/jspwiki-main/src/main/java/org/apache/wiki/references/DefaultReferenceManager.java
+++ 
b/jspwiki-main/src/main/java/org/apache/wiki/references/DefaultReferenceManager.java
@@ -64,12 +64,12 @@ import java.util.concurrent.ConcurrentHashMap;
    A word about synchronizing:
 
    I expect this object to be accessed in three situations:
-   - when a Engine is created and it scans its wikipages
-   - when the WE saves a page
-   - when a JSP page accesses one of the WE's ReferenceManagers to display a 
list of (un)referenced pages.
+   - when an Engine is created, and it scans its wikipages
+   - when the Engine saves a page
+   - when a JSP page accesses one of the Engine's ReferenceManagers to display 
a list of (un)referenced pages.
 
    So, access to this class is fairly rare, and usually triggered by user 
interaction. OTOH, the methods in this class use their storage
-   objects intensively (and, sorry to say, in an unoptimized manner =). My 
deduction: using unsynchronized HashMaps etc and syncing methods
+   objects intensively (and, sorry to say, in an unoptimized manner =). My 
deduction: using unsynchronized HashMaps etc. and syncing methods
    or code blocks is preferrable to using slow, synced storage objects. We 
don't have iterative code here, so I'm going to use synced
    methods for now.
 
@@ -182,7 +182,7 @@ public class DefaultReferenceManager extends BasePageFilter 
implements Reference
         try {
             //  Unserialize things.  The loop below cannot be combined with 
the other loop below, simply because
             //  engine.getPage() has side effects such as loading initializing 
the user databases, which in turn want all
-            //  of the pages to be read already...
+            //  the pages to be read already...
             //
             //  Yes, this is a kludge.  We know.  Will be fixed.
             final long saved = unserializeFromDisk();
@@ -502,7 +502,7 @@ public class DefaultReferenceManager extends BasePageFilter 
implements Reference
      *  Updates the referred pages of a new or edited WikiPage. If a refersTo 
entry for this page already exists, it is removed
      *  and a new one is built from scratch. Also calls updateReferredBy() for 
each referenced page.
      *  <P>
-     *  This is the method to call when a new page has been created and we 
want to a) set up its references and b) notify the
+     *  This is the method to call when a new page has been created, and we 
want to a) set up its references and b) notify the
      *  referred pages of the references. Use this method during run-time.
      *
      *  @param page Name of the page to update.
@@ -664,7 +664,7 @@ public class DefaultReferenceManager extends BasePageFilter 
implements Reference
 
 
     /**
-     * Clears the references to a certain page so it's no longer in the map.
+     * Clears the references to a certain page, so it's no longer in the map.
      *
      * @param pagename  Name of the page to clear references for.
      */

Reply via email to