aboutsummaryrefslogtreecommitdiffstats
path: root/build/src/main/java/org/aspectj
diff options
context:
space:
mode:
authorAndrew Clement <aclement@vmware.com>2025-04-15 15:26:29 -0700
committerAndrew Clement <aclement@vmware.com>2025-04-15 15:26:29 -0700
commit2b0e11d8633c84e8b0827e0eb77b4639fe0914e4 (patch)
tree1a7973c688df646a7d7d6db43d5f7d95c63f3feb /build/src/main/java/org/aspectj
parente0d2b60288f20d00071cf5e0134a31b5758bb006 (diff)
downloadaspectj-master.tar.gz
aspectj-master.zip
Fix more "Attempt to push null on operand stack" variantsHEADmaster
This change fixes more cases in the *Declaration classes that generate code. Both #336 and #337 are due to the same piece of code not correctly computing the resolved position because of copying it from a source method when it needs recomputing for the method being generated. In particular primitive types and/or double slot types (like long or double) cause the code to miscompute the resolved positions or set the wrong type of expected type on the stack. Fixes #336 Fixes #337
Diffstat (limited to 'build/src/main/java/org/aspectj')
0 files changed, 0 insertions, 0 deletions
9' href='#n29'>29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* $Id$ */

package org.apache.fop.datatypes;

/**
 * This class contains method to deal with the <uri-specification> datatype from XSL-FO.
 */
public class URISpecification {

    /**
     * Get the URL string from a wrapped URL.
     *
     * @param href the input wrapped URL
     * @return the raw URL
     */
    public static String getURL(String href) {
        /*
         * According to section 5.11 a <uri-specification> is:
         * "url(" + URI + ")"
         * according to 7.28.7 a <uri-specification> is:
         * URI
         * So handle both.
         */
        href = href.trim();
        if (href.startsWith("url(") && (href.indexOf(")") != -1)) {
            href = href.substring(4, href.indexOf(")")).trim();
            if (href.startsWith("'") && href.endsWith("'")) {
                href = href.substring(1, href.length() - 1);
            } else if (href.startsWith("\"") && href.endsWith("\"")) {
                href = href.substring(1, href.length() - 1);
            }
        } else {
            // warn
        }
        return href;
    }

    
}