You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrew Zhang (JIRA)" <ji...@apache.org> on 2007/05/21 00:34:16 UTC
[jira] Created: (HARMONY-3916) [classlib][io] Harmony throws
unexpected NotActiveException when there's a ObjectInputValidation
registered
[classlib][io] Harmony throws unexpected NotActiveException when there's a ObjectInputValidation registered
------------------------------------------------------------------------------------------------------------
Key: HARMONY-3916
URL: https://issues.apache.org/jira/browse/HARMONY-3916
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Andrew Zhang
Following test case reproduces the problem:
public void test() throws Exception {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(new RegisterValidationClass());
oos.close();
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
ObjectInputStream fis = new ObjectInputStream(bais);
// should not throw NotActiveException
fis.readObject();
}
private static class RegisterValidationClass implements Serializable {
private A a = new A();
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
stream.defaultReadObject();
stream.registerValidation(new MockObjectInputValidation(), 0);
}
}
private static class MockObjectInputValidation implements ObjectInputValidation {
public void validateObject() throws InvalidObjectException {
}
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HARMONY-3916) [classlib][io] Harmony throws
unexpected NotActiveException when there's a ObjectInputValidation
registered
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov reassigned HARMONY-3916:
----------------------------------------
Assignee: Alexei Zakharov
> [classlib][io] Harmony throws unexpected NotActiveException when there's a ObjectInputValidation registered
> ------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-3916
> URL: https://issues.apache.org/jira/browse/HARMONY-3916
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Andrew Zhang
> Assigned To: Alexei Zakharov
> Attachments: Harmony-3916.diff
>
>
> Following test case reproduces the problem:
> public void test() throws Exception {
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> ObjectOutputStream oos = new ObjectOutputStream(baos);
> oos.writeObject(new RegisterValidationClass());
> oos.close();
> ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
> ObjectInputStream fis = new ObjectInputStream(bais);
> // should not throw NotActiveException
> fis.readObject();
> }
>
> private static class RegisterValidationClass implements Serializable {
> private A a = new A();
> private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
> stream.defaultReadObject();
> stream.registerValidation(new MockObjectInputValidation(), 0);
> }
> }
>
> private static class MockObjectInputValidation implements ObjectInputValidation {
> public void validateObject() throws InvalidObjectException {
>
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-3916) [classlib][io] Harmony throws
unexpected NotActiveException when there's a ObjectInputValidation
registered
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov closed HARMONY-3916.
------------------------------------
Great! Issue closed.
> [classlib][io] Harmony throws unexpected NotActiveException when there's a ObjectInputValidation registered
> ------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-3916
> URL: https://issues.apache.org/jira/browse/HARMONY-3916
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Andrew Zhang
> Assigned To: Alexei Zakharov
> Attachments: Harmony-3916.diff
>
>
> Following test case reproduces the problem:
> public void test() throws Exception {
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> ObjectOutputStream oos = new ObjectOutputStream(baos);
> oos.writeObject(new RegisterValidationClass());
> oos.close();
> ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
> ObjectInputStream fis = new ObjectInputStream(bais);
> // should not throw NotActiveException
> fis.readObject();
> }
>
> private static class RegisterValidationClass implements Serializable {
> private A a = new A();
> private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
> stream.defaultReadObject();
> stream.registerValidation(new MockObjectInputValidation(), 0);
> }
> }
>
> private static class MockObjectInputValidation implements ObjectInputValidation {
> public void validateObject() throws InvalidObjectException {
>
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-3916) [classlib][io] Harmony throws
unexpected NotActiveException when there's a ObjectInputValidation
registered
Posted by "Andrew Zhang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497822 ]
Andrew Zhang commented on HARMONY-3916:
---------------------------------------
Thanks Alexei,
It looks fine. :)
> [classlib][io] Harmony throws unexpected NotActiveException when there's a ObjectInputValidation registered
> ------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-3916
> URL: https://issues.apache.org/jira/browse/HARMONY-3916
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Andrew Zhang
> Assigned To: Alexei Zakharov
> Attachments: Harmony-3916.diff
>
>
> Following test case reproduces the problem:
> public void test() throws Exception {
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> ObjectOutputStream oos = new ObjectOutputStream(baos);
> oos.writeObject(new RegisterValidationClass());
> oos.close();
> ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
> ObjectInputStream fis = new ObjectInputStream(bais);
> // should not throw NotActiveException
> fis.readObject();
> }
>
> private static class RegisterValidationClass implements Serializable {
> private A a = new A();
> private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
> stream.defaultReadObject();
> stream.registerValidation(new MockObjectInputValidation(), 0);
> }
> }
>
> private static class MockObjectInputValidation implements ObjectInputValidation {
> public void validateObject() throws InvalidObjectException {
>
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-3916) [classlib][io] Harmony throws
unexpected NotActiveException when there's a ObjectInputValidation
registered
Posted by "Andrew Zhang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Zhang updated HARMONY-3916:
----------------------------------
Attachment: Harmony-3916.diff
Hi,
Would you please apply my patch? Thanks!
Best regards,
Andrew
> [classlib][io] Harmony throws unexpected NotActiveException when there's a ObjectInputValidation registered
> ------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-3916
> URL: https://issues.apache.org/jira/browse/HARMONY-3916
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Andrew Zhang
> Attachments: Harmony-3916.diff
>
>
> Following test case reproduces the problem:
> public void test() throws Exception {
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> ObjectOutputStream oos = new ObjectOutputStream(baos);
> oos.writeObject(new RegisterValidationClass());
> oos.close();
> ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
> ObjectInputStream fis = new ObjectInputStream(bais);
> // should not throw NotActiveException
> fis.readObject();
> }
>
> private static class RegisterValidationClass implements Serializable {
> private A a = new A();
> private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
> stream.defaultReadObject();
> stream.registerValidation(new MockObjectInputValidation(), 0);
> }
> }
>
> private static class MockObjectInputValidation implements ObjectInputValidation {
> public void validateObject() throws InvalidObjectException {
>
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-3916) [classlib][io] Harmony throws
unexpected NotActiveException when there's a ObjectInputValidation
registered
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov resolved HARMONY-3916.
--------------------------------------
Resolution: Fixed
Thanks for the patch Andrew. I don't see any new failures after applying your patch so I've committed it at the revision 540515. Please verify it was applied as expected.
> [classlib][io] Harmony throws unexpected NotActiveException when there's a ObjectInputValidation registered
> ------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-3916
> URL: https://issues.apache.org/jira/browse/HARMONY-3916
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Andrew Zhang
> Assigned To: Alexei Zakharov
> Attachments: Harmony-3916.diff
>
>
> Following test case reproduces the problem:
> public void test() throws Exception {
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> ObjectOutputStream oos = new ObjectOutputStream(baos);
> oos.writeObject(new RegisterValidationClass());
> oos.close();
> ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
> ObjectInputStream fis = new ObjectInputStream(bais);
> // should not throw NotActiveException
> fis.readObject();
> }
>
> private static class RegisterValidationClass implements Serializable {
> private A a = new A();
> private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
> stream.defaultReadObject();
> stream.registerValidation(new MockObjectInputValidation(), 0);
> }
> }
>
> private static class MockObjectInputValidation implements ObjectInputValidation {
> public void validateObject() throws InvalidObjectException {
>
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.