Skip to content

Instantly share code, notes, and snippets.

@mikma
Last active December 28, 2015 08:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikma/7473048 to your computer and use it in GitHub Desktop.
Save mikma/7473048 to your computer and use it in GitHub Desktop.
diff -r e1a813d49fd4 src/main/java/net/fortuna/ical4j/vcard/property/Telephone.java
--- a/src/main/java/net/fortuna/ical4j/vcard/property/Telephone.java Tue Oct 01 20:54:12 2013 +1000
+++ b/src/main/java/net/fortuna/ical4j/vcard/property/Telephone.java Thu Nov 14 20:31:48 2013 +0100
@@ -176,6 +176,12 @@
for (Parameter param : getParameters()) {
final Parameter.Id id = param.getId();
+ // Value and parameter MUST match.
+ if ((Value.TEXT.equals(param) && uri == null) ||
+ (Value.URI.equals(param) && uri != null)) {
+ continue;
+ }
+
if (!Parameter.Id.PID.equals(id) &&
!Parameter.Id.PREF.equals(id) &&
!Parameter.Id.TYPE.equals(id)) {
@mikma
Copy link
Author

mikma commented Nov 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment