- 
                Notifications
    You must be signed in to change notification settings 
- Fork 234
Move Include to package-info #1852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: elide-4.x
Are you sure you want to change the base?
Conversation
4430d96    to
    c4b29bf      
    Compare
  
    | Collections.synchronizedMap(new LinkedHashMap<>()))); | ||
| } | ||
|  | ||
| for (Package beanPackage : beanPackages) { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of the second scan? The classpath scans are pretty expensive (they take multiple seconds). This could slow down the build quite a bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used one scan.
        
          
                elide-core/src/main/java/com/yahoo/elide/core/EntityBinding.java
              
                Outdated
          
            Show resolved
            Hide resolved
        
      | relationshipsDeque.push(fieldName); | ||
| fieldsToValues.put(fieldName, fieldOrMethod); | ||
| fieldsToTypes.put(fieldName, fieldType); | ||
| fieldsToTypes.put(fieldName, fieldType == null ? Void.class : fieldType); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get a NPE running with MappedSuperclass which returns fieldType as null.  fieldsToTypes map does not accept null as a value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it probably the generics that causes the null fieldType.
elide/elide-example-models/src/main/java/com/yahoo/elide/models/generics/Peon.java
Line 23 in f720136
| private T boss; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is exactly the problem. RawType of type T is null.
| return TypeUtils.getRawType(type, parentClass); | 
Description
Updated the example bean to move Include annotation into package-info. This will verify we locate the annotation correctly in package-info there is none on the bean.
Motivation and Context
Elide 5.x had an issue due to a migration bug and adding test to 4.x to make sure it is tested.
How Has This Been Tested?
Unit testing.
License
I confirm that this contribution is made under an Apache 2.0 license and that I have the authority necessary to make this contribution on behalf of its copyright owner.