| Summary: | NPE in JdtBasedTypeFactory | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Nicolas Cabanis <dev> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sebastian.zarnekow |
| Version: | 1.0.1 | Flags: | sebastian.zarnekow:
helios+
sebastian.zarnekow: indigo+ |
| Target Milestone: | M5 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Nicolas Cabanis
Please provide the source for the class and and the annotations that are present on the class. Do you try to create the JvmType for the compiled class or for the source class? Does the error occur in the runtime mode, too? This works for me. Now the type can be created (the annotations are not relevant).
if (value == null) {
return result;
}
The default values do not work for the annotations from the own source code.
---
package com.xxx.annotations
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Im Gegensatz zu der @Generated aus der JDK kann diese Annotation auch zur Laufzeit ausgewertet werden.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Generated
{
/** Der Name der Resource, aus der diese Datei generiert wurde. */
String source() default "";
}
---
@javax.annotation.Generated("something")
@com.xxx.annotations.Generated
public interface YY {}
---
The javax.annotation.Generated has 'String comments() default "";' which works. The com.xxx.annotations.Generated has 'String source() default "";' which does not work.
Pushed fix to master. This one will tackle to causer for the NPE: https://bugs.eclipse.org/bugs/show_bug.cgi?id=334943 As stated in comment #3, a workaround was pushed to master. Pushed to Helios maintenance. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |