@Test public void testGetCleanedServletPath() { String testFullPath; String testCleanedPath; testFullPath = "/foo/bar*"; testCleanedPath = IOUtils.getCleanedServletPath(testFullPath); assertEquals(testCleanedPath, "/foo/bar/**"); testFullPath = "/com.zyxabc.abc.Abc/gwtCometEvent*"; testCleanedPath = IOUtils.getCleanedServletPath(testFullPath); assertEquals(testCleanedPath, "/com.zyxabc.abc.Abc/gwtCometEvent"); }
public static String getCleanedServletPath(String fullServletPath) { if (fullServletPath.equalsIgnoreCase("/*")) return ""; Matcher matcher = SERVLET_PATH_PATTERN.matcher(fullServletPath); if (!matcher.find()) return fullServletPath; String servletPath = matcher.group(0); if (!servletPath.startsWith("/")) { servletPath = "/" + servletPath; } return servletPath; }
IOUtils { public static String getCleanedServletPath(String fullServletPath) { if (fullServletPath.equalsIgnoreCase("/*")) return ""; Matcher matcher = SERVLET_PATH_PATTERN.matcher(fullServletPath); if (!matcher.find()) return fullServletPath; String servletPath = matcher.group(0); if (!servletPath.startsWith("/")) { servletPath = "/" + servletPath; } return servletPath; } }
IOUtils { public static String getCleanedServletPath(String fullServletPath) { if (fullServletPath.equalsIgnoreCase("/*")) return ""; Matcher matcher = SERVLET_PATH_PATTERN.matcher(fullServletPath); if (!matcher.find()) return fullServletPath; String servletPath = matcher.group(0); if (!servletPath.startsWith("/")) { servletPath = "/" + servletPath; } return servletPath; }  }
IOUtils { public static String getCleanedServletPath(String fullServletPath) { if (fullServletPath.equalsIgnoreCase("/*")) return ""; Matcher matcher = SERVLET_PATH_PATTERN.matcher(fullServletPath); if (!matcher.find()) return fullServletPath; String servletPath = matcher.group(0); if (!servletPath.startsWith("/")) { servletPath = "/" + servletPath; } return servletPath; }  static void deliver(final Object o,
                               final DeliverTo deliverConfig,
                               final DeliverTo.DELIVER_TO defaultDeliver,
                               final AtmosphereResource r); static Object readEntirely(AtmosphereResource r); final static boolean isBodyBinary(AtmosphereRequest request); final static boolean isBodyEmpty(Object o); static StringBuilder readEntirelyAsString(AtmosphereResource r); static byte[] readEntirelyAsByte(AtmosphereResource r); static byte[] forceReadEntirelyAsByte(AtmosphereResource r); static String guestServletPath(AtmosphereConfig config); static String guestRawServletPath(AtmosphereConfig config); static String getCleanedServletPath(String fullServletPath); static Class<?> loadClass(Class<?> thisClass, String className); static boolean isAtmosphere(String className); static Map<String, AtmosphereFramework.MetaServiceAction> readServiceFile(final String path); static void close(final Closeable... closeableArray); static String realPath(ServletContext servletContext, String targetPath); }
IOUtils { public static String getCleanedServletPath(String fullServletPath) { if (fullServletPath.equalsIgnoreCase("/*")) return ""; Matcher matcher = SERVLET_PATH_PATTERN.matcher(fullServletPath); if (!matcher.find()) return fullServletPath; String servletPath = matcher.group(0); if (!servletPath.startsWith("/")) { servletPath = "/" + servletPath; } return servletPath; }  static void deliver(final Object o,
                               final DeliverTo deliverConfig,
                               final DeliverTo.DELIVER_TO defaultDeliver,
                               final AtmosphereResource r); static Object readEntirely(AtmosphereResource r); final static boolean isBodyBinary(AtmosphereRequest request); final static boolean isBodyEmpty(Object o); static StringBuilder readEntirelyAsString(AtmosphereResource r); static byte[] readEntirelyAsByte(AtmosphereResource r); static byte[] forceReadEntirelyAsByte(AtmosphereResource r); static String guestServletPath(AtmosphereConfig config); static String guestRawServletPath(AtmosphereConfig config); static String getCleanedServletPath(String fullServletPath); static Class<?> loadClass(Class<?> thisClass, String className); static boolean isAtmosphere(String className); static Map<String, AtmosphereFramework.MetaServiceAction> readServiceFile(final String path); static void close(final Closeable... closeableArray); static String realPath(ServletContext servletContext, String targetPath);  }