Spoon adds package's fully-qualified name to enum
- Dominant language
- Java
- Stars
- 2k
- Forks
- 392
- Avg merge
- 11h 24m
- Merged PRs (30d)
- 36
Description
Hi,
In my original code, I have an interface declaration as below, that declares an enum called DRAG_STATUS:
```
package org.gateshipone.malp.application.views;
public interface NowPlayingDragStatusReceiver {
// Possible values for DRAG_STATUS (up,down)
enum DRAG_STATUS {
DRAGGED_UP, DRAGGED_DOWN
}
// Possible values for the view in the viewswitcher (cover, playlist)
enum VIEW_SWITCHER_STATUS {
COVER_VIEW, PLAYLIST_VIEW
}
// Called when the whole view is either completely dragged up or down
void onStatusChanged(DRAG_STATUS status);
// Called continuously during dragging.
void onDragPositionChanged(float pos);
// Called when the view switcher switches between cover and playlist view
void onSwitchedViews(VIEW_SWITCHER_STATUS view);
// Called when the user starts the drag
void onStartDrag();
}
```
In `MainActivity.java` i have this piece of code:
```
package org.gateshipone.malp.application.activities;
import org.gateshipone.malp.application.views.NowPlayingView;
public class MainActivity extends AppCompatActivity implements NowPlayingView.NowPlayingDragStatusReceiver {
private DRAG_STATUS mNowPlayingDragStatus;
// ...
}
```
When Spoon fixes the application, this is the result:
```
package org.gateshipone.malp.application.activities;
import org.gateshipone.malp.application.views.NowPlayingView;
public class MainActivity extends android.support.v7.app.AppCompatActivity implements org.gateshipone.malp.application.views.NowPlayingView.NowPlayingDragStatusReceiver {
private org.gateshipone.malp.application.activities.DRAG_STATUS mNowPlayingDragStatus;
// ...
}
```
but at compile time, I have this error:
```
/.../app/src/main/java/org/gateshipone/malp/application/activities/MainActivity.java:82: error: cannot find symbol
private org.gateshipone.malp.application.activities.DRAG_STATUS mNowPlayingDragStatus;
symbol: class DRAG_STATUS
location: package org.gateshipone.malp.application.activities
```
Is this an intended behaviour?
Thanks
Contributor guide
Assessment
This issue has not been assessed yet.