java: use the non-deprecated constructor of URI

Specifically, org.apache.commons.httpclient.URI

Change-Id: Ib1f888559e9401d5fabbe8ea0585a716d9bb5a59
This commit is contained in:
Noel Grandin
2014-08-05 11:47:25 +02:00
parent c5fdde23ed
commit b58f377809
3 changed files with 7 additions and 7 deletions

View File

@@ -787,7 +787,7 @@ public class Helper
{ {
HostConfiguration aNewHostConfig = new HostConfiguration(); HostConfiguration aNewHostConfig = new HostConfiguration();
URI aURI = new URI( aMainURL.toString() + "index.php?title=Special:Userlogin" ); URI aURI = new URI( aMainURL.toString() + "index.php?title=Special:Userlogin", false );
GetMethod aGetCookie = new GetMethod( aURI.getEscapedPathQuery() ); GetMethod aGetCookie = new GetMethod( aURI.getEscapedPathQuery() );
ExecuteMethod( aGetCookie, aNewHostConfig, aURI, xContext, true ); ExecuteMethod( aGetCookie, aNewHostConfig, aURI, xContext, true );
@@ -804,7 +804,7 @@ public class Helper
String sLoginToken = GetLoginToken( sLoginPage ); String sLoginToken = GetLoginToken( sLoginPage );
PostMethod aPost = new PostMethod(); PostMethod aPost = new PostMethod();
URI aPostURI = new URI( aMainURL.getPath() + "index.php?title=Special:Userlogin&action=submitlogin" ); URI aPostURI = new URI( aMainURL.getPath() + "index.php?title=Special:Userlogin&action=submitlogin", false );
aPost.setPath( aPostURI.getEscapedPathQuery() ); aPost.setPath( aPostURI.getEscapedPathQuery() );
aPost.addParameter( "wpName", sWikiUser ); aPost.addParameter( "wpName", sWikiUser );

View File

@@ -61,7 +61,7 @@ public class WikiArticle
m_sWikiPass = wikiSettings.get("Password"); m_sWikiPass = wikiSettings.get("Password");
m_sTitle = sTitle; m_sTitle = sTitle;
m_aMainURI = new URI( sMainUrl ); m_aMainURI = new URI( sMainUrl, false );
if ( bLogin ) if ( bLogin )
{ {
@@ -123,7 +123,7 @@ public class WikiArticle
if ( m_aHostConfig != null ) if ( m_aHostConfig != null )
{ {
URI aURI = new URI( m_aMainURI.toString() + "index.php?title=" + m_sTitle + "&action=edit" ); URI aURI = new URI( m_aMainURI.toString() + "index.php?title=" + m_sTitle + "&action=edit", false );
GetMethod aRequest = new GetMethod( aURI.getEscapedPathQuery() ); GetMethod aRequest = new GetMethod( aURI.getEscapedPathQuery() );
Helper.ExecuteMethod( aRequest, m_aHostConfig, aURI, m_xContext, false ); Helper.ExecuteMethod( aRequest, m_aHostConfig, aURI, m_xContext, false );
@@ -165,7 +165,7 @@ public class WikiArticle
{ {
if ( m_aHostConfig != null ) if ( m_aHostConfig != null )
{ {
URI aURI = new URI( m_aMainURI.toString() + "index.php?title=" + m_sTitle ); URI aURI = new URI( m_aMainURI.toString() + "index.php?title=" + m_sTitle, false );
GetMethod aRequest = new GetMethod( aURI.getEscapedPathQuery() ); GetMethod aRequest = new GetMethod( aURI.getEscapedPathQuery() );
Helper.ExecuteMethod( aRequest, m_aHostConfig, aURI, m_xContext, false ); Helper.ExecuteMethod( aRequest, m_aHostConfig, aURI, m_xContext, false );
@@ -206,7 +206,7 @@ public class WikiArticle
// get the edit time and token // get the edit time and token
getArticleWiki(); getArticleWiki();
URI aURI = new URI( m_aMainURI.getPath() + "index.php?title=" + m_sTitle + "&action=submit" ); URI aURI = new URI( m_aMainURI.getPath() + "index.php?title=" + m_sTitle + "&action=submit", false );
PostMethod aPost = new PostMethod(); PostMethod aPost = new PostMethod();
aPost.setPath( aURI.getEscapedPathQuery() ); aPost.setPath( aURI.getEscapedPathQuery() );

View File

@@ -212,7 +212,7 @@ public class WikiEditSettingDialog extends WikiDialog
if ( sURL.length() > 0 ) if ( sURL.length() > 0 )
{ {
URI aURI = new URI( sURL ); URI aURI = new URI( sURL, false );
GetMethod aRequest = new GetMethod( aURI.getEscapedPathQuery() ); GetMethod aRequest = new GetMethod( aURI.getEscapedPathQuery() );
aRequest.setFollowRedirects( false ); aRequest.setFollowRedirects( false );
Helper.ExecuteMethod( aRequest, aHostConfig, aURI, m_xContext, bInitHost ); Helper.ExecuteMethod( aRequest, aHostConfig, aURI, m_xContext, bInitHost );