Skip to content

Commit

Permalink
undo experimental changes in ISourceLocation
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Sep 12, 2023
1 parent 654939b commit f8363ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 29 deletions.
28 changes: 2 additions & 26 deletions src/main/java/io/usethesource/vallang/ISourceLocation.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/*******************************************************************************
* Copyright (c) 2007 IBM Corporation, 2023 NWO-I Centrum Wiskunde & Informatica
* Copyright (c) 2007 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Robert Fuhrer ([email protected]) - initial API and implementation
* Jurgen Vinju ([email protected]) - extensions and maintenance
*******************************************************************************/

package io.usethesource.vallang;
Expand Down Expand Up @@ -134,30 +134,6 @@ public interface ISourceLocation extends IValue {
* @return the source location without any offset & length information.
*/
public ISourceLocation top();

public String getFileName();

public boolean hasFileName();

public ISourceLocation changeScheme(String newScheme);

public ISourceLocation changeAuthority(String newAuthority);

public ISourceLocation changePath(String newPath);

public ISourceLocation changeFile(String newFile);

public ISourceLocation changeExtension(String newExtension);

public ISourceLocation changeFragment(String newFragment);

public ISourceLocation changeQuery(String newQuery);

public ISourceLocation changeFileName(String newFileName);

public ISourceLocation makeChildLocation(String childPath);

public ISourceLocation getParentLocation();

@Override
default <T, E extends Throwable> T accept(IValueVisitor<T, E> v) throws E {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ public String getAuthority() {
public int hashCode() {
return scheme.hashCode() + authority.hashCode();
}

@Override
public boolean equals(@Nullable Object obj) {
if (obj == null) {
Expand Down Expand Up @@ -501,7 +500,7 @@ public QueryURI(String scheme, String query) {

@Override
@SuppressWarnings("nullness") // CF doesn't have a model for URI
public URI getURI() {
public URI getURI() {
try {
URI result = new URI(scheme, "", "/", query, null);
return new URI(result.toASCIIString());
Expand Down Expand Up @@ -599,7 +598,7 @@ public QueryPathURI(String scheme, String path, String query) {

@Override
@SuppressWarnings("nullness") // CF doesn't have a model for URI
public URI getURI() {
public URI getURI() {
try {
URI result = new URI(scheme, "", path, query, null);
return new URI(result.toASCIIString());
Expand Down

0 comments on commit f8363ca

Please sign in to comment.