Skip to content
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

Issue in type conversion for using @Separator for Abstract attribute #89

hemus2121 opened this issue Aug 19, 2014 · 1 comment


Copy link

In Type conversion example we have following for Separator Annotation []

File[] path();

-- I fails compilation saying "Attribute value must be Constant", on probing further found that we have pathSeparator in defined as
" public static final String pathSeparator = "" + pathSeparatorChar;" in
and pathSeparatorChar resolves to fs.getPathSeparator() and method getPathSeparator()resolves to abstract char attribute of

--During compile time we will not be able make out what is actual value for getPathSeparator() since its abstract and no concrete values can be deduced and during run-time this depends on underlying OS File System.

-- So Separator can't make out run-time dependent values and values has to be resolved at compile time only.

Copy link

Good catch. We should probably remove that line from the example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants