Questions tagged [name-clash]

62 questions
0
votes
2 answers

Is 10 hex digit git hash abbreviation enough?

How many possible hash values does one need to avoid clashes among N items? If you recall birthday paradox, the answer is much smaller than N. Let's reverse the question: for N=16^10 possible hash values, which corresponds to 10 hex digits of…
Michael
  • 5,775
  • 2
  • 34
  • 53
0
votes
1 answer

Java - 'Name clash' and 'constructor undefined' error when overriding inner class that inherits a generic from the outer class

I recently upgraded the eclipse and java version in a project and some errors occured. I tried to reproduce and found out that the following setup lead to the errors in in Eclipse Oxigen.3a (4.7.3a) using Java 1.8, while the same works with eclipse…
emi-le
  • 756
  • 9
  • 26
0
votes
0 answers

Java error: name clash: method in Class overrides a method whose erasure is the same as another method, yet neither overrides the other

I have code in my project like this below: public class CommandValidator extends AbstractValidator { @Override public boolean validate(CommandTransaction object) { return false; } } public abstract class…
0
votes
1 answer

Unexpected compiler error when implementing 2 interfaces which both declare the same method - (one abstract and one default)

I'm tying to understand why the following (example 1 below) gives me a compiler error stating that... 'ClassA inherits abstract and default for test() from types Interface1 and Interface2' ...when if I change Interface1 to an abstract class and…
Zippy
  • 3,826
  • 5
  • 43
  • 96
0
votes
0 answers

Can not solving Reverse accessor clashes

I have a bug that I can not solve in django>=1.8,<1.9. I merged my changes and I get this: ERRORS: archive.Booking.articles: (fields.E304) Reverse accessor for 'Booking.articles' clashes with reverse accessor for 'Booking.articles'. HINT: Add or…
git-e
  • 269
  • 1
  • 4
  • 15
0
votes
2 answers

Java name clash error, a method has the same erasure as another method

I have two classes as follows class QueryResult: public class QueryResult { ... public static List sortResults(boolean ascending, List toSort) { ... } } and class CaseResult: public class CaseResult extends…
Catherine
  • 83
  • 1
  • 6
0
votes
1 answer

Name clash because of same erasure

I have an interface like the following public interface IDrawerItem extends IItem, IExpandable, ISubItem { void bindView(VH holder, List payloads); } Im…
user3600801
0
votes
1 answer

Name Clash even though I'm not using both interfaces

I'm getting this annoying message : Error:(8, 8) java: name clash: save(java.lang.Iterable) in org.springframework.data.repository.CrudRepository and save(java.lang.Iterable) in org.springframework.data.jpa.repository.JpaRepository have the same…
Soil92
  • 37
  • 2
  • 9
0
votes
2 answers

Same model names in Django's project

I have a project with two apps: accounts, classes. In accounts app I am using Django's Group model (for account permissions) and in classes app I have another one model with the name Group (but it should be interpreted as a group of students). My…
Tomasz Dzieniak
  • 2,765
  • 3
  • 24
  • 42
0
votes
2 answers

Name conflict between member function and class name

I'm writing a chess program with wxWidgets. At one point, I have a subclass of wxGLCanvas, and it makes use of a Move class I wrote. Unfortunately, it seems like there's a method wxWindowBase::Move(), and so all my statements of the form list
Henry Swanson
  • 186
  • 13
0
votes
1 answer

Namespaces in Swift

I'm writing an extension to String to return a reversed version of it: extension String{ func rev()->String{ var r = "" r.extend(reverse(self)) return r } } The code works fine, but I'd like to call this method…
cfischer
  • 24,452
  • 37
  • 131
  • 214
0
votes
1 answer

Name collisions between layers

So I'm developing a very cool (and very large) n-tier application. Basically I have the following assemblies: Domain Domain.Contracts Services Services.Contracts Presentation.Admin Presentation.Web Presentation.Core (shared between Admin & Web) I…
devlife
  • 15,275
  • 27
  • 77
  • 131
0
votes
1 answer

Django error : one or more models did not validate:

I'm making an app from Netutus http://net.tutsplus.com/tutorials/python-tutorials/building-ribbit-with-django/ and I got this error when I ran syncdb. I did some research I found I had to put an related_field in ForeignKey but I still had the error.…
donkeyboy72
  • 1,883
  • 10
  • 37
  • 55
0
votes
2 answers

clash between class name and enum value: resolvable without namespaces?

class cippa{}; enum close{ cippa }; int main(){ new cippa(); //bad here } Using ::cippa doesn't help either. Is there a way to solve this without putting either the enum or the class in a separate namespace?
Lorenzo Pistone
  • 5,028
  • 3
  • 34
  • 65
-1
votes
1 answer

Why I don't have a clashing name conflict when two classes with same names are available?

Let's say I have a: package org.something.a; public class String { ... } and package org.something.a; public class Main { public static void main(String[] args) { String a = new String(); //IDE shows that this is a…
Giorgi Tsiklauri
  • 9,715
  • 8
  • 45
  • 66