X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.common%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fcommon%2Furi%2FURIEscape.java;h=c37e47e44800943f4b8f8431ba3d75aa16020454;hb=HEAD;hp=f73d4552def572c92a355f51374e84e585bf428d;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.common/src/org/simantics/db/common/uri/URIEscape.java b/bundles/org.simantics.db.common/src/org/simantics/db/common/uri/URIEscape.java index f73d4552d..c37e47e44 100644 --- a/bundles/org.simantics.db.common/src/org/simantics/db/common/uri/URIEscape.java +++ b/bundles/org.simantics.db.common/src/org/simantics/db/common/uri/URIEscape.java @@ -1,63 +1,63 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management - * in Industry THTH ry. - * 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: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.db.common.uri; - -import java.util.regex.Pattern; - - -class URIEscape { - - private static final String HTTP = "http:/"; - private static final String HTTP_SLASH = "http://"; - - private static final Pattern slash = Pattern.compile("/"); - - /** - * Escapes the specified name by changing spaces (' ') into underscores - * ('_'). - * - * @param name name to escape - * @return - * @deprecated do not use, this is not the DB standard to URI escaping. - */ - @Deprecated - public static String escapeName(String name) { - char[] chars = name.toCharArray(); - boolean modified = false; - for(int i=0;i