PageRenderTime 20ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/plugin-module-codegen-engine/src/main/java/com/atlassian/plugins/codegen/util/URLUtil.java

https://bitbucket.org/mmeinhold/amps
Java | 22 lines | 18 code | 4 blank | 0 comment | 3 complexity | 5df86836eb965a53133e4b425fe79173 MD5 | raw file
 1package com.atlassian.plugins.codegen.util;
 2
 3public class URLUtil
 4{
 5
 6    public static boolean isValidUrlPattern(String urlPattern)
 7    {
 8        if (urlPattern.startsWith("*."))
 9        {
10            return urlPattern.indexOf('/') < 0;
11        }
12
13        if (urlPattern.startsWith("/") && (!urlPattern.contains("*.")))
14        {
15            return true;
16        } else
17        {
18            return false;
19        }
20
21    }
22}