1 package com.github.sevntu.checkstyle.checks.coding;
2 import java.io.IOException;
3 import java.io.ObjectInputStream;
4 import java.io.Serializable;
5 import java.text.ParseException;
6 import java.text.SimpleDateFormat;
7 import java.util.Date;
8 public class InputAvoidDefaultSerializableInInnerClasses2
9 {
10 public class Foo implements Serializable {
11
12 public Date date;
13
14
15
16
17
18
19
20
21
22 private Foo readObject(String str) throws ParseException {
23 Foo result = new Foo();
24 result.date = new SimpleDateFormat().parse(str);
25 return result;
26 }
27 }
28 }