SilverHoodCorp / gdata-java-client

Automatically exported from code.google.com/p/gdata-java-client
Apache License 2.0
0 stars 0 forks source link

AuthSubUtil.getTokenFromReply() cannot get token if it is the first parameter #354

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
------------------------------------------
import com.google.gdata.client.http.AuthSubUtil;

public class GetTokenFromReplyTest {

    public static void main(String args[]) throws Exception {
        String token;
        token = AuthSubUtil.getTokenFromReply("http://127.0.0.1:8888/?token=12345"); // no &
        System.out.println("token=" + token);

        token = AuthSubUtil.getTokenFromReply("http://127.0.0.1:8888/?&token=12345"); // & exists
        System.out.println("token=" + token);
    }

}
------------------------------------------
What is the expected output?
token=12345
token=12345

What do you see instead?
token=null
token=12345

What version of the product are you using?
1.45.0
On what operating system?
Windows XP SP3

Please provide any additional information below.
Compile the test above
javac -cp gdata-core-1.0.jar GetTokenFromReplyTest.java

And run it 
java -cp gdata-core-1.0.jar;. GetTokenFromReplyTest

Original issue reported on code.google.com by dmitry.k...@teknavo.com on 4 Aug 2011 at 10:52