Skip to main content

New answers tagged

2 votes

Approach for querying an arbitrary set of user submitted fields and values in Spring application? Like a shopping site sidebar search?

If your filters are simple (like equality per field) then check out query by example in Spring Data JPA. If you need complex filters (like comparisons between fields, checking for existence, range ...
Sankozi's user avatar
  • 189
1 vote
Accepted

What SOLID principles does the Java List interface challenge?

It does not violate the Liskov Substitution Principle. The LSP states that a subtype should not violate guarantees given by a supertype. But the List interface explicitly states that the methods add(),...
JacquesB's user avatar
  • 62.3k
-6 votes

What SOLID principles does the Java List interface challenge?

SRP is a bogus principle, as responsibility and count and scope thereof are free subjective parameters of design, chosen and assigned at will. Any program can be argued to have a single responsibilty,...
Basilevs's user avatar
  • 4,484
-3 votes

What SOLID principles does the Java List interface challenge?

Interface Segregation Principle (ISP) is challenged because List was designed by people who had no idea what exactly your program needs (it's from a library) and so they threw together everything that ...
candied_orange's user avatar
0 votes

Convenience inheritance

I don't quite understand your problem but going by the one example you provide you may think of it differently and the following may apply in more cases. Circle does not have an "is a" ...
Martin Maat's user avatar
  • 18.6k
5 votes

Convenience inheritance

IMHO implementation inheritance is not an anti-pattern in general. There are too many examples where this works well enough to ban this kind of inheritance dogmatically. You presented a few examples ...
Doc Brown's user avatar
  • 220k

Top 50 recent answers are included