This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
java/net/URL.getQuery
- From: Tony Kimball <alk at pobox dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Wed, 3 Jul 2002 23:05:25 -0500
- Subject: java/net/URL.getQuery
- Reply-to: alk at pobox dot com
I have a signed copy of a copyright assignement from RMS now.
This is a Java2 routine not previously implemented. Here's a patch
against the current HEAD:
@ spa:net$;cvs diff URL.java
cvs diff URL.java
Index: URL.java
===================================================================
RCS file: /cvsroot/gcc/gcc/libjava/java/net/URL.java,v
retrieving revision 1.10
diff -r1.10 URL.java
33a34
> private String query = null;
95a97,108
>
> int queryAt = file.lastIndexOf('?');
> if (queryAt < 0)
> {
> this.path = file;
> }
> else
> {
> this.path = file.substring(0, queryAt);
> this.query = file.substring(++queryAt);
> }
>
188a202,212
> int queryAt = file.lastIndexOf('?');
> if (queryAt < 0)
> {
> this.path = file;
> }
> else
> {
> this.path = file.substring(0, queryAt);
> this.query = file.substring(++queryAt);
> }
>
224,225c248,253
< int quest = file.indexOf('?');
< return quest < 0 ? file : file.substring(0, quest);
---
> return path;
> }
>
> public String getQuery()
> {
> return query;