File: qdox_1.9.diff

package info (click to toggle)
libcommons-attributes-java 2.2-8
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 872 kB
  • ctags: 771
  • sloc: java: 3,458; xml: 2,561; makefile: 21; sh: 5
file content (40 lines) | stat: -rw-r--r-- 1,289 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Description: Fix compatibility with QDox 1.9
 "
  In both JavaClass and JavaSource the getPackage() returns an object of
  type JavaPackage instead of a String. To get the same result as before
  use getPackage().getName().
 "
 <http://qdox.codehaus.org/upgrade.html>
Author: Damien Raude-Morvan <drazzib@drazzib.com>
Last-Update: 2009-08-09
--- a/compiler/src/java/org/apache/commons/attributes/compiler/AttributeCompiler.java
+++ b/compiler/src/java/org/apache/commons/attributes/compiler/AttributeCompiler.java
@@ -39,6 +39,7 @@
 import com.thoughtworks.qdox.model.JavaMethod;
 import com.thoughtworks.qdox.model.DocletTag;
 import com.thoughtworks.qdox.model.JavaParameter;
+import com.thoughtworks.qdox.model.JavaPackage;
 
 
 /**
@@ -241,9 +242,11 @@
         String packageName = null;
         String className = null;
         
-        packageName = javaClass.getPackage ();
-        if (packageName == null) {
+        JavaPackage packagez = javaClass.getPackage();
+        if (packagez == null || packagez.getName() == null) {
             packageName = "";
+        } else {
+            packageName = packagez.getName();
         }
         
         if (javaClass.isInner ()) {
@@ -523,4 +526,4 @@
         }
         return false;
     }
-}
\ No newline at end of file
+}