History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JANINO-75
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Arno Unkrig
Reporter: Arno Unkrig
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Janino

Duplicate Single-Type-Imports and Single-Static-Imports cause compilation errors

Created: 28/Jan/07 04:00 PM   Updated: 28/Jan/07 04:03 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified


 Description  « Hide
Marcelll posted the following bug report on [janino-user]:

Hello Arno

I've tried to compile my class body with the new 2.53 version and the
integrated new static import feature.
When trying this i receive the strange error :

Class "myclass" was first imported as "com.xxx.xxx", now as "com.xxx.xxx"

Again i'm using the class body evaluator. Any idea what's going wrong ?

Thanks in advance fo any help !



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Arno Unkrig - 28/Jan/07 04:02 PM
According to the JLS3, duplicate single-type-imports, e.g.
import java.util.Map;
import java.util.Map;

or duplicate single-static-imports, e.g.

import java.lang.Integer.toString;
import java.lang.Integer.toString;

are not an error (as JANINO reports).

Inconsistent single-type-imports or single-static-imports, e.g.

import java.lang.Integer.toString;
import java.lang.Long.toString;

are errors, of course!


Arno Unkrig - 28/Jan/07 04:03 PM
Fixed the behavior of JANINO according to the JLS.