Browse files

Consider older JLS for older persisted templates

  • Loading branch information...
1 parent 96204d9 commit 319e5c9ee1ed9cc7d67902d87338d8c3d19cab9d @cderoove committed Jul 20, 2014
Showing with 7 additions and 3 deletions.
  1. +7 −3 damp.ekeko.snippets.plugin/src/damp/ekeko/snippets/persistence.clj
View
10 damp.ekeko.snippets.plugin/src/damp/ekeko/snippets/persistence.clj
@@ -120,13 +120,17 @@
(defn
class-propertydescriptor-with-id
[ownerclasskeyword pdid]
- (let [found
+ (let [clazz
+ (astnode/class-for-ekeko-keyword ownerclasskeyword)
+ found
(some (fn [pd]
(when (= pdid
(astnode/property-descriptor-id pd))
pd))
- (astnode/nodeclass-property-descriptors
- (astnode/class-for-ekeko-keyword ownerclasskeyword)))]
+
+ (clojure.set/union
+ (set (astnode/nodeclass-property-descriptors clazz AST/JLS4)) ;for older persisted ones
+ (set (astnode/nodeclass-property-descriptors clazz))))]
(if
(nil? found)
(throw (Exception. (str "When deserializing, could not find property descriptor: " ownerclasskeyword pdid)))

0 comments on commit 319e5c9

Please sign in to comment.