From: David ‘Bombe’ Roden Date: Tue, 30 Nov 2010 16:14:39 +0000 (+0100) Subject: Don’t use Java’s whitespace character class, it’s broken on JDK7. X-Git-Tag: 0.3.2-RC2~2 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=c1b01520dde989b59b94bcd7a894be025ac70404 Don’t use Java’s whitespace character class, it’s broken on JDK7. --- diff --git a/src/main/java/net/pterodactylus/sone/text/FreenetLinkParser.java b/src/main/java/net/pterodactylus/sone/text/FreenetLinkParser.java index 85bda1a..f36b6df 100644 --- a/src/main/java/net/pterodactylus/sone/text/FreenetLinkParser.java +++ b/src/main/java/net/pterodactylus/sone/text/FreenetLinkParser.java @@ -40,7 +40,7 @@ public class FreenetLinkParser implements Parser { private static final Logger logger = Logging.getLogger(FreenetLinkParser.class); /** Pattern to detect whitespace. */ - private static final Pattern whitespacePattern = Pattern.compile("[\\p{javaWhitespace}]"); + private static final Pattern whitespacePattern = Pattern.compile("[\u0020\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u200c\u200d\u202f\u205f\u2060\u2800\u3000]"); /** * Enumeration for all recognized link types.