Using java.io.* in EJB
I use java.io.StringReader in my EJB, and IntelliJ highlights this as an
error.
I don't think that the use of API from java.io package except file I/O
in EJB is incorrect.
EJB 1.1 specification prohibits only file access from EJB:
"An enterprise bean must not use the java.io package to attempt to
access files and directories in the file system."
请先登录再写评论。
Hello Vladimir,
will be fixed in #633, thanks for report.
I intend to disallow following classes access in EJB:
File
FileDescriptor
FileInputStream
FileOutputStream
FilePermission
FileReader
FileWriter
--
regards,
Alexey Kudravtsev.
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"
"Vladimir Korenev" <v_korenev@mail.ru> wrote in message
news:3D21727E.3060903@mail.ru...
>
>
also java.net.ServerSocket ans ServerSocketFactory
should be disallowed ...
I think the list of disallowed classes should be visible (and editable)
in an idea config file.
I see no need to expose that with a gui dialog, just make the decision
visible through the config files.
Edo
Alexey Kudravtsev wrote:
>>I use java.io.StringReader in my EJB, and IntelliJ highlights this as an
>> error.
>>
>>I don't think that the use of API from java.io package except file I/O
>>in EJB is incorrect.
>>EJB 1.1 specification prohibits only file access from EJB:
>>"An enterprise bean must not use the java.io package to attempt to
>>access files and directories in the file system."
>>
Please, make the EJB errors ("Simon says: should not use") optional or
somehow configurable.
Thanks
r.
"Edoardo Comar" <edoardo.comar@capeclear.com> wrote in message
news:3D218CE0.40909@capeclear.com...
Richard,
Why would you ever want to turn it off?
--
Best regards,
Mike Aizatsky.
-
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"
These restrictions in the EJB spec are there for portability reasons.
Several application servers allow their usage. There could be a reason
for someone to use them after testing that their specific server allows
in case it solves a particular problem. I think IDEA should give
warnings but not errors for code using them.
/Fredrik Lindgren
Mike Aizatsky wrote:
Right, Fredrik.
And also, you may have to deal with a code that doesn't follow
the restrictions too much and it still works (e.g. WebLogic is quite
benevolent with non-100% compliant code) and you have no
right or time to fix the code.
r.
"Fredrik Lindgren" <fredrik.lindgren@chello.se> wrote in message
news:3D2228F6.3060203@chello.se...
>
>
>
>